1
ffmpeg -version
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-23)
configuration: --prefix=/opt/ffmpeg-4.1/ --extra-cflags=-I/opt/ffmpeg-4.1/include --extra-ldflags='-L/opt/ffmpeg-4.1/lib -ldl' --pkg-config-flags=--static --enable-gpl --enable-libx265 --extra-libs=-lpthread --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
ffmpeg -y -i /test-in.mp4 -codec:a aac -ac 2 -b:a 128k -threads 0 -codec:v libx264 -b:v 3000k -minrate 2400k -maxrate 4500k -bufsize 6000k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 9 -trellis 1 -refs 3 -bf 3 -deinterlace -coder 1 -me_range 24 -g 25 -keyint_min 25 -r 25 -sc_threshold 0 -i_qfactor 0.71 -qmin 0 -qmax 40 -qdiff 4 -s 1280x720 -aspect 16:9 -psy 1 -fast-pskip 1 -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -pix_fmt yuv420p -y /test-out.mp4
I get error
[aac @ 0x466dec0] [Eval @ 0x7fffbc209f40] Undefined constant or missing '(' in 'bpyramid'
[aac @ 0x466dec0] Unable to parse option value "bpyramid"
[aac @ 0x466dec0] Error setting option flags2 to value +bpyramid.
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
On ffmpeg version 0.10.2 it worked fine... I need this options, what is wrong with the newest ffmpeg version?
@maclin You can simplify your command even more as the presets will deal with most of it, some of your options don't apply to x264 anyway, some don't make sense, and some are default. No need to encode like it's 2006.
– llogan – 2018-11-14T19:56:15.150ffmpeg -y -i input.mp4 -c:a aac -ac 2 -b:a 128k -c:v libx264 -preset medium -b:v 3000k -minrate 2400k -maxrate 4500k -bufsize 6000k -deinterlace -g 25 -r 25 -s 1280x720 -aspect 16:9 -pix_fmt yuv420p output.mp4
It could be more simplified further, but I left some of your extra options in there that aren't default or preset covered.@LordNeckbeard i cant find description of what keys are apllied to each preset, if it even exists? – maclin – 2018-11-15T08:28:49.133
@maclin See
--preset
inx264 --fullhelp
. – llogan – 2018-11-15T19:35:05.500