Handbrake stalls during encoding

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************

Please be aware we are now using GitHub for issue tracking and feature requests.

- This forum is now closed to new topics.
- Existing topics will remain open for a short while as the transition over occurs.
*******************************
Post Reply
gskidmark
Posts: 3
Joined: Fri Sep 09, 2016 4:36 pm

Handbrake stalls during encoding

Post by gskidmark » Fri Sep 09, 2016 4:56 pm

I am having frequent issues where Handbrake stalls out during encoding. Sometimes 50%, sometimes 97.59%. It just gets stuck and sits there and pretends its going to finish someday but never does.

I then have to go to ffmpeg to get the job done, which I would rather not need to do.

Handbrake 0.10.5 on Windows 7

Please include the scan or encode log: This did not finish. Only made it to 97.59%

Code: Select all

HandBrake 0.10.5.0 - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
Ram: 8110 MB, 
GPU Information:
  Intel(R) HD Graphics 4600 - 9.18.10.3234
Screen: 1920x1080
Temp Dir: C:\Users\user\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\user\AppData\Roaming\HandBrake Team\HandBrake\0.10.5.0

-------------------------------------------
CLI Query:  -i "C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4" -t 1 --angle 1 --start-at duration:1270 --stop-at duration:1514 -o "C:\Users\user\Desktop\2016-09-07_Franchise-Overview-STOP.m4v"  -f mp4  -w 1920 --crop 0:0:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 -r 10 --pfr -a 1 -E av_aac -6 mono -R Auto -B 96 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\user\AppData\Local\Temp\2016-09-07_Franchise-Overview-STOP-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[12:44:52] hb_init: starting libhb thread
HandBrake 0.10.5 (2016021100) - MinGW x86_64 - https://handbrake.fr
4 CPUs detected
Opening C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4...
[12:44:52] CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
[12:44:52]  - Intel microarchitecture Haswell
[12:44:52]  - logical processor count: 4
[12:44:52] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4600
[12:44:52]  - OpenCL version: 1.2 
[12:44:52]  - driver version: 9.18.10.3234
[12:44:52]  - device type:    GPU
[12:44:52]  - supported:      YES
[12:44:52] Intel Quick Sync Video support: yes
[12:44:52]  - Intel Media SDK hardware: API 1.7 (minimum: 1.3)
[12:44:52]  - H.264 encoder: yes
[12:44:52]     - preferred implementation: hardware (any)
[12:44:52]  - H.265 encoder: no
[12:44:52] hb_scan: path=C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4) failed
[12:44:52] 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
[12:44:52] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2016-09-07 15:56:13
  Duration: 00:55:52.32, start: 0.000000, bitrate: 139 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 1920x1080, 74 kb/s, 7.83 fps, 90k tbn (default)
    Stream #0.1(eng): Audio: aac, 16000 Hz, mono, fltp, 64 kb/s (default)
[12:44:52] scan: decoding previews for title 1
[12:44:52] scan: audio 0x1: aac, rate=16000Hz, bitrate=64027 English (AAC) (1.0 ch)
Scanning title 1 of 1, preview 8, 80.00 %[12:44:52] scan: 10 previews, 1920x1080, 5.037 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[12:44:52] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4
  + duration: 00:55:52
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 5.037 fps
  + autocrop: 0/0/0/0
  + support opencl: yes
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:55:52
  + audio tracks:
    + 1, English (AAC) (1.0 ch) (iso639-2: eng)
  + subtitle tracks:
Reading chapter markers from file C:\Users\user\AppData\Local\Temp\2016-09-07_Franchise-Overview-STOP-1-chapters.csv
[12:44:52] 1 job(s) to process
[12:44:52] starting job
[12:44:52] sync: expecting 7630 video frames
[12:44:52] work: only 1 chapter, disabling chapter markers
[12:44:52] job configuration:
[12:44:52]  * source
[12:44:52]    + C:\Users\user\Dropbox\IFPG DROPBOX SERVER\WEBINARS\WEEKLY WEBINARS\2016-09-07 Networking Techniques wB. King-Franchise Overview- STOP.mp4
[12:44:52]    + title 1, start 00:21:10.00 stop 00:46:24.00
[12:44:52]    + container: mov,mp4,m4a,3gp,3g2,mj2
[12:44:52]    + data rate: 139 kbps
[12:44:52]  * destination
[12:44:52]    + C:\Users\user\Desktop\2016-09-07_Franchise-Overview-STOP.m4v
[12:44:52]    + container: MPEG-4 (libavformat)
[12:44:52]  * video track
[12:44:52]    + decoder: h264
[12:44:52]      + bitrate 74 kbps
[12:44:52]    + filters
[12:44:52]      + Framerate Shaper (2:27000000:2700000)
[12:44:52]        + frame rate: 5.037 fps -> peak rate limited to 10.000 fps
[12:44:52]      + Crop and Scale (1920:1080:0:0:0:0)
[12:44:52]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[12:44:52]    + loose anamorphic
[12:44:52]      + storage dimensions: 1920 * 1080, mod 2
[12:44:52]      + pixel aspect ratio: 1 / 1
[12:44:52]      + display dimensions: 1920 * 1080
[12:44:52]    + encoder: H.264 (libx264)
[12:44:52]      + preset:  veryfast
[12:44:52]      + profile: main
[12:44:52]      + level:   4.0
[12:44:52]      + quality: 20.00 (RF)
[12:44:52]  * audio track 1
[12:44:52]    + decoder: English (AAC) (1.0 ch) (track 1, id 0x1)
[12:44:52]      + bitrate: 64 kbps, samplerate: 16000 Hz
[12:44:52]    + mixdown: Mono
[12:44:52]    + encoder: AAC (libavcodec)
[12:44:52]      + bitrate: 96 kbps, samplerate: 16000 Hz
[12:44:52] reader: first SCR 113310720 id 0x1 DTS 113310720
[12:44:52] encx264: min-keyint: 5, keyint: 50
[12:44:52] encx264: encoding at constant RF 20.000000
[12:44:52] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[12:44:52] sync: adding 8122 ms of silence to audio 0x1  start 731025, next 0
[12:44:52] sync: first pts is 996975

