Duration different after remuxing HandBrake encodes

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
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Duration different after remuxing HandBrake encodes

Post by david3 »

I've tried remuxing some of my HandBrake 0.9.5 encodes using mkvmerge 4.5.0. For one of my encodes, the duration of the remuxed version is 5 minutes longer than the original (1:37:46 remuxed vs. 1:32:24 original).

Both versions play ok with VLC 1.1.7 with no noticeable sync problems, except for the incorrect duration on the remuxed version. If you try to skip to a point beyond 1:32:24 on the remuxed version, it jumps back and won't let you, and when it gets to 1:32:24, it stops.

Any idea why remuxing the HandBrake encode would cause a problem with the duration? I tried re-encoding the DVD again using a constant frame rate of 29.97 with detelecine off, just in case the "same as source" variable frame rate or detelecining was causing problems, but it had no affect. The remuxed version still has an incorrect duration.

Remuxing other HandBrake encodes, I've also noticed sometimes the remuxed version is 1 second longer, too. Perhaps the same thing happening, but not as extreme.

Here's the mediainfo for the two files.

Original HandBrake Encode:

Code: Select all

General
Unique ID                        : 321502574637885978931605129116046164737 (0xF1DF24C0F4A60614DFFA1BF232198301)
Complete name                    : X:\movies\Action\Bandidas (2006) [dvd].mkv
Format                           : Matroska
File size                        : 1.41 GiB
Duration                         : 1h 32mn
Overall bit rate                 : 2 186 Kbps
Writing application              : HandBrake 0.9.5
Writing library                  : libmkv 0.6.4.1

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 32mn
Width                            : 712 pixels
Height                           : 342 pixels
Display aspect ratio             : 2.465
Original display aspect ratio    : 2.467
Frame rate mode                  : Variable
Frame rate                       : 29.970 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Writing library                  : x264 core 112
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                         : English
Color primaries                  : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics         : BT.709-5, BT.1361
Matrix coefficients              : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

Audio #1
ID                               : 2
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 3
Codec ID                         : A_MPEG/L3
Codec ID/Hint                    : MP3
Duration                         : 1h 32mn
Bit rate mode                    : Variable
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Writing library                  : LAME3.98
Language                         : English

Audio #2
ID                               : 3
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : A_AC3
Duration                         : 1h 32mn
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Stream size                      : 296 MiB (20%)
Language                         : English

Audio #3
ID                               : 4
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : A_AC3
Duration                         : 1h 32mn
Bit rate mode                    : Constant
Bit rate                         : 224 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Stream size                      : 148 MiB (10%)

Text
ID                               : 5
Format                           : VobSub
Codec ID                         : S_VOBSUB
Codec ID/Info                    : The same subtitle format used on DVDs
Language                         : English

Menu
00:00:00.000                     : Chapter 1
00:03:12.692                     : Chapter 2
00:10:54.654                     : Chapter 3
00:16:29.488                     : Chapter 4
00:19:14.153                     : Chapter 5
00:21:38.297                     : Chapter 6
00:26:46.104                     : Chapter 7
00:34:40.578                     : Chapter 8
00:35:15.613                     : Chapter 9
00:36:33.691                     : Chapter 10
00:38:13.791                     : Chapter 11
00:50:22.519                     : Chapter 12
00:53:52.762                     : Chapter 13
00:59:37.073                     : Chapter 14
01:01:02.158                     : Chapter 15
01:10:13.709                     : Chapter 16
01:12:12.328                     : Chapter 17
01:13:43.419                     : Chapter 18
01:15:20.015                     : Chapter 19
01:17:33.148                     : Chapter 20
01:22:24.439                     : Chapter 21
01:23:51.526                     : Chapter 22
01:25:38.133                     : Chapter 23
01:26:55.210                     : Chapter 24
Remuxed with mkvmerge:

Code: Select all

