Opened 4 years ago

Last modified 4 years ago

#1530 new enhancement

Feature Request :: Allow more options in .ffpreset files

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

Description (last modified by cehoyos)

I created a preset containing options for creating HD MPEG-2 PS files, and I noticed, through trial and error, that the preset only allows certain options. I'd like to see more items available for parsing in ffpreset files, similar to using profiles with MEncoder.

Here's an example:

ffmpeg started on 2012-07-11 at 16:33:56
Report written to "ffmpeg-20120711-163356.log"
Command line:
ffmpeg -report -i "C:\\Users\\davep\\Desktop\\test_tff1080i30.mpg" -f vob -c:v mpeg2video -pix_fmt yuv420p -r ntsc -vsync cfr -async 48000 -filter:v "crop=1440:1080:0:0,yadif=0,scale=1920:1080,setdar=16:9" -c:a mp2 -fpre 5hd.ffpreset -vstats_file test_out1080p30.mpg.log -t 30 -y "C:\\Users\\davep\\Desktop\\test_out1080p30-30-bstrat1.mpg"
ffmpeg version N-41975-gb536e2f Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 26 2012 20:37:12 with gcc 4.7.1
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  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
[mpeg @ 0000000001e7f3c0] Format mpeg probed with size=8192 and score=52
[mpeg @ 0000000001e7f3c0] File position before avformat_find_stream_info() is 0
[mpeg @ 0000000001e7f3c0] Probe buffer size limit 5000000 reached
[mpeg @ 0000000001e7f3c0] File position after avformat_find_stream_info() is 0
Input #0, mpeg, from 'C:\Users\davep\Desktop\test_tff1080i30.mpg':
  Duration: 00:01:12.02, start: 0.250000, bitrate: 26433 kb/s
    Stream #0:0[0x1e0], 48, 1/90000: Video: mpeg2video (High), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1c0], 65, 1/90000: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
ffpreset[5hd.ffpreset]: set 'minrate' = '25M'
ffpreset[5hd.ffpreset]: set 'maxrate' = '25M'
ffpreset[5hd.ffpreset]: set 'muxrate' = '25.5M'
ffpreset[5hd.ffpreset]: set 'b:v' = '25M'
ffpreset[5hd.ffpreset]: set 'bt' = '10M'
ffpreset[5hd.ffpreset]: set 'bufsize' = '4M'
ffpreset[5hd.ffpreset]: set 'qmin' = '2'
ffpreset[5hd.ffpreset]: set 'qmax' = '10'
ffpreset[5hd.ffpreset]: set 'trellis' = '1'
ffpreset[5hd.ffpreset]: set 'mbd' = '2'
ffpreset[5hd.ffpreset]: set 'bf' = '2'
ffpreset[5hd.ffpreset]: set 'b_strategy' = '1'
ffpreset[5hd.ffpreset]: set 'b_sensitivity' = '10'
ffpreset[5hd.ffpreset]: set 'brd_scale' = '2'
ffpreset[5hd.ffpreset]: set 'keyint_min' = '5'
ffpreset[5hd.ffpreset]: set 'g' = '30'
ffpreset[5hd.ffpreset]: set 'ar' = '48000'
ffpreset[5hd.ffpreset]: set 'ac' = '2'
ffpreset[5hd.ffpreset]: set 'b:a' = '384k'
ffpreset[5hd.ffpreset]: set 'threads' = 'auto'
[Parsed_yadif_1 @ 0000000001f0b0e0] mode:0 parity:-1 auto_enable:0
[Parsed_setdar_3 @ 0000000001f0afc0] a:16/9
[buffer @ 0000000001f07fe0] Setting entry with key 'video_size' to value '1440x1080'
[buffer @ 0000000001f07fe0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0000000001f07fe0] Setting entry with key 'time_base' to value '1/90000'
[buffer @ 0000000001f07fe0] Setting entry with key 'pixel_aspect' to value '4/3'
[buffer @ 0000000001f07fe0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0000000001f07fe0] Setting entry with key 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0000000001f0af20] w:1440 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:4/3 sws_param:flags=2
[output stream 0:0 @ 0000000001f0aea0] No opaque field provided
[Parsed_crop_0 @ 0000000001f0b160] w:1440 h:1080 sar:4/3 -> w:1440 h:1080 sar:4/3
[Parsed_scale_2 @ 0000000001f0b040] w:1440 h:1080 fmt:yuv420p sar:4/3 -> w:1920 h:1080 fmt:yuv420p sar:1/1 flags:0x4
[Parsed_setdar_3 @ 0000000001f0afc0] w:1920 h:1080 -> dar:16/9 sar:1/1
[abuffer @ 0000000001f08440] Setting entry with key 'time_base' to value '1/90000'
[abuffer @ 0000000001f08440] Setting entry with key 'sample_rate' to value '48000'
[abuffer @ 0000000001f08440] Setting entry with key 'sample_fmt' to value 's16'
[abuffer @ 0000000001f08440] Setting entry with key 'channel_layout' to value '0x3'
[graph 1 input from stream 0:1 @ 0000000001f0ace0] tb:1/90000 samplefmt:s16 samplerate:48000 chlayout:0x3
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000:max_soft_comp=1.000000.
[aformat @ 00000000044b5a60] Setting entry with key 'sample_fmts' to value 's16'
[aformat @ 00000000044b5a60] Setting entry with key 'sample_rates' to value '44100,48000,32000,22050,24000,16000'
[output stream 0:1 @ 0000000001f0abc0] auto-inserting filter 'auto-inserted fifo 0' between the filter 'audio format for output stream 0:1' and the filter 'output stream 0:1'
[graph 1 aresample for input stream 0:1 @ 0000000001f0ac60] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz
[mpeg2video @ 00000000048e9a60] detected 8 logical cores
[mpeg2video @ 00000000048e9a60] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg2video @ 0000000001efffa0] detected 8 logical cores
Output #0, vob, to 'C:\Users\davep\Desktop\test_out1080p30-30-bstrat1.mpg':
  Metadata:
    encoder         : Lavf54.11.100
    Stream #0:0, 0, 1/90000: Video: mpeg2video (hq), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-10, 25000 kb/s, 90k tbn, 29.97 tbc
    Stream #0:1, 0, 1/90000: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> mpeg2video)
  Stream #0:1 -> #0:1 (mp2 -> mp2)
