Wrong output length reported with Nightly Build CLI

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Wrong output length reported with Nightly Build CLI

Post by Shane »

When using the CLI Nightly Build I am getting erroneous video lengths reported on every video I have been converting recently when viewing it in VLC Player and Windows Media Player. It is also showing the wrong time when I click on the file properties in Windows and look at 'Details'.

The example in the log shows the length as 503:43:50 for this particular file that is actually 43:04. It was working fine but I can't remember if it started when I downloaded this last nightly build or not.

Here's the CL and Log:

Code: Select all

C:\hb>handbrakecli -i original.mp4 -o output.mkv --pad width=1920:height=1080 --custom-anamorphic --width 1333 --height 1000 --crop 0:0:0:0 --rate 29.970 --cfr --decomb 2 --no-detelecine --deblock 5 --no-grayscale --aencoder copy:aac --encoder x264 --encoder-preset medium --encoder-level 4.1 --quality 25 --encopts bluray-compat=1:vbv-maxrate=15000:vbv-bufsize=15000:keyint=24:open-gop=1:slices=4:colorprim=bt709:transfer=bt709:colormatrix=bt709
[00:18:21] hb_init: starting libhb thread
[00:18:21] thread 276b8e0 started ("libhb")
HandBrake 20160923192301-ee6c828-master (2016092501) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening original.mp4...
[00:18:21] CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
[00:18:21]  - Intel microarchitecture Skylake
[00:18:21]  - logical processor count: 8
[00:18:21] OpenCL: library not available
[00:18:21] Intel Quick Sync Video support: no
[00:18:21] hb_scan: path=original.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image original.mp4
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[00:18:21] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:18:21] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2015-11-16 06:18:42
  Duration: 00:43:04.21, start: 0.000000, bitrate: 461 kb/s
    Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 480x360 [PAR 1:1 DAR 4:3], 363 kb/s, 29.97 fps, 30k tbn, 59.94 tbc (default)
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      creation_time   : 2015-11-16 06:18:47
[00:18:21] scan: decoding previews for title 1
[00:18:21] scan: audio 0x1: aac, rate=44100Hz, bitrate=95999 Unknown (AAC) (2.0 ch)
[00:18:21] scan: 10 previews, 480x360, 29.970 fps, autocrop = 0/0/6/4, aspect 4:3, PAR 1:1
[00:18:21] scan: supported video decoders: avcodec qsv
[00:18:21] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: original.mp4
  + duration: 00:43:04
  + size: 480x360, pixel aspect: 1/1, display aspect: 1.33, 29.970 fps
  + autocrop: 0/0/6/4
  + support opencl: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:43:04
  + audio tracks:
    + 1, Unknown (AAC) (2.0 ch) (iso639-2: und)
  + subtitle tracks:
