VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Hi forum! I have been using MakeMKV on my DVD's for awhile now, and am ready to move on to the next phase of this project. I am looking to encode the MKV's using x264 on a headless Ubuntu server. I started testing using FFmpeg, but soon ran into trouble with interlacing, so I switched to HandBrakeCLI because of its decomb filter. Now I'm having trouble with HandBrake because it seems to require that I specify the audio and subtitle streams explicitly before encoding. Since my ultimate goal is to script or automate the encoding, I am a bit stuck.

    For reference, this is the command I use for FFmpeg:

    Code:
    ffmpeg -i source.mkv -map 0 -c copy -c:v libx264 -crf 22 -preset veryslow -tune film output.mkv
    And this is the command I use for HandBrakeCLI:
    Code:
    HandBrakeCLI \
    --input source.mkv \
    --format mkv \
    --markers \
    --decomb \
    --strict-anamorphic \
    --crop 0:0:0:0 \
    --encoder x264 \
    --h264-profile high \
    --h264-level "4.1" \
    --audio "1,2" \
    -E copy \
    --subtitle "1,2,3" \
    --quality 22 \
    --x264-preset veryslow \
    --x264-tune film \
    --output output.mkv
    I will tweak quality and tune as appropriate, but everything else is static. Note that I intentionally omitted "scan" from --subtitle.

    As you can see, my goal is to encode the video stream and leave the rest unmodified. So my first question is this: Does FFmpeg have a filter that does what the HandBrake decomber can do? My Google-fu says no. My second question is in HandBrakeCLI, is there a way to select all of the audio or subtitle streams without knowing in advance how many there are? My third question is if there isn't a way to select all the streams, is there a good way to obtain the stream count and pipe that into the HandBrakeCLI command?

    Yes, I know I can encode the video to an empty MKV and then mux the streams together, but I'd rather get it in one go if I can.

    Bonus question: FFmpeg does not have any anamorphic options - at least none that I use or have read about. Is the --strict-anamorphic option in HandBrakeCLI the functional equivilant of how FFmpeg works? If not, what are the animorphic settings to get HandBrakeCLI to mimic the behavior of FFmpeg? Presuming such settings exist, of course.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You can try ask in the handbrake forum, https://forum.handbrake.fr/ as I don't think that many here uses the cli version.
    Quote Quote  
  3. Thanks! I'll head over there and see what they have to say.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!