[FFmpeg-trac] #2012(FFmpeg:new): -filter without specifier fails without explicit error
FFmpeg
trac at avcodec.org
Tue Dec 11 03:51:07 CET 2012
#2012: -filter without specifier fails without explicit error
------------------------------------+----------------------------------
Reporter: ubitux | Owner:
Type: defect | Status: new
Priority: normal | Component: FFmpeg
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+----------------------------------
Description changed by ubitux:
Old description:
> Given a random input file with both audio and video:
>
> {{{
> ☭ ./ffmpeg -f lavfi -i 'testsrc[out0]; aevalsrc=sin(2*PI*t*440)[out1]' -t
> 5 -y test.avi
> ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
> developers
> built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
> configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
> --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
> --enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
> --enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
> --samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
> runtime-cpudetect --enable-libcelt
> libavutil 52. 12.100 / 52. 12.100
> libavcodec 54. 79.101 / 54. 79.101
> libavformat 54. 49.101 / 54. 49.101
> libavdevice 54. 3.102 / 54. 3.102
> libavfilter 3. 26.101 / 3. 26.101
> libswscale 2. 1.103 / 2. 1.103
> libswresample 0. 17.102 / 0. 17.102
> libpostproc 52. 2.100 / 52. 2.100
> [lavfi @ 0x2a3b260] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, lavfi, from 'testsrc[out0]; aevalsrc=sin(2*PI*t*440)[out1]':
> Duration: N/A, start: 0.000000, bitrate: 2822 kb/s
> Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
> [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> Stream #0:1: Audio: pcm_f64le, 44100 Hz, mono, dbl, 2822 kb/s
> Output #0, avi, to 'test.avi':
> Metadata:
> ISFT : Lavf54.49.101
> Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR
> 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
> Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s32p
> Stream mapping:
> Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
> Stream #0:1 -> #0:1 (pcm_f64le -> libmp3lame)
> Press [q] to stop, [?] for help
> frame= 125 fps=0.0 q=2.0 Lsize= 256kB time=00:00:05.01 bitrate=
> 418.1kbits/s
> video:199kB audio:39kB subtitle:0 global headers:0kB muxing overhead
> 7.317413%
> }}}
>
> ...and trying the following commands fail:
>
> {{{
> ☭ ./ffmpeg -i test.avi -filter edgedetect -f null -
> ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
> developers
> built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
> configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
> --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
> --enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
> --enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
> --samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
> runtime-cpudetect --enable-libcelt
> libavutil 52. 12.100 / 52. 12.100
> libavcodec 54. 79.101 / 54. 79.101
> libavformat 54. 49.101 / 54. 49.101
> libavdevice 54. 3.102 / 54. 3.102
> libavfilter 3. 26.101 / 3. 26.101
> libswscale 2. 1.103 / 2. 1.103
> libswresample 0. 17.102 / 0. 17.102
> libpostproc 52. 2.100 / 52. 2.100
> Input #0, avi, from 'test.avi':
> Metadata:
> encoder : Lavf54.49.101
> Duration: 00:00:05.04, start: 0.000000, bitrate: 415 kb/s
> Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46),
> yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p,
> 64 kb/s
> [buffer @ 0x178f040] Unable to parse option value "0x0" as image size
> Error opening filters!
> }}}
>
> {{{
> ☭ ./ffmpeg -i test.avi -filter volume -f null -
> ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
> developers
> built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
> configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
> --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
> --enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
> --enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
> --samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
> runtime-cpudetect --enable-libcelt
> libavutil 52. 12.100 / 52. 12.100
> libavcodec 54. 79.101 / 54. 79.101
> libavformat 54. 49.101 / 54. 49.101
> libavdevice 54. 3.102 / 54. 3.102
> libavfilter 3. 26.101 / 3. 26.101
> libswscale 2. 1.103 / 2. 1.103
> libswresample 0. 17.102 / 0. 17.102
> libpostproc 52. 2.100 / 52. 2.100
> Input #0, avi, from 'test.avi':
> Metadata:
> encoder : Lavf54.49.101
> Duration: 00:00:05.04, start: 0.000000, bitrate: 415 kb/s
> Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46),
> yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p,
> 64 kb/s
> [abuffer @ 0x1e057e0] Value inf for parameter 'time_base' out of range [0
> - 2.14748e+09]
> Error opening filters!
> }}}
>
> It works fine when using {{{-filter:v}}} or {{{-vf}}}, and
> {{{-filter:a}}} or {{{-af}}} though. Also note it's note the problem
> doesn't arise if the input is audio-only or video-only.
>
> We should either fail with a more explicit error when the type specifier
> is not set, or have better heuristics to guess what the user wants.
New description:
Given a random input file with both audio and video:
{{{
☭ ./ffmpeg -f lavfi -i 'testsrc[out0]; aevalsrc=sin(2*PI*t*440)[out1]' -t
5 -y test.avi
ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
--enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
--enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
--enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
--samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
runtime-cpudetect --enable-libcelt
libavutil 52. 12.100 / 52. 12.100
libavcodec 54. 79.101 / 54. 79.101
libavformat 54. 49.101 / 54. 49.101
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 26.101 / 3. 26.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[lavfi @ 0x2a3b260] Estimating duration from bitrate, this may be
inaccurate
Input #0, lavfi, from 'testsrc[out0]; aevalsrc=sin(2*PI*t*440)[out1]':
Duration: N/A, start: 0.000000, bitrate: 2822 kb/s
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: pcm_f64le, 44100 Hz, mono, dbl, 2822 kb/s
Output #0, avi, to 'test.avi':
Metadata:
ISFT : Lavf54.49.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR
1:1 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s32p
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Stream #0:1 -> #0:1 (pcm_f64le -> libmp3lame)
Press [q] to stop, [?] for help
frame= 125 fps=0.0 q=2.0 Lsize= 256kB time=00:00:05.01 bitrate=
418.1kbits/s
video:199kB audio:39kB subtitle:0 global headers:0kB muxing overhead
7.317413%
}}}
...and trying the following commands fail:
{{{
☭ ./ffmpeg -i test.avi -filter edgedetect -f null -
ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
--enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
--enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
--enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
--samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
runtime-cpudetect --enable-libcelt
libavutil 52. 12.100 / 52. 12.100
libavcodec 54. 79.101 / 54. 79.101
libavformat 54. 49.101 / 54. 49.101
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 26.101 / 3. 26.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, avi, from 'test.avi':
Metadata:
encoder : Lavf54.49.101
Duration: 00:00:05.04, start: 0.000000, bitrate: 415 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46),
yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p,
64 kb/s
[buffer @ 0x178f040] Unable to parse option value "0x0" as image size
Error opening filters!
}}}
{{{
☭ ./ffmpeg -i test.avi -filter volume -f null -
ffmpeg version N-47714-g7eafd27 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 11 2012 03:04:42 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-fontconfig --enable-libfreetype
--enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264
--enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg
--enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc
--samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --enable-
runtime-cpudetect --enable-libcelt
libavutil 52. 12.100 / 52. 12.100
libavcodec 54. 79.101 / 54. 79.101
libavformat 54. 49.101 / 54. 49.101
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 26.101 / 3. 26.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, avi, from 'test.avi':
Metadata:
encoder : Lavf54.49.101
Duration: 00:00:05.04, start: 0.000000, bitrate: 415 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46),
yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p,
64 kb/s
[abuffer @ 0x1e057e0] Value inf for parameter 'time_base' out of range [0
- 2.14748e+09]
Error opening filters!
}}}
It works fine when using {{{-filter:v}}} or {{{-vf}}}, and {{{-filter:a}}}
or {{{-af}}} though. Also note the problem doesn't arise if the input is
audio-only or video-only.
We should either fail with a more explicit error when the type specifier
is not set, or have better heuristics to guess what the user wants.
--
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2012#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list