Opened 12 years ago

Closed 10 years ago

#678 closed enhancement (fixed)

Warn that filtering is disabled when copying streams

Reported by: llogan Owned by:
Priority: wish Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Some users assume they can copy a video steam and perform filtering [1]. FFmpeg does not give any feedback that the filter is being ignored.

Current behavior:

$ ffmpeg -i hop.mp4 -c copy -vf crop=iw:ih-20 -y out.mpg
ffmpeg version N-35078-g7831788, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 22 2011 10:36:32 with gcc 4.6.2
  configuration: --prefix=/usr --enable-gpl
  libavutil    51. 26. 0 / 51. 26. 0
  libavcodec   53. 36. 0 / 53. 36. 0
  libavformat  53. 21. 0 / 53. 21. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 49. 0 /  2. 49. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hop.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.32.0
  Duration: 00:00:10.13, start: 0.000000, bitrate: 563 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 559 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : 
[mpeg @ 0x1d17860] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.21.0
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x480, q=2-31, 559 kb/s, 30 fps, 90k tbn, 30 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : 
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  304 fps=  0 q=-1.0 Lsize=     700kB time=00:00:10.06 bitrate= 569.6kbits/s    
video:692kB audio:0kB global headers:0kB muxing overhead 1.166920%

Example warning: "Filtering is disabled when copying streams."

Of course the message could be more specific as to what streams are affected and what filters are actually disabled.

[1] http://ffmpeg.org/pipermail/ffmpeg-user/2011-November/003175.html

Change History (3)

comment:1 by David Favor, 10 years ago

Seems best to give examples of what "does" work also.

For example, this also fails...

ffmpeg -i in.mp4 -c:a copy -vf copy,setdar=dar=0,setsar=sar=0 out.mp4

Based on comments in the email thread that spawned this ticket, this type of filter chain will fail on all compressed streams,
so having an h264 video stream automatically fails.

Suggest docs include...

1) mention of what codecs are supported + unsupported for this operation

2) example of a working -vf copy ffmpeg command line invocation

comment:2 by Cigaes, 10 years ago

-vf copy is stupid. What do you not understand in “Mainly useful for testing purposes.”?

Combining setsar and setdar is stupid, they both change the same information.

comment:3 by Stefano Sabatini, 10 years ago

Analyzed by developer: set
Component: undeterminedFFmpeg
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Should be fixed in:

commit 535d58959dececb428cf73b308258de243c2c6f3
Author: Stefano Sabatini <stefasab@gmail.com>
Date:   Sun Nov 3 10:50:16 2013 +0100

    ffmpeg: add verbose consistency checks in case of filtering inconsistent options
    
    In particular, warn in case -filter and streamcopy is used at the same
    time, fix trac ticket #678.
Note: See TracTickets for help on using tickets.