General
Unique ID                        : 231256159837927704112828024835754819000 (0xADFA50F96725EA5C8C2E387B331DFDB8)
Complete name                    : X:\movies\Action\Bandidas (2006) [dvd] (remux).mkv
Format                           : Matroska
File size                        : 1.40 GiB
Duration                         : 1h 37mn
Overall bit rate                 : 2 056 Kbps
Encoded date                     : UTC 2011-02-09 05:28:39
Writing application              : mkvmerge v4.5.0 ('Speed of Light') built on Feb  1 2011 02:10:32
Writing library                  : libebml v1.2.0 + libmatroska v1.1.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 37mn
Width                            : 712 pixels
Height                           : 342 pixels
Display aspect ratio             : 2.465
Original display aspect ratio    : 2.467
Frame rate mode                  : Variable
Frame rate                       : 29.970 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Writing library                  : x264 core 112
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                         : English
Color primaries                  : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics         : BT.709-5, BT.1361
Matrix coefficients              : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

Audio #1
ID                               : 2
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 3
Codec ID                         : A_MPEG/L3
Codec ID/Hint                    : MP3
Duration                         : 1h 37mn
Bit rate mode                    : Variable
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Writing library                  : LAME3.98
Language                         : English

Audio #2
ID                               : 3
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : A_AC3
Duration                         : 1h 37mn
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Stream size                      : 313 MiB (22%)
Language                         : English

Audio #3
ID                               : 4
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : A_AC3
Duration                         : 1h 37mn
Bit rate mode                    : Constant
Bit rate                         : 224 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Stream size                      : 157 MiB (11%)

Text
ID                               : 5
Format                           : VobSub
Muxing mode                      : zlib
Codec ID                         : S_VOBSUB
Codec ID/Info                    : The same subtitle format used on DVDs
Language                         : English

Menu
00:00:00.000                     : en:Chapter 1
00:03:12.692                     : en:Chapter 2
00:10:54.654                     : en:Chapter 3
00:16:29.488                     : en:Chapter 4
00:19:14.153                     : en:Chapter 5
00:21:38.297                     : en:Chapter 6
00:26:46.104                     : en:Chapter 7
00:34:40.578                     : en:Chapter 8
00:35:15.613                     : en:Chapter 9
00:36:33.691                     : en:Chapter 10
00:38:13.791                     : en:Chapter 11
00:50:22.519                     : en:Chapter 12
00:53:52.762                     : en:Chapter 13
00:59:37.073                     : en:Chapter 14
01:01:02.158                     : en:Chapter 15
01:10:13.709                     : en:Chapter 16
01:12:12.328                     : en:Chapter 17
01:13:43.419                     : en:Chapter 18
01:15:20.015                     : en:Chapter 19
01:17:33.148                     : en:Chapter 20
01:22:24.439                     : en:Chapter 21
01:23:51.526                     : en:Chapter 22
01:25:38.133                     : en:Chapter 23
01:26:55.210                     : en:Chapter 24
And here's the HandBrake log for the encode.

Code: Select all

# Windows GUI 0.9.5 2011010300
# Running: Microsoft Windows NT 6.0.6002 Service Pack 2
# CPU: AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55
# Ram: 3070 MB
# Screen: 1680x1050
# Temp Dir: C:\Users\david\AppData\Local\Temp\
# Install Dir: C:\Program Files\Handbrake
# Data Dir: C:\Users\david\AppData\Roaming\HandBrake\HandBrake\0.9.5.3728

# CLI Query:  -i "X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS" -t 2 -c 1-24 -o "X:\movies-new\Bandidas (2006) [dvd].mkv"  -f mkv --detelecine --decomb --crop 68:70:4:4 --strict-anamorphic  -e x264 -q 20 -a 1,1,3 -E lame,copy:ac3,copy:ac3 -6 dpl2,auto,auto -R Auto,Auto,Auto -B 256,auto,auto -D 0,0,0 --subtitle scan,1 --subtitle-forced=1 --subtitle-default=1 --markers="C:\Users\david\AppData\Local\Temp\Bandidas (2006) [dvd]-2-chapters.csv" -x b-adapt=2:rc-lookahead=50 --verbose=1
# User Query: False
-------------------------------------------