User avatar
s55
HandBrake Team
Posts: 9463
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake stalls during encoding

Post by s55 » Fri Sep 09, 2016 5:49 pm

Could you try a nightly build.

https://handbrake.fr/nightly.php

If that doesn't work, would you be willing to share a sample that reproduces this?

Moved to Bugs.

rollin_eng
Veteran User
Posts: 3100
Joined: Wed May 04, 2011 11:06 pm

Re: Handbrake stalls during encoding

Post by rollin_eng » Fri Sep 09, 2016 6:14 pm

Just out of curiosity what is your source and why are you encoding it?

gskidmark
Posts: 3
Joined: Fri Sep 09, 2016 4:36 pm

Re: Handbrake stalls during encoding

Post by gskidmark » Fri Sep 09, 2016 6:56 pm

The source is an MP4 file that is a webinar recording. Editing the in point to 00:21:10 and the out point to 00:46:24.

This is the source file:
https://www.dropbox.com/s/p4r8jb7g5y4zm ... P.mp4?dl=0

User avatar
s55
HandBrake Team
Posts: 9463
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake stalls during encoding

Post by s55 » Fri Sep 09, 2016 8:07 pm

Reproduced.

These kind of videos always cause problems and often appear to be non-soec complaint files too.
Either way, we can take a look see if anything can be done with it.

User avatar
s55
HandBrake Team
Posts: 9463
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake stalls during encoding

Post by s55 » Fri Sep 09, 2016 8:54 pm

OK, so I know your not going to believe me, but john just figured out if you lower the audio bit-rate, it errm, encodes the file.

Some really oddball bug in the aac encoder in libav.

Your source has AAC audio, so maybe I'd suggest trying AAC Passthru instead of re-encoding it.

rollin_eng
Veteran User
Posts: 3100
Joined: Wed May 04, 2011 11:06 pm

Re: Handbrake stalls during encoding

Post by rollin_eng » Fri Sep 09, 2016 9:14 pm

If you just need a section of the video it might be quicker and/or easier to find an editor that will cut out what you need rather than reencoding.

gskidmark
Posts: 3
Joined: Fri Sep 09, 2016 4:36 pm

Re: Handbrake stalls during encoding

Post by gskidmark » Mon Sep 12, 2016 2:23 pm

I tried the AAC Passthru and that did the trick! Thank you. I tried Aviddemux but it only lets you edit on keyframes and that doesn't work for me.

kpflugshaupt
Posts: 63
Joined: Sat Feb 06, 2010 8:00 pm

Re: Handbrake stalls during encoding

Post by kpflugshaupt » Tue Sep 13, 2016 8:56 am

gskidmark wrote:I tried the AAC Passthru and that did the trick! Thank you. I tried Aviddemux but it only lets you edit on keyframes and that doesn't work for me.
That's expected: If you want to cut without re-encoding, this is the only way to guarantee a clean start of the video. Otherwise, you'd get pixel garbage until the next key frame, as all in-between frames have differential information only.

So, if you need to cut exactly, re-encoding cannot be avoided (unless you get lucky and find a keyframe exactly where you need it).

mixels
Posts: 3
Joined: Sun Aug 18, 2013 5:04 pm

Re: Handbrake stalls during encoding

Post by mixels » Wed Sep 21, 2016 11:20 pm

Is there any way to work around this without using pass-thru? I'd rather not sacrifice the disk space to beat a bug. :/

User avatar
Rodeo
HandBrake Team
Posts: 12121
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake stalls during encoding

Post by Rodeo » Thu Sep 22, 2016 2:15 am

In the above case, you're re-encoding a 64 Kbps track to 96 Kbps, so using passthru will save space, not sacrifice it…

Post Reply