Translation to ffmpeg of Handbrake (GUI) settings?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Translation to ffmpeg of Handbrake (GUI) settings?

Philip Courier
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:

b-adapt=2:trellis=2:aq_mode=1:aq_strength=1:psy_rd=1.00,0.15:fast_pskip=0:deblock=0,0:

dct-decimate=0:threads=36:lookahead_threads=12:keyint=600:keyint_min=120:rc_lookahead=120:

sync_lookahead=120:qcomp=0.15:non-deterministic=1:qpmin=0:qpmax=30:qpstep=5:analyse=i4x4,i8x8:

chroma_qp_offset=-1:nr=1


Audio Defaults tab:

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


Thanks for the help.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Translation to ffmpeg of Handbrake (GUI) settings?

Tom Horsley
On Fri, 2 Mar 2018 18:39:25 +0000
Philip Courier wrote:

> from a bash scriptfile using 2 passes in ffmpeg.

I would love to know the command line args that correspond
to handbrake settings as well, but isn't there a command
line version of handbrake? I thought I remembered seeing
that there was a HandBrake and a HandBrake-gui as separate
packages in rpmfusion. If you just want to run it from a
script, perhaps the command line version would work.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Translation to ffmpeg of Handbrake (GUI) settings?

Carl Eugen Hoyos-2
In reply to this post by Philip Courier
2018-03-02 19:39 GMT+01:00, Philip Courier <[hidden email]>:

> 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.

Handbrake does not call ffmpeg, it uses its own code to
call the libaries, on top of that, it does not use FFmpeg.

> The ffmpeg supplied by dnf from rpmfusion-free is unusable, it gives the
> error message:
> ERROR: libx264 not found

Did you report this there?
Is it possible they are abusing the name FFmpeg to
provide something unusable?

> but the ffmpeg I compiled

(Other users provide binaries for download, see
our homepage.)

> (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

(Command line and complete, uncut console output missing. Both
are needed here.)
The mixed_refs flag was removed 2012 (!), there is a
mixed_refs option for the libx264 encoder.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Translation to ffmpeg of Handbrake (GUI) settings?

Joel Roth
In reply to this post by Philip Courier
Hi Philip,

Philip Courier wrote:
> The result from a 2-pass encode in Handbrake is splendid, but I would like to do the same encode
>
> The ffmpeg supplied by dnf from rpmfusion-free is unusable, it gives the error message:
> ERROR: libx264 not found
>
> but the ffmpeg I compiled
[fails to build]
(....)

I found a static ffmpeg build here:

https://www.johnvansickle.com/ffmpeg/

I'm not sure if it's been discussed on the list, but it
appears to meet my needs.

(....)
> 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:
(....)

I ported my compression workflow from handbrake-gui to
ffmpeg some time ago, however it was a somewhat painful
manual process of cross referencing. By documenting your
handbrake parameters, you've done the first half of the
work.

Now you just need to do the other half! I looked, and
found no easier solution than checking your
parameter list against the ffmpeg docs to find
corresponding options.

Have fun,

 
--
Joel Roth
 

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".