Opened 13 years ago
Closed 12 years ago
#1491 closed defect (fixed)
"-t" and "-filter_complex" are incompatible
Reported by: | TimNich | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
If using a commandline containing "-filter_complex" on a large file, attempting to use -t to limit the length of the output file (say in order to test the command line) results in the required number of frames being processed, and then the buffers continuing to fill up until either all frames have been read, or memory runs out.
In the first case the resultant file is OK (in my tests), but time is wasted as the process reads to the end of the file, in the second case the process is terminated without the file being written fully, making it unusable (in my tests).
How to reproduce:
% ffmpeg -i LTA01631701.mxf -filter_complex " > [0:1] [0:2] amerge [audio]" \ > -map 0:0 -map '[audio]' \ > -c:v dvvideo -pix_fmt yuv420p \ > -c:a pcm_s16le -ar 48k -ac 2 \ > -t 10 -y ./LTA01631701-duff.mov ffmpeg version N-41976-g734aeeb-by_Tim Copyright (c) 2000-2012 the FFmpeg developers built on Jun 27 2012 08:52:54 with gcc 4.6.2 configuration: --extra-version=by_Tim --enable-static --disable-shared --enable-gpl --enable-nonfree --enable-version3 --prefix=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local --libdir=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64 --samples=../fate-suite/ --enable-runtime-cpudetect --extra-cflags='-static -I/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/include' --extra-ldflags='-static -L/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64' --progs-suffix=_Jun-27 --enable-libfaac --enable-libx264 --enable-libfreetype --disable-ffplay --disable-ffserver libavutil 51. 63.100 / 51. 63.100 libavcodec 54. 29.101 / 54. 29.101 libavformat 54. 11.100 / 54. 11.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 3. 0.100 / 3. 0.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 [mxf @ 0x180c960] could not resolve material track sequence strong ref Guessed Channel Layout for Input Stream #0.1 : mono Guessed Channel Layout for Input Stream #0.2 : mono Guessed Channel Layout for Input Stream #0.3 : mono Guessed Channel Layout for Input Stream #0.4 : mono Input #0, mxf, from 'LTA01631701.mxf': Metadata: timecode : 00:00:00:00 Duration: 00:17:44.44, start: 0.000000, bitrate: 170532 kb/s Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s [graph 0 input from stream 0:1 @ 0x183cac0] tb:1/25 samplefmt:s32 samplerate:48000 chlayout:0x4 [graph 0 input from stream 0:2 @ 0x183cb20] tb:1/25 samplefmt:s32 samplerate:48000 chlayout:0x4 [Parsed_amerge_0 @ 0x1812cc0] Inputs overlap: output layout will be meaningless [Parsed_amerge_0 @ 0x1812cc0] in0:mono + in1:mono -> out:stereo [auto-inserted resampler 0 @ 0x182cf60] chl:stereo fmt:s32 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz [graph 1 input from stream 0:0 @ 0x182c420] w:720 h:576 pixfmt:uyvy422 tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2 [output stream 0:0 @ 0x182cec0] No opaque field provided [auto-inserted scaler 0 @ 0x182c540] w:720 h:576 fmt:uyvy422 sar:0/1 -> w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4 Output #0, mov, to './LTA01631701-duff.mov': Metadata: timecode : 00:00:00:00 encoder : Lavf54.11.100 Stream #0:0: Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576, q=2-31, 200 kb/s, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s Stream mapping: Stream #0:1 (pcm_s24le) -> amerge: (graph 0) Stream #0:2 (pcm_s24le) -> amerge::sample_fmt=s32:channel_layout=0x4 (graph 0) Stream #0:0 -> #0:0 (rawvideo -> dvvideo) amerge (graph 0) -> Stream #0:1 (pcm_s16le) Press [q] to stop, [?] for help frame= 250 fps= 28 q=0.0 Lsize= 37035kB time=00:00:10.00 bitrate=30339.1kbits/s 8424 Killed ffmpeg -i.......
The input file need to be larger than available memory to see the process being killed.
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed before 1.0 and works fine with current git head.
8069db86 by Nicolas now adds an AV_LOG_WARNING about this issue.