VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Can someone help understand this? I got some inconsistent size results from what should be a simple video conversion.

    Background:

    I have a script using handbrakeCLI 0.9.9 (named hbc99.exe in my script), to process a directory, converting any of 6 types of video file to .mkv files of the same size and quality (variable at my need) with avc video and aac audio. I was testing speed, when I discovered something weird. IT DOES NOT PRODUCE IDENTICAL RESULTS WHEN RUN MULTIPLE TIMES THE SAME FILE.

    The script and conversion command uses variables, but after substitutions looks like this:

    hbc99.exe -i "input.mp4" -t 1 -o ".\converted\input.mkv" -e x264 --x264-preset veryfast -q 24.5 -a 1 -E faac -6 dp12 -R Auto -B 128

    So, I took a 2 minute 20 second test clip from a 1280x720 Grimm episode:

    10/05/2012 10:50 PM 14,777,964 Grimm S02E06.mp4

    and ran the script 5 different times, saving the result off after each run. I expected to get an identical result. Instead, I got:

    09/08/2014 01:02 PM 11,914,189 Grimm S02E06 H1.mkv
    09/08/2014 01:04 PM 11,913,494 Grimm S02E06 H2.mkv
    09/08/2014 01:21 PM 11,914,280 Grimm S02E06 H3.mkv
    09/08/2014 01:37 PM 11,915,120 Grimm S02E06 H4.mkv
    09/08/2014 01:39 PM 11,914,042 Grimm S02E06 H5.mkv

    ALL slightly different sizes. Not very different, but why does HandbrakeCLI NEVER seem to produce the same result?

    FYI, the MediaInfo on all 5 files is identical (except for the 'uniqueid' and 'complete name' of course).

    Any thoughts or solutions? (I actually ran 5 more times and still never hit the exact size on any of them.)
    Quote Quote  
  2. Because of the way it's multithreadd x264 does not produce exactly the same output very time when multithreading is used. See the "non-deterministic" option.
    Quote Quote  
  3. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Ah, thanks. That makes sense. According to the MediaInfo report it used 4 threads. Must be its own choice since I don't tell it any different. Not a problem then, I guess. Learn something every day. I will look at the "non-deterministic" option.
    Quote Quote  
  4. x264 by default uses 1.5x then number of cores Windows reports.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!