[19:42:42] hb_init: checking cpu count
[19:42:42] hb_init: starting libhb thread
HandBrake 0.9.5 (2011010300) - MinGW i386 - http://handbrake.fr
2 CPUs detected
Opening X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS...
[19:42:42] hb_scan: path=X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS, title_index=2
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS) failed (0x2c3c40)
[19:42:42] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
NAME OPEN FAILED
libdvdnav: Unable to find home directorylibdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[19:42:42] scan: DVD has 4 title(s)
[19:42:42] scan: scanning title 2
[19:42:42] scan: opening IFO for VTS 2
[19:42:42] scan: duration is 01:32:19 (5539010 ms)
[19:42:42] pgc_id: 1, pgn: 1: pgc: 0x2c7760
[19:42:42] scan: vts=2, ttn=1, cells=0->23, blocks=0->2369761, 2369762 blocks
[19:42:42] scan: checking audio 1
[19:42:42] scan: id=80bd, lang=English (AC3), 3cc=eng ext=0
[19:42:42] scan: checking audio 2
[19:42:42] scan: id=81bd, lang=Espanol (AC3), 3cc=spa ext=0
[19:42:42] scan: checking audio 3
[19:42:42] scan: id=82bd, lang=Unknown (AC3), 3cc=und ext=0
[19:42:42] scan: checking subtitle 1
[19:42:42] scan: id=21bd, lang=English, 3cc=eng
[19:42:42] scan: checking subtitle 2
[19:42:42] scan: id=23bd, lang=Espanol, 3cc=spa
[19:42:42] scan: title 2 has 24 chapters
[19:42:42] scan: chap 1 c=0->0, b=0->81331 (81332), 192199 ms
[19:42:42] scan: chap 2 c=1->1, b=81332->280024 (198693), 461391 ms
[19:42:42] scan: chap 3 c=2->2, b=280025->423407 (143383), 334332 ms
[19:42:42] scan: chap 4 c=3->3, b=423408->494356 (70949), 164252 ms
[19:42:42] scan: chap 5 c=4->4, b=494357->555332 (60976), 144067 ms
[19:42:42] scan: chap 6 c=5->5, b=555333->687821 (132489), 307319 ms
[19:42:42] scan: chap 7 c=6->6, b=687822->891046 (203225), 474221 ms
[19:42:42] scan: chap 8 c=7->7, b=891047->905250 (14204), 35016 ms
[19:42:42] scan: chap 9 c=8->8, b=905251->938533 (33283), 78036 ms
[19:42:42] scan: chap 10 c=9->9, b=938534->982156 (43623), 100046 ms
[19:42:42] scan: chap 11 c=10->10, b=982157->1294451 (312295), 728340 ms
[19:42:42] scan: chap 12 c=11->11, b=1294452->1384100 (89649), 210098 ms
[19:42:42] scan: chap 13 c=12->12, b=1384101->1532271 (148171), 344161 ms
[19:42:42] scan: chap 14 c=13->13, b=1532272->1567780 (35509), 85039 ms
[19:42:42] scan: chap 15 c=14->14, b=1567781->1804136 (236356), 551257 ms
[19:42:42] scan: chap 16 c=15->15, b=1804137->1856035 (51899), 118231 ms
[19:42:42] scan: chap 17 c=16->16, b=1856036->1894486 (38451), 91042 ms
[19:42:42] scan: chap 18 c=17->17, b=1894487->1935715 (41229), 96221 ms
[19:42:42] scan: chap 19 c=18->18, b=1935716->1993478 (57763), 133062 ms
[19:42:42] scan: chap 20 c=19->19, b=1993479->2117835 (124357), 291136 ms
[19:42:42] scan: chap 21 c=20->20, b=2117836->2154682 (36847), 87040 ms
[19:42:42] scan: chap 22 c=21->21, b=2154683->2200594 (45912), 106225 ms
[19:42:42] scan: chap 23 c=22->22, b=2200595->2233886 (33292), 77036 ms
[19:42:42] scan: chap 24 c=23->23, b=2233887->2369761 (135875), 329230 ms
[19:42:42] scan: aspect = 0
[19:42:42] scan: decoding previews for title 2
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[19:42:42] scan: title angle(s) 1
[19:42:42] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[19:42:42] scan: audio 0x82bd: AC-3, rate=48000Hz, bitrate=224000 Unknown (AC3) (2.0 ch)
[19:42:42] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 Espanol (AC3) (2.0 ch)
Scanning title 2...
Scanning title 2...
Scanning title 2...
[19:42:43] scan: 10 previews, 720x480, 29.970 fps, autocrop = 64/68/0/2, aspect 16:9, PAR 32:27
[19:42:43] scan: title (0) job->width:720, job->height:288
[19:42:43] libhb: scan thread found 1 valid title(s)
+ title 2:
  + vts 2, ttn 1, cells 0->23 (2369762 blocks)
  + duration: 01:32:19
  + size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 29.970 fps
  + autocrop: 64/68/0/2
  + chapters:
    + 1: cells 0->0, 81332 blocks, duration 00:03:12
    + 2: cells 1->1, 198693 blocks, duration 00:07:41
    + 3: cells 2->2, 143383 blocks, duration 00:05:34
    + 4: cells 3->3, 70949 blocks, duration 00:02:44
    + 5: cells 4->4, 60976 blocks, duration 00:02:24
    + 6: cells 5->5, 132489 blocks, duration 00:05:07
    + 7: cells 6->6, 203225 blocks, duration 00:07:54
    + 8: cells 7->7, 14204 blocks, duration 00:00:35
    + 9: cells 8->8, 33283 blocks, duration 00:01:18
    + 10: cells 9->9, 43623 blocks, duration 00:01:40
    + 11: cells 10->10, 312295 blocks, duration 00:12:08
    + 12: cells 11->11, 89649 blocks, duration 00:03:30
    + 13: cells 12->12, 148171 blocks, duration 00:05:44
    + 14: cells 13->13, 35509 blocks, duration 00:01:25
    + 15: cells 14->14, 236356 blocks, duration 00:09:11
    + 16: cells 15->15, 51899 blocks, duration 00:01:58
    + 17: cells 16->16, 38451 blocks, duration 00:01:31
    + 18: cells 17->17, 41229 blocks, duration 00:01:36
    + 19: cells 18->18, 57763 blocks, duration 00:02:13
    + 20: cells 19->19, 124357 blocks, duration 00:04:51
    + 21: cells 20->20, 36847 blocks, duration 00:01:27
    + 22: cells 21->21, 45912 blocks, duration 00:01:46
    + 23: cells 22->22, 33292 blocks, duration 00:01:17
    + 24: cells 23->23, 135875 blocks, duration 00:05:29
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 2, Espanol (AC3) (2.0 ch) (iso639-2: spa), 48000Hz, 192000bps
    + 3, Unknown (AC3) (2.0 ch) (iso639-2: und), 48000Hz, 224000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, Espanol (iso639-2: spa) (Bitmap)(VOBSUB)