[00:18:21] 1 job(s) to process
[00:18:21] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 0,
                "DRC": 0.0,
                "Encoder": "copy:aac",
                "Mixdown": "none",
                "PresetEncoder": "copy:aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "ChapterList": [
            {
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "output.mkv",
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 1,
                    "rate": "27000000/900900"
                }
            },
            {
                "ID": 7,
                "Settings": {
                    "qp": "5"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1000,
                    "width": 1334
                }
            },
            {
                "ID": 14,
                "Settings": {
                    "height": "1080",
                    "width": "1920"
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 720,
        "Num": 853
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "original.mp4",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrixCode": 0,
        "Encoder": "x264",
        "Level": "4.1",
        "OpenCL": false,
        "Options": "bluray-compat=1:vbv-maxrate=15000:vbv-bufsize=15000:keyint=24:open-gop=1:slices=4:colorprim=bt709:transfer=bt709:colormatrix=bt709",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 25.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[00:18:21] starting job
[00:18:21] yadif thread started for segment 0
[00:18:21] yadif thread started for segment 1
[00:18:21] yadif thread started for segment 3
[00:18:21] yadif thread started for segment 4
[00:18:21] yadif thread started for segment 6
[00:18:21] yadif thread started for segment 7
[00:18:21] yadif thread started for segment 2
[00:18:21] yadif thread started for segment 5
[00:18:21] job configuration:
[00:18:21]  * source
[00:18:21]    + original.mp4
[00:18:21]    + title 1, chapter(s) 1 to 1
[00:18:21]    + container: mov,mp4,m4a,3gp,3g2,mj2
[00:18:21]    + data rate: 461 kbps
[00:18:21]  * destination
[00:18:21]    + output.mkv
[00:18:21]    + container: Matroska (libavformat)
[00:18:21]  * video track
[00:18:21]    + decoder: h264
[00:18:21]      + bitrate 363 kbps
[00:18:21]    + filters
[00:18:21]      + Decomb (mode=7)
[00:18:21]      + Framerate Shaper (mode=1:rate=27000000/900900)
[00:18:21]        + frame rate: 29.970 fps -> constant 29.970 fps
[00:18:21]      + Deblock (pp7) (qp=5)
[00:18:21]      + Crop and Scale (width=1334:height=1000:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[00:18:21]        + source: 480 * 360, crop (0/0/0/0): 480 * 360, scale: 1334 * 1000
[00:18:21]      + avfilter (pad='width=1920:y=(out_h-in_h)/2:height=1080:x=(out_w-in_w)/2')
[00:18:21]        + pad: width=1920, y=(out_h-in_h)/2, height=1080, x=(out_w-in_w)/2
[00:18:21]    + Output geometry
[00:18:21]      + storage dimensions: 1920 x 1080
[00:18:21]      + pixel aspect ratio: 853 : 720
[00:18:21]      + display dimensions: 2274 x 1080
[00:18:21]    + encoder: H.264 (libx264)
[00:18:21]      + preset:  medium
[00:18:21]      + options: bluray-compat=1:vbv-maxrate=15000:vbv-bufsize=15000:keyint=24:open-gop=1:slices=4:colorprim=bt709:transfer=bt709:colormatrix=bt709
[00:18:21]      + profile: auto
[00:18:21]      + level:   4.1
[00:18:21]      + quality: 25.00 (RF)
[00:18:21]  * audio track 1
[00:18:21]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[00:18:21]      + bitrate: 95 kbps, samplerate: 44100 Hz
[00:18:21]    + AAC Passthru
[00:18:21] sync: expecting 77449 video frames
[00:18:21] encx264: min-keyint: 30, keyint: 24
[00:18:21] encx264: encoding at constant RF 25.000000
[00:18:21] encx264: unparsed options: bluray-compat=1:vbv-maxrate=15000:keyint=24:slices=4:vbv-bufsize=15000:open-gop=1:transfer=bt709:colorprim=bt709:colormatrix=bt709:level=4.1
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile High, level 4.1
[00:18:21] sync: first pts video is 0
[00:18:21] sync: Chapter 1 at frame 1 time 0
[00:18:21] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 99.90 % (97.65 fps, avg 75.24 fps, ETA 00h00m01s)[00:35:29] reader: done. 1 scr changes
Encoding: task 1 of 1, 99.95 % (97.65 fps, avg 75.24 fps, ETA 00h00m01s)[00:35:31] work: average encoding speed for job is 75.239365 fps
Encoding: task 1 of 1, 99.95 % (97.65 fps, avg 75.24 fps, ETA 00h00m01s)[00:35:31] decomb: deinterlaced 77449 | blended 0 | unfiltered 0 | total 77449
[00:35:31] vfr: 77449 frames output, 0 dropped and 0 duped for CFR/PFR
[00:35:31] vfr: lost time: 0 (0 frames)
[00:35:31] vfr: gained time: 0 (0 frames) (0 not accounted for)
[00:35:31] aac-decoder done: 111293 frames, 0 decoder errors
[00:35:31] h264-decoder done: 77449 frames, 0 decoder errors
[00:35:31] sync: got 77449 frames, 77449 expected
[00:35:31] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x264 [info]: frame I:3948  Avg QP:20.31  size: 29732
x264 [info]: frame P:19405 Avg QP:23.45  size: 11361
x264 [info]: frame B:54096 Avg QP:25.58  size:  3196
x264 [info]: consecutive B-frames:  5.9%  2.1%  2.6% 89.4%
x264 [info]: mb I  I16..4: 23.4% 74.0%  2.6%
x264 [info]: mb P  I16..4:  5.3%  9.1%  0.1%  P16..4: 20.9%  4.7%  1.6%  0.0%  0.0%    skip:58.3%
x264 [info]: mb B  I16..4:  0.3%  0.4%  0.0%  B16..8: 16.5%  0.9%  0.1%  direct: 0.4%  skip:81.4%  L0:43.2% L1:54.3% BI: 2.5%
x264 [info]: 8x8 transform intra:68.7% inter:95.8%
x264 [info]: coded y,uvDC,uvAC intra: 27.2% 17.1% 1.5% inter: 3.1% 2.4% 0.0%
x264 [info]: i16 v,h,dc,p: 35% 24% 10% 32%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 14% 27%  3%  4%  4%  4%  4%  3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 19% 14%  4%  8%  7%  6%  4%  2%
x264 [info]: i8c dc,h,v,p: 81%  8%  9%  3%
x264 [info]: Weighted P-Frames: Y:2.4% UV:1.4%
x264 [info]: ref P L0: 82.7% 17.1%  0.3%
x264 [info]: ref B L0: 96.4%  3.6%
x264 [info]: ref B L1: 96.3%  3.7%
x264 [info]: kb/s:1581.15
[00:35:31] mux: track 0, 77449 frames, 510525208 bytes, 1580.42 kbps, fifo 4096
[00:35:31] mux: track 1, 111293 frames, 31010620 bytes, 96.00 kbps, fifo 4096
Muxing: this may take awhile...[00:35:31] libhb: work result = 0

Encode done!

HandBrake has exited.
I set decomb to 2. I don't know if this is a valid selection, I was just testing. But it will do this on every video no matter if I have decomb on/off or at 5.

The files will load properly and function normally in my bluray authoring software. But when played back on my PC, if the video has chapters, the chapters will not work and I cannot move the advance slider on my viewer. I can click on the chapter button in VLC but it just takes me back to the beginning of the video. Also, as the video is playing, the time marker never moves.

I've tried it in Windows Media Player and VLC and it does the same thing. It works in MPC-HC though and the output file works in everything if I use the HB GUI.

Any idears?

Thanks
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong output length reported with Nightly Build CLI

Post by JohnAStebbins »

Thanks for the report. I managed to reproduce it and reduce it to a minimal command line. It appears to be some issue with the pad filter as it can be reproduced with only the following. I'm looking into it.

Code: Select all

./HandBrakeCLI -i xxx.mp4 -o yyy.mkv --pad width=1920:height=1080
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong output length reported with Nightly Build CLI

Post by JohnAStebbins »

Found the problem. Should be fixed in the next nightly build https://git.io/vPT64
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: Wrong output length reported with Nightly Build CLI

Post by Shane »

Thank you!
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: Wrong output length reported with Nightly Build CLI

Post by Shane »

I wonder if something else was accidentally changed when this happened?

I am using the exact same CL's as I have always been, but now since this fix for the length error I have to use a different viewing mode on my TV to raise the height to normal during playback.

My TV has 3 picture size modes. Original, Mode 1, and Mode 2. I don't know the specifics, it doesn't say. But I do know that every conversion I've done prior to the fix in this thread I was able to leave my TV on 'Original'. Now I have to set it to 'Mode 2'.

When I put the file in my Bluray authoring software and select 16:9 it appears normal as it always did. It's not a big deal, but something has changed.

Is it possible to get the nightly build prior to when the time error happened?

Thanks.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong output length reported with Nightly Build CLI

Post by mduell »

Why don't you start with before/after encoding logs, and the logs from your BR authoring sw. Also screenshots of what differences you think you're seeing would be helpful.

You can compile from the git repo to reproduce any build you'd like.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: Wrong output length reported with Nightly Build CLI

Post by Shane »

mduell wrote:Why don't you start with before/after encoding logs, and the logs from your BR authoring sw. Also screenshots of what differences you think you're seeing would be helpful.

You can compile from the git repo to reproduce any build you'd like.
It works fine in the br authoring software. The only place I'm seeing a difference is when viewing it on my TV. I should have specified that I transfer the file on to a thumb drive and pop the that in to a usb port on my TV to check the video before burning it. Sorry for leaving that critical detail out.

Normally the converted files are fine with my tv set to 'Original' but since they fixed the time/length problem the videos display too short and I have to set my TV to 'Mode 2' now and it stretches them up to normal viewing size.

The 'before' log is listed above. I didn't think to save an 'after' log. But, all I did was copy/paste that CL listed above in to the new nightly build and now according to my TV the videos are coming out too short and I have to compensate for it via my TV . . . only when viewing from a non-authored source such as usb stick or blank disc that just has video files burned to it. That's the only time my TV allows you to alter the video size, otherwise it's locked if it's from an authored disc.

It's repeatable though. It happens every time. So if John or whoever sees this and wants to try and duplicate it, it happens every time. I'm in the middle of other stuff right now that is really frustrating me and I need to resolve that. If I get time I'll do another set of tests and post logs. I understand what you are saying though. Even though the CL did not change, something may be being processed differently and it will show that in the log.

I have no idea how to compile and don't have time to figure out how. I'm simply looking for the previous .exe download of the one before this length problem occurred. If not, I'll just keep using this and hit the button on my remote when playing from a usb stick.

Thanks.

Edit: Fixed quite a few typos. Sorry if it didn't make sense at first.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong output length reported with Nightly Build CLI

Post by mduell »

You can lead a horse to water, but you can't make it drink.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: Wrong output length reported with Nightly Build CLI

Post by Shane »

mduell wrote:You can lead a horse to water, but you can't make it drink.
:?:

If you are referring to the compiling thing, in several decades on the internet and dealing with PC's I have never had a need to do that, not once, and I do not intend to learn how now because of the way the Handbrake developers deal with their downloads. Trying to be objective though, I can completely understand why it's this way because of how quickly the Nightly Builds change.

If I had to take a guess as to why this is happening now I'd say it probably ties in with another post of mine asking why the GUI version shows one size when viewing the original file specs and I have to adjust that size when converting DVD's in the CLI version. If I had to take a semi-uneducated guess, it has something to do with that and a change that was made due to that conversation, but I don't know.

Thanks.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong output length reported with Nightly Build CLI

Post by mduell »

I wasn't.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: Wrong output length reported with Nightly Build CLI

Post by Shane »

mduell wrote:I wasn't.
When you have something constructive to add please do so otherwise keep your offensive inner monologue to yourself.

Some of us are here to learn, not be belittled and talked down to and I think I've bent over backwards at everyone's requests for specific logs and examples so I'm not quite sure why I'm getting the response I am.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong output length reported with Nightly Build CLI

Post by mduell »

Shane wrote:I think I've bent over backwards at everyone's requests for specific logs and examples so I'm not quite sure why I'm getting the response I am.
Weird, I don't see any in this thread since my most recent post asking for the information we need to help you.
Post Reply