Press [q] to stop, [?] for help
[mpeg2video @ 0000000001efffa0] warning: first frame is no keyframe
frame=   19 fps=0.0 q=2.3 size=    1650kB time=00:00:00.53 bitrate=25318.7kbits/s    
frame=   40 fps= 38 q=2.0 size=    3848kB time=00:00:01.23 bitrate=25533.5kbits/s    
frame=   60 fps= 38 q=2.0 size=    5940kB time=00:00:01.90 bitrate=25585.2kbits/s    
frame=   82 fps= 39 q=2.0 size=    8242kB time=00:00:02.63 bitrate=25614.3kbits/s    
frame=  104 fps= 40 q=2.5 size=   10542kB time=00:00:03.37 bitrate=25625.9kbits/s    
frame=  126 fps= 40 q=2.8 size=   12848kB time=00:00:04.10 bitrate=25645.3kbits/s    
frame=  147 fps= 41 q=2.0 size=   15044kB time=00:00:04.80 bitrate=25649.4kbits/s    
frame=  169 fps= 41 q=2.0 size=   17348kB time=00:00:05.53 bitrate=25657.7kbits/s    
frame=  190 fps= 41 q=2.5 size=   19544kB time=00:00:06.23 bitrate=25659.5kbits/s    
frame=  211 fps= 41 q=2.5 size=   21742kB time=00:00:06.94 bitrate=25663.3kbits/s    
frame=  233 fps= 41 q=2.0 size=   24046kB time=00:00:07.67 bitrate=25668.0kbits/s    
frame=  254 fps= 41 q=2.0 size=   26242kB time=00:00:08.37 bitrate=25668.5kbits/s    
frame=  276 fps= 41 q=2.0 size=   28546kB time=00:00:09.10 bitrate=25672.0kbits/s    
frame=  294 fps= 41 q=2.0 size=   30428kB time=00:00:09.70 bitrate=25671.9kbits/s    
frame=  313 fps= 41 q=2.5 size=   32416kB time=00:00:10.34 bitrate=25672.9kbits/s    
frame=  334 fps= 41 q=2.5 size=   34616kB time=00:00:11.04 bitrate=25675.9kbits/s    
frame=  349 fps= 40 q=3.0 size=   36262kB time=00:00:11.54 bitrate=25730.8kbits/s    
frame=  354 fps= 38 q=5.2 size=   36816kB time=00:00:11.71 bitrate=25751.7kbits/s    
frame=  358 fps= 36 q=6.1 size=   37194kB time=00:00:11.84 bitrate=25723.0kbits/s    
frame=  362 fps= 35 q=5.0 size=   37650kB time=00:00:11.97 bitrate=25748.2kbits/s    
frame=  365 fps= 33 q=7.6 size=   38020kB time=00:00:12.07 bitrate=25785.8kbits/s    
frame=  368 fps= 32 q=8.5 size=   38256kB time=00:00:12.17 bitrate=25732.6kbits/s    
frame=  371 fps= 30 q=8.0 size=   38558kB time=00:00:12.27 bitrate=25724.3kbits/s    
frame=  373 fps= 29 q=8.0 size=   38786kB time=00:00:12.34 bitrate=25736.6kbits/s    
frame=  376 fps= 28 q=9.0 size=   39090kB time=00:00:12.44 bitrate=25729.7kbits/s    
frame=  379 fps= 26 q=11.0 size=   39316kB time=00:00:12.54 bitrate=25671.9kbits/s    
frame=  381 fps= 25 q=10.0 size=   39620kB time=00:00:12.61 bitrate=25733.6kbits/s    
frame=  383 fps= 24 q=37.9 size=   39826kB time=00:00:12.67 bitrate=25731.2kbits/s    
frame=  385 fps= 24 q=10.3 size=   40082kB time=00:00:12.74 bitrate=25761.0kbits/s    
frame=  389 fps= 23 q=8.0 size=   40378kB time=00:00:12.87 bitrate=25682.3kbits/s    
frame=  392 fps= 22 q=7.0 size=   40816kB time=00:00:12.97 bitrate=25760.7kbits/s    
frame=  395 fps= 22 q=7.5 size=   41148kB time=00:00:13.07 bitrate=25771.5kbits/s    
frame=  398 fps= 21 q=10.8 size=   41438kB time=00:00:13.17 bitrate=25756.0kbits/s    
frame=  401 fps= 21 q=9.0 size=   41742kB time=00:00:13.27 bitrate=25749.4kbits/s    
frame=  404 fps= 20 q=7.0 size=   41970kB time=00:00:13.38 bitrate=25696.4kbits/s    
frame=  407 fps= 20 q=8.0 size=   42418kB time=00:00:13.48 bitrate=25777.8kbits/s    
frame=  410 fps= 20 q=7.0 size=   42652kB time=00:00:13.58 bitrate=25729.0kbits/s    
frame=  413 fps= 19 q=8.5 size=   43030kB time=00:00:13.68 bitrate=25767.0kbits/s    
frame=  416 fps= 19 q=9.0 size=   43334kB time=00:00:13.78 bitrate=25760.6kbits/s    
frame=  420 fps= 18 q=6.0 size=   43712kB time=00:00:13.91 bitrate=25736.0kbits/s    
frame=  423 fps= 18 q=7.0 size=   44016kB time=00:00:14.01 bitrate=25729.9kbits/s    
frame=  427 fps= 18 q=7.5 size=   44498kB time=00:00:14.14 bitrate=25766.3kbits/s    
frame=  430 fps= 17 q=7.0 size=   44774kB time=00:00:14.24 bitrate=25743.9kbits/s    
frame=  432 fps= 17 q=9.1 size=   45034kB time=00:00:14.31 bitrate=25772.7kbits/s    
frame=  435 fps= 17 q=10.5 size=   45304kB time=00:00:14.41 bitrate=25747.2kbits/s    
frame=  437 fps= 17 q=8.0 size=   45558kB time=00:00:14.48 bitrate=25772.2kbits/s    
frame=  440 fps= 16 q=16.9 size=   45834kB time=00:00:14.58 bitrate=25750.4kbits/s    
frame=  443 fps= 16 q=8.5 size=   46138kB time=00:00:14.68 bitrate=25744.4kbits/s    
frame=  446 fps= 16 q=8.2 size=   46366kB time=00:00:14.78 bitrate=25696.4kbits/s    
frame=  450 fps= 15 q=7.5 size=   46896kB time=00:00:14.91 bitrate=25757.6kbits/s    
frame=  455 fps= 15 q=4.0 size=   47410kB time=00:00:15.08 bitrate=25751.9kbits/s    
frame=  465 fps= 15 q=2.0 size=   48322kB time=00:00:15.41 bitrate=25679.1kbits/s    
frame=  487 fps= 16 q=2.5 size=   50626kB time=00:00:16.14 bitrate=25680.6kbits/s    
frame=  511 fps= 16 q=31.0 size=   53138kB time=00:00:16.95 bitrate=25681.4kbits/s    
frame=  524 fps= 17 q=3.0 size=   54578kB time=00:00:17.38 bitrate=25719.2kbits/s    
frame=  533 fps= 17 q=3.0 size=   55552kB time=00:00:17.68 bitrate=25733.6kbits/s    
frame=  542 fps= 17 q=36.6 size=   56386kB time=00:00:17.98 bitrate=25683.8kbits/s    
frame=  554 fps= 17 q=3.0 size=   57732kB time=00:00:18.38 bitrate=25724.2kbits/s    
frame=  567 fps= 17 q=2.0 size=   59104kB time=00:00:18.81 bitrate=25728.5kbits/s    
frame=  579 fps= 17 q=3.8 size=   60318kB time=00:00:19.21 bitrate=25710.0kbits/s    
frame=  587 fps= 17 q=2.0 size=   61118kB time=00:00:19.48 bitrate=25694.1kbits/s    
frame=  601 fps= 17 q=2.5 size=   62558kB time=00:00:19.95 bitrate=25683.8kbits/s    
frame=  617 fps= 17 q=2.5 size=   64230kB time=00:00:20.48 bitrate=25683.1kbits/s    
frame=  630 fps= 17 q=2.0 size=   65688kB time=00:00:20.92 bitrate=25721.5kbits/s    
frame=  643 fps= 17 q=2.0 size=   67008kB time=00:00:21.35 bitrate=25705.4kbits/s    
frame=  653 fps= 17 q=3.0 size=   68070kB time=00:00:21.68 bitrate=25711.0kbits/s    
frame=  662 fps= 17 q=3.0 size=   69014kB time=00:00:21.98 bitrate=25711.6kbits/s    
frame=  673 fps= 17 q=11.9 size=   70106kB time=00:00:22.35 bitrate=25689.6kbits/s    
frame=  688 fps= 18 q=2.5 size=   71660kB time=00:00:22.85 bitrate=25684.0kbits/s    
frame=  704 fps= 18 q=2.5 size=   73320kB time=00:00:23.39 bitrate=25679.2kbits/s    
frame=  719 fps= 18 q=2.5 size=   74900kB time=00:00:23.89 bitrate=25683.0kbits/s    
frame=  735 fps= 18 q=2.0 size=   76580kB time=00:00:24.42 bitrate=25685.1kbits/s    
frame=  750 fps= 18 q=6.9 size=   78216kB time=00:00:24.92 bitrate=25707.0kbits/s    
frame=  763 fps= 18 q=2.5 size=   79510kB time=00:00:25.35 bitrate=25685.3kbits/s    
frame=  777 fps= 18 q=2.0 size=   81010kB time=00:00:25.82 bitrate=25696.5kbits/s    
frame=  793 fps= 19 q=2.0 size=   82650kB time=00:00:26.35 bitrate=25685.8kbits/s    
frame=  809 fps= 19 q=2.0 size=   84326kB time=00:00:26.89 bitrate=25686.4kbits/s    
frame=  824 fps= 19 q=2.0 size=   85896kB time=00:00:27.39 bitrate=25686.6kbits/s    
frame=  839 fps= 19 q=1.6 size=   87510kB time=00:00:27.89 bitrate=25699.7kbits/s    
frame=  854 fps= 19 q=2.0 size=   89034kB time=00:00:28.39 bitrate=25686.4kbits/s    
frame=  868 fps= 19 q=5.8 size=   90500kB time=00:00:28.86 bitrate=25686.8kbits/s    
frame=  881 fps= 19 q=2.0 size=   91860kB time=00:00:29.29 bitrate=25686.7kbits/s    
frame=  897 fps= 19 q=2.0 size=   93492kB time=00:00:29.82 bitrate=25675.2kbits/s    
No more output streams to write to, finishing.
frame=  899 fps= 19 q=5.8 Lsize=   93962kB time=00:00:29.96 bitrate=25689.3kbits/s    

video:91420kB audio:1406kB subtitle:0 global headers:0kB muxing overhead 1.223176%

[AVIOContext @ 0000000001e7f900] Statistics: 105762960 bytes read, 2 seeks

Through trial and error I noticed it wouldn't accept -f vob, or -r ntsc, or -vsync cfr, output codec declarations, the filter chain, and more. I wish more could be read from the preset, making my command lines easier to type, script, and easier to read.

Thank you,

dp

Change History (1)

comment:1 Changed 4 years ago by cehoyos

  • Cc lists.davep@gmail.com removed
  • Component changed from undetermined to FFmpeg
  • Description modified (diff)
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.