Reading chapter markers from file C:\Users\david\AppData\Local\Temp\Bandidas (2006) [dvd]-2-chapters.csv
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[19:42:43] 2 job(s) to process
[19:42:43] starting job
[19:42:43] sync: expecting 166034 video frames
[19:42:43] job configuration:
[19:42:43]  * source
[19:42:43]    + X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS
[19:42:43]    + title 2, chapter(s) 1 to 24
[19:42:43]  * destination
[19:42:43]    + X:\movies-new\Bandidas (2006) [dvd].mkv
[19:42:43]    + container: Matroska (.mkv)
[19:42:43]      + chapter markers
[19:42:43]  * video track
[19:42:43]    + decoder: mpeg2
[19:42:43]      + bitrate 8000 kbps
[19:42:43]    + frame rate: same as source (around 29.970 fps)
[19:42:43]    + strict anamorphic
[19:42:43]      + storage dimensions: 720 * 480 -> 712 * 342, crop 68/70/4/4, mod 0
[19:42:43]      + pixel aspect ratio: 32 / 27
[19:42:43]      + display dimensions: 843 * 342
[19:42:43]    + filters
[19:42:43]      + Detelecine (pullup) (default settings)
[19:42:43]      + Decomb (default settings)
[19:42:43]  * subtitle track 1, English (id 21bd) Picture [VOBSUB] -> Foreign Audio Search
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[19:42:43] decomb thread started for segment 1
[19:42:43] yadif thread started for segment 1
[19:42:43] yadif thread started for segment 0
NAME OPEN FAILED
libdvdnav: Unable to find home directorylibdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[19:42:43] decomb thread started for segment 0
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[19:45:38] reader: done. 1 scr changes
[19:45:38] work: average encoding speed for job is 0.000000 fps
[19:45:39] mpeg2 done: 0 frames
[19:45:39] render: lost time: 0 (0 frames)
[19:45:39] render: gained time: 0 (0 frames) (0 not accounted for)
[19:45:39] Subtitle stream 0x21bd 'English': 1931 hits (0 forced)
[19:45:39] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[19:45:39] starting job
[19:45:39] sync: expecting 166034 video frames
[ac3 @ 0x38cb0f0] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[ac3 @ 0x38cb0f0] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[19:45:39] job configuration:
[19:45:39]  * source
[19:45:39]    + X:\movies-temp2\Bandidas (2006) [dvd]\BANDIDAS
[19:45:39]    + title 2, chapter(s) 1 to 24
[19:45:39]  * destination
[19:45:39]    + X:\movies-new\Bandidas (2006) [dvd].mkv
[19:45:39]    + container: Matroska (.mkv)
[19:45:39]      + chapter markers
[19:45:39]  * video track
[19:45:39]    + decoder: mpeg2
[19:45:39]      + bitrate 8000 kbps
[19:45:39]    + frame rate: same as source (around 29.970 fps)
[19:45:39]    + strict anamorphic
[19:45:39]      + storage dimensions: 720 * 480 -> 712 * 342, crop 68/70/4/4, mod 0
[19:45:39]      + pixel aspect ratio: 32 / 27
[19:45:39]      + display dimensions: 843 * 342
[19:45:39]    + filters
[19:45:39]      + Detelecine (pullup) (default settings)
[19:45:39]      + Decomb (default settings)
[19:45:39]    + encoder: x264
[19:45:39]      + options: b-adapt=2:rc-lookahead=50
[19:45:39]      + quality: 20.00 (RF)
[19:45:39]  * subtitle track 1, English (id 21bd) Picture [VOBSUB] -> Pass-Through
[19:45:39]  * audio track 0
[19:45:39]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[19:45:39]      + bitrate: 448 kbps, samplerate: 48000 Hz
[19:45:39]    + mixdown: Dolby Pro Logic II
[19:45:39]    + encoder: lame
[19:45:39]      + bitrate: 256 kbps, samplerate: 48000 Hz
[19:45:39]  * audio track 1
[19:45:39]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[19:45:39]      + bitrate: 448 kbps, samplerate: 48000 Hz
[19:45:39]    + AC3 passthrough
[19:45:39]  * audio track 2
[19:45:39]    + decoder: Unknown (AC3) (2.0 ch) (track 3, id 82bd)
[19:45:39]      + bitrate: 224 kbps, samplerate: 48000 Hz
[19:45:39]    + AC3 passthrough
libdvdnav: Using dvdnav version 4.1.3
[19:45:39] encx264: min-keyint: auto (29), keyint: 300
[19:45:39] encx264: encoding with stored aspect 32/27
[19:45:39] encx264: Encoding at constant RF 20.000000
[19:45:39] yadif thread started for segment 0
x264 [info]: using SAR=32/27
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[19:45:39] decomb thread started for segment 0
NAME OPEN FAILED
libdvdnav: Unable to find home directorylibdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[19:45:39] yadif thread started for segment 1
[19:45:39] decomb thread started for segment 1
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
[19:45:39] reader: first SCR 146 id 224 DTS 31890
[19:45:39] mpeg2: "Chapter 1" (1) at frame 0 time 3003
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[19:45:39] enclame: opening libmp3lame
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[19:55:30] mpeg2: "Chapter 2" (2) at frame 5775 time 17345334
[20:25:39] mpeg2: "Chapter 3" (3) at frame 19620 time 58921869
[20:44:59] mpeg2: "Chapter 4" (4) at frame 29655 time 89056974
[20:55:55] mpeg2: "Chapter 5" (5) at frame 34590 time 103876779
[21:04:10] mpeg2: "Chapter 6" (6) at frame 38910 time 116849739
[21:21:55] mpeg2: "Chapter 7" (7) at frame 48135 time 144552414
[21:47:02] mpeg2: "Chapter 8" (8) at frame 62355 time 187255074
[21:48:34] mpeg2: "Chapter 9" (9) at frame 63405 time 190408224
[21:52:06] mpeg2: "Chapter 10" (10) at frame 65745 time 197435244
[21:57:42] mpeg2: "Chapter 11" (11) at frame 68745 time 206444244
[22:55:27] mpeg2: "Chapter 12" (12) at frame 90585 time 272029764
[23:20:01] mpeg2: "Chapter 13" (13) at frame 96885 time 290948664
[23:47:41] mpeg2: "Chapter 14" (14) at frame 107205 time 321939624
[23:51:49] mpeg2: "Chapter 15" (15) at frame 109755 time 329597274
[00:19:52] mpeg2: "Chapter 16" (16) at frame 126285 time 379236864
[00:27:26] mpeg2: "Chapter 17" (17) at frame 129840 time 389912529
[00:32:21] mpeg2: "Chapter 18" (18) at frame 132570 time 398110719
[00:36:48] mpeg2: "Chapter 19" (19) at frame 135465 time 406804404
[00:44:06] mpeg2: "Chapter 20" (20) at frame 139455 time 418786374
[01:00:42] mpeg2: "Chapter 21" (21) at frame 148185 time 445002564
[01:04:32] mpeg2: "Chapter 22" (22) at frame 150795 time 452840394
[01:08:58] mpeg2: "Chapter 23" (23) at frame 153990 time 462434979
[01:13:12] mpeg2: "Chapter 24" (24) at frame 156300 time 469371909
[01:26:01] reader: done. 1 scr changes
[01:26:04] work: average encoding speed for job is 8.135538 fps
[01:26:04] sync: got 166180 frames, 166034 expected
[01:26:04] mpeg2 done: 166180 frames
[01:26:04] render: lost time: 12453441 (4147 frames)
[01:26:04] render: gained time: 12453441 (15686 frames) (0 not accounted for)
[01:26:04] render: average dropped frame duration: 3003
x264 [info]: frame I:1748  Avg QP:17.86  size: 29111  PSNR Mean Y:46.31 U:48.91 V:49.33 Avg:47.03 Global:46.70
x264 [info]: frame P:46822 Avg QP:20.66  size: 10042  PSNR Mean Y:44.13 U:47.09 V:47.68 Avg:44.80 Global:44.23
x264 [info]: frame B:113462 Avg QP:23.57  size:  3057  PSNR Mean Y:42.46 U:46.35 V:46.99 Avg:43.39 Global:42.87
x264 [info]: consecutive B-frames:  1.8%  4.3% 21.1% 72.8%
x264 [info]: mb I  I16..4:  7.3% 61.0% 31.7%
x264 [info]: mb P  I16..4:  2.0% 11.4%  3.1%  P16..4: 42.0% 20.0% 11.4%  0.0%  0.0%    skip:10.2%
x264 [info]: mb B  I16..4:  0.2%  1.5%  0.4%  B16..8: 38.3%  5.8%  1.5%  direct: 6.9%  skip:45.4%  L0:39.5% L1:48.5% BI:12.0%
x264 [info]: 8x8 transform intra:68.2% inter:66.3%
x264 [info]: coded y,uvDC,uvAC intra: 78.0% 84.0% 50.1% inter: 26.1% 28.4% 2.3%
x264 [info]: i16 v,h,dc,p: 36% 17%  7% 40%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 15% 13%  5%  7%  9%  7%  8%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 14% 11%  5%  8%  9%  7%  7%  5%
x264 [info]: i8c dc,h,v,p: 45% 19% 26% 10%
x264 [info]: Weighted P-Frames: Y:7.5% UV:4.8%
x264 [info]: ref P L0: 53.5% 15.2% 22.4%  8.3%  0.6%
x264 [info]: ref B L0: 83.6% 12.5%  3.8%
x264 [info]: ref B L1: 94.4%  5.6%
x264 [info]: SSIM Mean Y:0.9805612 (17.113db)
x264 [info]: PSNR Mean Y:42.984 U:46.596 V:47.216 Avg:43.836 Global:43.248 kb/s:1252.17
[01:26:04] mux: track 0, 162032 frames, 867814091 bytes, 1252.06 kbps, fifo 16
[01:26:04] mux: track 1, 231015 frames, 170642352 bytes, 246.20 kbps, fifo 256
[01:26:04] mux: track 2, 173261 frames, 310483712 bytes, 447.96 kbps, fifo 256
[01:26:04] mux: track 3, 173258 frames, 155239168 bytes, 223.98 kbps, fifo 256
[01:26:04] mux: track 4, 1450 frames, 2614618 bytes, 3.77 kbps, fifo 8
[01:26:04] decomb: deinterlaced 77533 | blended 22282 | unfiltered 62217 | total 162032
[01:26:04] libhb: work result = 0
Rip done!
HandBrake has exited.
Deleted User 11865

