Opened 11 years ago
Closed 11 years ago
#2803 closed defect (fixed)
Expression for scale filter trimmed
Reported by: | Đonny | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | zarubaj@rferl.org | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
It looks like there is some limitation of maximum length of filter parameter for scale filter (or for all filters?). When I pass too long filter parameter FFmpeg complains about wrongs syntax. It seems that the length limitation is around 255 characters.
How to reproduce:
FFmpeg command line
(note: the command line is just an simple example how to reproduce the issue, in practice I'm trying to pass some quite complex expression for w:h of scale filer.)
D:\UGC testfiles\Video>ffmpeg -i D:\UGC\PendingUGC\c\c9\c9e9cf86-6598-409c-9cd1-879cb31622d0.mp4 -vf "yadif=0:-1:0, hqdn3d=1.5:1.5:6:6, scale=(00000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000480):(0000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320), setsar=sar=1, fps=fps=25" -c:v libx264 -refs 5 -pix_fmt yuv420p -crf 25 -maxrate 300k -bufsize 1835k -profile:v baseline -preset fast -strict -2 -c:a aac -af "aformat=channel_layouts=mo no|stereo" -ar 44100 -ab 32k -threads 3 -y -f mp4 o.mp4 -loglevel debug -report
(the input file must exist)
FFmpeg output
ffmpeg started on 2013-07-22 at 12:54:26 Report written to "ffmpeg-20130722-125426.log" ffmpeg version N-54857-gf9f7f4c Copyright (c) 2000-2013 the FFmpeg developers built on Jul 21 2013 20:04:40 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs -- enable-libxvid --enable-zlib libavutil 52. 40.100 / 52. 40.100 libavcodec 55. 18.102 / 55. 18.102 libavformat 55. 12.102 / 55. 12.102 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 81.102 / 3. 81.102 libswscale 2. 4.100 / 2. 4.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 3.100 / 52. 3.100 Splitting the commandline. Reading option '-i' ... matched as input file with argument 'D:\UGC\PendingUGC\c\c9\c9e9cf86-6598-409c-9cd1-879cb31622d0.mp4'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'yadif=0:-1:0, hqdn3d=1.5:1.5:6:6, scale=(000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000480):(00000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320), setsar=sar=1, fps=fps=25'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'. Reading option '-refs' ... matched as AVOption 'refs' with argument '5'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'. Reading option '-crf' ... matched as AVOption 'crf' with argument '25'. Reading option '-maxrate' ... matched as AVOption 'maxrate' with argument '300k'. Reading option '-bufsize' ... matched as AVOption 'bufsize' with argument '1835k'. Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'baseline'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'fast'. Reading option '-strict' ... matched as AVOption 'strict' with argument '-2'. Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'. Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'aformat=channel_layouts=mono|stereo'. Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100'. Reading option '-ab' ... matched as AVOption 'ab' with argument '32k'. Reading option '-threads' ... matched as AVOption 'threads' with argument '3'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'. Reading option 'o.mp4' ... matched as output file. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option loglevel (set logging level) with argument debug. Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file D:\UGC\PendingUGC\c\c9\c9e9cf86-6598-409c-9cd1-879cb31622d0.mp4. Successfully parsed a group of options. Opening an input file: D:\UGC\PendingUGC\c\c9\c9e9cf86-6598-409c-9cd1-879cb31622d0.mp4. [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000027df4c0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000027df4c0] ISO: File Type Major Brand: isom [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000027df4c0] File position before avformat_find_stream_info() is 7105913 [h264 @ 00000000027dc900] no picture [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000027df4c0] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000027df4c0] File position after avformat_find_stream_info() is 16923 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\UGC\PendingUGC\c\c9\c9e9cf86-6598-409c-9cd1-879cb31622d0.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.9.100 Duration: 00:01:00.04, start: 0.036281, bitrate: 946 kb/s Stream #0:0(eng), 1, 1/11988: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 50/2997, 810 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn , 59.94 tbc Metadata: handler_name : VideoHandler Stream #0:1(eng), 1, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s Metadata: handler_name : SoundHandler Successfully opened the file. Parsing a group of options: output file o.mp4. Applying option vf (set video filters) with argument yadif=0:-1:0, hqdn3d=1.5:1.5:6:6, scale=(000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000480):(00000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000320), setsar=sar=1, fps=fps=25. Applying option c:v (codec name) with argument libx264. Applying option pix_fmt (set pixel format) with argument yuv420p. Applying option profile:v (set profile) with argument baseline. Applying option c:a (codec name) with argument aac. Applying option af (set audio filters) with argument aformat=channel_layouts=mono|stereo. Applying option ar (set audio sampling rate (in Hz)) with argument 44100. Applying option f (force format) with argument mp4. Successfully parsed a group of options. Opening an output file: o.mp4. Successfully opened the file. detected 8 logical cores [Parsed_yadif_0 @ 00000000027db820] Setting 'mode' to value '0' [Parsed_yadif_0 @ 00000000027db820] Setting 'parity' to value '-1' [Parsed_yadif_0 @ 00000000027db820] Setting 'deint' to value '0' [Parsed_hqdn3d_1 @ 000000000032a720] Setting 'luma_spatial' to value '1.5' [Parsed_hqdn3d_1 @ 000000000032a720] Setting 'chroma_spatial' to value '1.5' [Parsed_hqdn3d_1 @ 000000000032a720] Setting 'luma_tmp' to value '6' [Parsed_hqdn3d_1 @ 000000000032a720] Setting 'chroma_tmp' to value '6' [Parsed_hqdn3d_1 @ 000000000032a720] ls:1.500000 cs:1.500000 lt:6.000000 ct:6.000000 [Parsed_scale_2 @ 000000000033ed40] Setting 'w' to value '(00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000480)' [Parsed_scale_2 @ 000000000033ed40] Setting 'h' to value '(000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' [Parsed_scale_2 @ 000000000033ed40] w:(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000480) h:(000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 flags:'bilinear' interl: 0 [Parsed_setsar_3 @ 0000000000372f40] Setting 'sar' to value '1' [Parsed_fps_4 @ 0000000000373120] Setting 'fps' to value '25' [Parsed_fps_4 @ 0000000000373120] fps=25/1 [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'video_size' to value '720x480' [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'time_base' to value '1/11988' [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'pixel_aspect' to value '8/9' [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0000000000373620] Setting 'frame_rate' to value '2997/100' [graph 0 input from stream 0:0 @ 0000000000373620] w:720 h:480 pixfmt:yuv420p tb:1/11988 fr:2997/100 sar:8/9 sws_param:flags=2 [format @ 00000000003738c0] compat: called with args=[yuv420p] [format @ 00000000003738c0] Setting 'pix_fmts' to value 'yuv420p' [AVFilterGraph @ 0000000000342da0] query_formats: 8 queried, 7 merged, 0 already done, 0 delayed [Parsed_scale_2 @ 000000000033ed40] [Eval @ 000000000022ab30] Missing ')' in '(000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000' Error when evaluating the expression '(000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'. Maybe the expression for out_w:'(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000480)' or for out_h:'(000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' is self-referenc ing. [Parsed_scale_2 @ 000000000033ed40] Failed to configure output pad on Parsed_scale_2 Error opening filters! [Parsed_fps_4 @ 0000000000373120] 0 frames in, 0 frames out; 0 frames dropped, 0 frames duplicated. [AVIOContext @ 000000000033bec0] Statistics: 0 seeks, 0 writeouts [AVIOContext @ 00000000027dfa40] Statistics: 130709 bytes read, 2 seeks
Change History (5)
follow-up: 2 comment:1 by , 11 years ago
Keywords: | filer length expression removed |
---|
follow-up: 3 comment:2 by , 11 years ago
Replying to cehoyos:
Is this not reproducible with current git head?
I'm not sure. I have problems building FFmpeg on Windows :-(. I'm using Zeranoe FFmpeg builds for Windows and I can replicate it with build git-f9f7f4c (x64, static) from 2013-07-21 (yesterday). I've also tried Linux build N-54234-gef90639 from 2013-06-28 with same effect.
It the issue is expected to be fixed recently I can try it again tomorrow with latest Zeranoe build.
follow-up: 4 comment:3 by , 11 years ago
Version: | 2.0 → git-master |
---|
Replying to Đonny:
Replying to cehoyos:
Is this not reproducible with current git head?
I'm not sure. I have problems building FFmpeg on Windows :-(
Anything that can be fixed?
I'm using Zeranoe FFmpeg builds for Windows and I can replicate it with build git-f9f7f4c (x64, static) from 2013-07-21 (yesterday).
Yesterday is usually new enough.
It the issue is expected to be fixed recently I can try it again tomorrow with latest Zeranoe build.
No, I was just surprised why you set "Version" to 2,0.
comment:4 by , 11 years ago
Replying to cehoyos:
Anything that can be fixed?
I guess it can be fixed when I spend a day on it. I'm not very familiar with MSYS etc.
No, I was just surprised why you set "Version" to 2,0.
Sorry, I didn't realize there's git-master version, I thought 2.0 is the latest.
comment:5 by , 11 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Is this not reproducible with current git head?