[FFmpeg-user] Translation to ffmpeg of Handbrake (GUI) settings?

Philip Courier philipcourier at hotmail.com
Fri Mar 2 20:39:25 EET 2018

Hi, I'm a newbie to ffmpeg.  My operating system is Korora 26, a spin of Fedora 26.

I've been doing a conversion of a downloaded (decoded TiVo) daily TV show (.ts extension), using Handbrake (GUI).

The Handbrake version is 1.0.7-5.fc26.x86_64 from rpmfusion-free.

The result from a 2-pass encode in Handbrake is splendid, but I would like to do the same encode

from a bash scriptfile using 2 passes in ffmpeg.

The ffmpeg supplied by dnf from rpmfusion-free is unusable, it gives the error message:

ERROR: libx264 not found

but the ffmpeg I compiled

(version N-90176-g27cbbbb) (using the instructions at https://trac.ffmpeg.org/wiki/CompilationGuide/Centos,

except, I changed pkgconfig to /usr/lib64/pkgconfig, libdir to /usr/lib64, and bindir to /usr/bin)

finds the libx264 which this procedure produces. However, with this new ffmpeg the parameter

-flags2 +mixed_refs+dct8x8+wpred

does not get picked up, i.e. it generates an error

Undefined constant or missing '(' in 'mixed_refs'
[aac @ 0x3244f00] Unable to parse option value "mixed_refs+dct8x8+wpred"
[aac @ 0x3244f00] Error setting option flags2 to value +mixed_refs+dct8x8+wpred

So, I would like someone to provide me the following starting point, so I can attempt various means of

compiling ffmpeg until I arrive at a build that works: I wonder if someone can provide the pass 1 and pass 2

ffmpeg command lines equivalent to the

following Handbrake settings, which have proven successful in my encode:

Summary tab:

Source codec: mpeg2video, Dimensions: 1920 x 1080, Aspect: 16:9, Frame Rate: 29.97,

Cropping: Autocrop: Off, Crop: 0:0:0:0, Crop Dimensions: 1920 x 1080

Scaling: Scale Dimensions: 722 x 406, Optimal for Source: Off, Anamorphic: Off

Dimensions tab:

Auto crop: unchecked, Loose crop: unchecked, 0:0:0:0, Crop Dimensions: 1920 x 1080

Storage Geometry: Optimal for source: unchecked, Width: 722, Height: 406, Anamorphic: Off, Alignment: 2

Display Geometry: Keep Aspect: checked, Display Aspect: 16.00 : 9

Filters tab:

Detelecine: Off, Interlace Detection: Off, Deinterlace: Yadif, Deinterlace Preset: Bob, Deblock slider: Off, Denoise Filter:

Off, Rotate Filter: Off, Grayscale: unchecked.

Video tab:

Video Encoder: H.264 (x264), Framerate: 59.94, Constant Framerate: checked, Bitrate: checked (value: 4160),

2-Pass Encoding: checked, Turbo First Pass: unchecked, Use Advanced Options: unchecked, Preset: placebo,

Tune: None, Profile: high, Level: 4.1, Fast Decode: unchecked.

More settings: ref=4:bframes=1:b-pyramid=none:weightp=1:8x8dct=1:me=umh:subme=9:merange=24:direct=auto:





Audio Defaults tab:

Encoder: AC3, Bitrate: checked, bitrate 160, Mixdown Dolby Pro Logic II, Samplerate: same as source.

Thanks for the help.

More information about the ffmpeg-user mailing list