Re: Duration different after remuxing HandBrake encodes

Post by Deleted User 11865 »

I can't reproduce this with any of my HandBrake encodes (mkvmerge 4.5.0 under OS X).
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Duration different after remuxing HandBrake encodes

Post by david3 »

I think it has something to do with the vobsub subtitle track. If I leave it out when I remux, the duration is correct. I'm not sure why, though.
Deleted User 11865

Re: Duration different after remuxing HandBrake encodes

Post by Deleted User 11865 »

One of the encodes I tested had several VOBSUB tracks too, FWIW.
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Duration different after remuxing HandBrake encodes

Post by david3 »

Thanks for checking.

The subtitles play in sync in both the original and remuxed versions, and looking at the end of the vobsub idx, it looks ok (the timestamps aren't out of range):

timestamp: 01:26:48:203, filepos: 0003c4800
timestamp: 01:26:55:143, filepos: 0003c5000

If I extract the vobsub using mkvextract, or get the original vobsub from the dvd, and use the result for the vobsub when I remux, the duration gets even longer: 1:39:15 (vs. 1:32:24 or 1:37:46). It also still plays in sync, even though the duration is incorrect.
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Duration different after remuxing HandBrake encodes

Post by david3 »

I opened the vobsub file with SubtitleCreator and checked the "show" and "hide" times, and found one with an incorrect "hide" time past the end of the movie. I also found what looked like many duplicate subtitles with 00:00:00 "hide" times that I deleted. I exported the corrected subtitles and used those for remuxing, and the duration was correct. So it looks like the issue was a bad vobsub. I'm not sure why it only became a problem after remuxing, though.

I also took a look at one of the encodes where the remuxed version has a duration +1 second. For the one I looked at, it was the main mp3 audio track (downmixed by HandBrake) that was causing the problem. When I removed it, the duration was correct. I'm not sure how to fix that, though.
Post Reply