encode stretching time by ratio of 1000/999

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
wgf_bean
Posts: 29
Joined: Thu May 09, 2013 6:32 pm

encode stretching time by ratio of 1000/999

Post by wgf_bean »

As an example of what I'm seeing, I load a dvd folder. The duration shows 1:59:00.333.

I then encode the file to h.264. If I then load this file to check it's duration I get 1:59:07.539 which has stretched the duration suspiciously by about 1000/999.

Using tsMuxer I look at one of the VOB files and it shows 720:480i, Frame rate 29.97 (pulldown).

Looking at the output file tsMuxer shows 720:480p Frame rate 23.976.

Is this normal? I'm running an old build: svn5945 (Nightly Build) on a Win 7 64 machine.
Deleted User 13735

Re: encode stretching time by ratio of 1000/999

Post by Deleted User 13735 »

Encode log required.
wgf_bean
Posts: 29
Joined: Thu May 09, 2013 6:32 pm

Re: encode stretching time by ratio of 1000/999

Post by wgf_bean »

HandBrake svn5945 (Nightly Build) - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
Ram: 16281 MB,
GPU Information:
Intel(R) HD Graphics 4000 - 9.17.10.2932
Screen: 1920x1080
Temp Dir: C:\Users\Bob\AppData\Local\Temp\
Install Dir: C:\Program Files (x86)\Handbrake
Data Dir: C:\Users\Bob\AppData\Roaming\HandBrake\HandBrake\0.0.0.5945

-------------------------------------------

CLI Query: -i "F:\All\Movies 5\Captain Blood (1935)" -t 1 --angle 1 -c 1-32 -o "J:\HandBrake\Captain Blood (1935)-cq20.mkv" -f mkv --decomb -w 720 --crop 0:0:0:0 --loose-anamorphic --modulus 16 -e x264 -q 20 --cfr -a 1 -E copy -6 auto -R Auto -B 0 -D 0 --gain 0 --audio-fallback ac3 --subtitle 4 --markers="C:\Users\Bob\AppData\Local\Temp\Captain Blood (1935)-cq20-1-chapters.csv" --x264-preset=veryslow --h264-level="4.1" --h264-profile=high --verbose=1

[10:02:12] hb_init: starting libhb thread
HandBrake svn5943 (2013122901) - MinGW x86_64 - http://handbrake.fr
4 CPUs detected
Opening F:\All\Movies 5\Captain Blood (1935)...
[10:02:12] CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
[10:02:12] - Intel microarchitecture Ivy Bridge
[10:02:12] - logical processor count: 4
[10:02:12] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4000
[10:02:12] - OpenCL version: 1.1
[10:02:12] - driver version: 9.17.10.2932
[10:02:12] - device type: GPU
[10:02:12] - supported: no
[10:02:12] Intel Quick Sync Video support: yes
[10:02:12] - Intel Media SDK hardware: API 1.4 (minimum: 1.3)
[10:02:12] - Preferred implementation: hardware (any)
[10:02:12] hb_scan: path=F:\All\Movies 5\Captain Blood (1935), title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening F:\All\Movies 5\Captain Blood (1935)/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening F:\All\Movies 5\Captain Blood (1935)/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:1725: nav_get_title_list(F:\All\Movies 5\Captain Blood (1935)) failed (0000000001bf8fd0)
[10:02:12] 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.
[10:02:12] scan: DVD has 16 title(s)
[10:02:12] scan: scanning title 1
[10:02:12] scan: opening IFO for VTS 1
[10:02:13] scan: duration is 01:59:00 (7140333 ms)
[10:02:13] pgc_id: 1, pgn: 1: pgc: 0000000001BFD830
[10:02:13] scan: vts=1, ttn=1, cells=0->32, blocks=7->2674435, 2619440 blocks
[10:02:13] scan: checking audio 1
[10:02:13] scan: id=0x80bd, lang=English (AC3), 3cc=eng ext=0
[10:02:13] scan: checking audio 2
[10:02:13] scan: id=0x81bd, lang=Francais (AC3), 3cc=fra ext=0
[10:02:13] scan: checking audio 3
[10:02:13] scan: audio channel is not active
[10:02:13] scan: checking subtitle 1
[10:02:13] scan: id=0x20bd, lang=English, 3cc=eng ext=0
[10:02:13] scan: checking subtitle 2
[10:02:13] scan: id=0x21bd, lang=Francais, 3cc=fra ext=0
[10:02:13] scan: checking subtitle 3
[10:02:13] scan: id=0x22bd, lang=Espanol, 3cc=spa ext=0
[10:02:13] scan: title 1 has 32 chapters
[10:02:13] scan: chap 1 c=0->0, b=7->46197 (46191), 102400 ms
[10:02:13] scan: chap 2 c=1->1, b=46198->144301 (98104), 290333 ms
[10:02:13] scan: chap 3 c=2->2, b=144302->268496 (124195), 360867 ms
[10:02:13] scan: chap 4 c=3->3, b=268497->331249 (62753), 174300 ms
[10:02:13] scan: chap 5 c=4->4, b=331250->464294 (133045), 316667 ms
[10:02:13] scan: chap 6 c=5->5, b=464295->516699 (52405), 140166 ms
[10:02:13] scan: chap 7 c=6->6, b=516700->591776 (75077), 217867 ms
[10:02:13] scan: chap 8 c=7->7, b=591777->715376 (123600), 350633 ms
[10:02:13] scan: chap 9 c=8->8, b=715377->770564 (55188), 159000 ms
[10:02:13] scan: chap 10 c=9->9, b=770565->869554 (98990), 246367 ms
[10:02:13] scan: chap 11 c=10->10, b=869555->945239 (75685), 205967 ms
[10:02:13] scan: chap 12 c=11->11, b=945240->1008891 (63652), 188533 ms
[10:02:13] scan: chap 13 c=12->12, b=1008892->1064748 (55857), 161333 ms
[10:02:13] scan: chap 14 c=13->13, b=1064749->1125737 (60989), 177633 ms
[10:02:13] scan: chap 15 c=14->14, b=1125738->1188408 (62671), 183834 ms
[10:02:13] scan: chap 16 c=15->15, b=1188409->1265205 (76797), 179000 ms
[10:02:13] scan: chap 17 c=16->16, b=1265206->1381486 (116281), 306200 ms
[10:02:13] scan: chap 18 c=17->18, b=1381487->1518778 (82303), 227333 ms
[10:02:13] scan: chap 19 c=19->19, b=1518779->1563666 (44888), 120800 ms
[10:02:13] scan: chap 20 c=20->20, b=1563667->1621079 (57413), 171000 ms
[10:02:13] scan: chap 21 c=21->21, b=1621080->1718960 (97881), 275667 ms
[10:02:13] scan: chap 22 c=22->22, b=1718961->1826800 (107840), 291367 ms
[10:02:13] scan: chap 23 c=23->23, b=1826801->1903823 (77023), 218800 ms
[10:02:13] scan: chap 24 c=24->24, b=1903824->1985051 (81228), 195500 ms
[10:02:13] scan: chap 25 c=25->25, b=1985052->2035998 (50947), 149667 ms
[10:02:13] scan: chap 26 c=26->26, b=2035999->2114331 (78333), 231700 ms
[10:02:13] scan: chap 27 c=27->27, b=2114332->2167052 (52721), 156633 ms
[10:02:13] scan: chap 28 c=28->28, b=2167053->2240455 (73403), 216500 ms
[10:02:13] scan: chap 29 c=29->29, b=2240456->2325580 (85125), 243700 ms
[10:02:13] scan: chap 30 c=30->30, b=2325581->2439555 (113975), 286467 ms
[10:02:13] scan: chap 31 c=31->31, b=2439556->2590029 (150474), 355834 ms
[10:02:13] scan: chap 32 c=32->32, b=2590030->2674435 (84406), 238266 ms
[10:02:13] scan: aspect = 1.33333
[10:02:13] scan: decoding previews for title 1
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdnav: Language 'en' not found, using 'ÿÿ' instead
libdvdnav: Menu Languages available: ÿÿ
[10:02:13] scan: title angle(s) 1
[10:02:13] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 Francais (AC3) (1.0 ch)
[10:02:13] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=192000 English (AC3) (1.0 ch)
Scanning title 1 of 1, preview 10, 100.00 %[10:02:13] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 8:9
[10:02:13] libhb: scan thread found 1 valid title(s)
+ title 1:
+ vts 1, ttn 1, cells 0->32 (2619440 blocks)
+ duration: 01:59:00
+ size: 720x480, pixel aspect: 8/9, display aspect: 1.33, 23.976 fps
+ autocrop: 0/0/0/0
+ support opencl: no
+ support hwd: no
+ chapters:
+ 1: cells 0->0, 46191 blocks, duration 00:01:42
+ 2: cells 1->1, 98104 blocks, duration 00:04:50
+ 3: cells 2->2, 124195 blocks, duration 00:06:01
+ 4: cells 3->3, 62753 blocks, duration 00:02:54
+ 5: cells 4->4, 133045 blocks, duration 00:05:17
+ 6: cells 5->5, 52405 blocks, duration 00:02:20
+ 7: cells 6->6, 75077 blocks, duration 00:03:38
+ 8: cells 7->7, 123600 blocks, duration 00:05:51
+ 9: cells 8->8, 55188 blocks, duration 00:02:39
+ 10: cells 9->9, 98990 blocks, duration 00:04:06
+ 11: cells 10->10, 75685 blocks, duration 00:03:26
+ 12: cells 11->11, 63652 blocks, duration 00:03:09
+ 13: cells 12->12, 55857 blocks, duration 00:02:41
+ 14: cells 13->13, 60989 blocks, duration 00:02:58
+ 15: cells 14->14, 62671 blocks, duration 00:03:04
+ 16: cells 15->15, 76797 blocks, duration 00:02:59
+ 17: cells 16->16, 116281 blocks, duration 00:05:06
+ 18: cells 17->18, 82303 blocks, duration 00:03:47
+ 19: cells 19->19, 44888 blocks, duration 00:02:01
+ 20: cells 20->20, 57413 blocks, duration 00:02:51
+ 21: cells 21->21, 97881 blocks, duration 00:04:36
+ 22: cells 22->22, 107840 blocks, duration 00:04:51
+ 23: cells 23->23, 77023 blocks, duration 00:03:39
+ 24: cells 24->24, 81228 blocks, duration 00:03:16
+ 25: cells 25->25, 50947 blocks, duration 00:02:30
+ 26: cells 26->26, 78333 blocks, duration 00:03:52
+ 27: cells 27->27, 52721 blocks, duration 00:02:37
+ 28: cells 28->28, 73403 blocks, duration 00:03:37
+ 29: cells 29->29, 85125 blocks, duration 00:04:04
+ 30: cells 30->30, 113975 blocks, duration 00:04:46
+ 31: cells 31->31, 150474 blocks, duration 00:05:56
+ 32: cells 32->32, 84406 blocks, duration 00:03:58
+ audio tracks:
+ 1, English (AC3) (1.0 ch) (iso639-2: eng), 48000Hz, 192000bps
+ 2, Francais (AC3) (1.0 ch) (iso639-2: fra), 48000Hz, 192000bps
+ subtitle tracks:
+ 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
+ 2, Francais (iso639-2: fra) (Bitmap)(VOBSUB)
+ 3, Espanol (iso639-2: spa) (Bitmap)(VOBSUB)
+ 4, Closed Captions (iso639-2: eng) (Text)(CC)
Reading chapter markers from file C:\Users\Bob\AppData\Local\Temp\Captain Blood (1935)-cq20-1-chapters.csv
[10:02:13] 1 job(s) to process
[10:02:13] starting job
[10:02:13] yadif thread started for segment 0
[10:02:13] yadif thread started for segment 1
[10:02:13] yadif thread started for segment 2
[10:02:13] yadif thread started for segment 3
[10:02:13] decomb filter thread started for segment 0
[10:02:13] decomb filter thread started for segment 1
[10:02:13] decomb filter thread started for segment 2
[10:02:13] decomb filter thread started for segment 3
[10:02:13] decomb check thread started for segment 0
[10:02:13] decomb check thread started for segment 2
[10:02:13] decomb check thread started for segment 1
[10:02:13] decomb check thread started for segment 3
[10:02:13] mask filter thread started for segment 0
[10:02:13] mask filter thread started for segment 2
[10:02:13] mask filter thread started for segment 1
[10:02:13] mask filter thread started for segment 3
[10:02:13] mask erode thread started for segment 0
[10:02:13] mask erode thread started for segment 1
[10:02:13] mask erode thread started for segment 2
[10:02:13] mask erode thread started for segment 3
[10:02:13] mask dilate thread started for segment 0
[10:02:13] mask dilate thread started for segment 1
[10:02:13] mask dilate thread started for segment 2
[10:02:13] mask dilate thread started for segment 3
[10:02:13] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[10:02:13] Auto Passthru: fallback is AC3
[10:02:13] Auto Passthru: using AC3 Passthru for track 1
[10:02:13] sync: expecting 171196 video frames
[10:02:13] job configuration:
[10:02:13] * source
[10:02:13] + F:\All\Movies 5\Captain Blood (1935)
[10:02:13] + title 1, chapter(s) 1 to 32
[10:02:13] * destination
[10:02:13] + J:\HandBrake\Captain Blood (1935)-cq20.mkv
[10:02:13] + container: Matroska (avformat)
[10:02:13] + chapter markers
[10:02:13] * video track
[10:02:13] + decoder: mpeg2
[10:02:13] + bitrate 7500 kbps
[10:02:13] + filters
[10:02:13] + Decomb (default settings)
[10:02:13] + Framerate Shaper (1:27000000:1126125)
[10:02:13] + frame rate: 23.976 fps -> constant 23.976 fps
[10:02:13] + Crop and Scale (720:480:0:0:0:0)
[10:02:13] + source: 720 * 480, crop (0/0/0/0): 720 * 480, scale: 720 * 480
[10:02:13] + loose anamorphic
[10:02:13] + storage dimensions: 720 * 480, mod 16
[10:02:13] + pixel aspect ratio: 8 / 9
[10:02:13] + display dimensions: 640 * 480
[10:02:13] + encoder: H.264 (x264)
[10:02:13] + x264 preset: veryslow
[10:02:13] + h264 profile: high
[10:02:13] + h264 level: 4.1
[10:02:13] + quality: 20.00 (RF)
[10:02:13] * subtitle track 1, Closed Captions (track 0, id 0x0) Text [CC] -> Passthrough
[10:02:13] * audio track 1
[10:02:13] + decoder: English (AC3) (1.0 ch) (track 1, id 0x80bd)
[10:02:13] + bitrate: 192 kbps, samplerate: 48000 Hz
[10:02:13] + AC3 Passthru
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.
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdnav: Language 'en' not found, using 'ÿÿ' instead
libdvdnav: Menu Languages available: ÿÿ
[10:02:13] encx264: min-keyint: 24, keyint: 240
[10:02:13] encx264: encoding at constant RF 20.000000
[10:02:13] encx264: unparsed options: level=4.1:ref=16:bframes=8:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[10:02:13] reader: first SCR 146 id 0xe0 DTS 1092
[10:02:13] mpeg2: "Chapter 1" (1) at frame 0 time 10510
x264 [info]: profile High, level 4.1
[10:02:13] sync: first pts is 10510
[10:02:13] 2.252244s: Film -> Video
[10:02:13] 2.302289s: Video -> Film
[10:04:09] mpeg2: "Chapter 2" (2) at frame 2456 time 9228219
[10:09:21] mpeg2: "Chapter 3" (3) at frame 9424 time 35384349
[10:15:00] mpeg2: "Chapter 4" (4) at frame 18085 time 67894827
[10:18:31] mpeg2: "Chapter 5" (5) at frame 22268 time 83597514
[10:26:21] mpeg2: "Chapter 6" (6) at frame 29868 time 112126014
[10:29:30] mpeg2: "Chapter 7" (7) at frame 33232 time 124753629
[10:33:30] mpeg2: "Chapter 8" (8) at frame 38461 time 144381237
[10:40:05] mpeg2: "Chapter 9" (9) at frame 46876 time 175969794
[10:42:51] mpeg2: "Chapter 10" (10) at frame 50691 time 190289599
[10:48:30] mpeg2: "Chapter 11" (11) at frame 56605 time 212489277
[10:52:48] mpeg2: "Chapter 12" (12) at frame 61547 time 231040309
[10:56:01] mpeg2: "Chapter 13" (13) at frame 66072 time 248026779
[10:59:12] mpeg2: "Chapter 14" (14) at frame 69945 time 262564302
[11:02:59] mpeg2: "Chapter 15" (15) at frame 74208 time 278567289
[11:06:53] mpeg2: "Chapter 16" (16) at frame 78620 time 295128834
[11:12:13] mpeg2: "Chapter 17" (17) at frame 82915 time 311250439
[11:20:20] mpeg2: "Chapter 18" (18) at frame 90265 time 338840502
[11:25:29] mpeg2: "Chapter 19" (19) at frame 95721 time 359322744
[11:28:01] mpeg2: "Chapter 20" (20) at frame 98620 time 370205616
[11:31:13] mpeg2: "Chapter 21" (21) at frame 102723 time 385606501
[11:36:33] mpeg2: "Chapter 22" (22) at frame 109340 time 410445816
[11:43:14] mpeg2: "Chapter 23" (23) at frame 116333 time 436695039
[11:47:49] mpeg2: "Chapter 24" (24) at frame 121584 time 456406731
[11:52:49] mpeg2: "Chapter 25" (25) at frame 126275 time 474014821
[11:55:13] mpeg2: "Chapter 26" (26) at frame 129868 time 487502796
[11:58:56] mpeg2: "Chapter 27" (27) at frame 135429 time 508376649
[12:01:05] mpeg2: "Chapter 28" (28) at frame 139188 time 522487746
[12:05:09] mpeg2: "Chapter 29" (29) at frame 144383 time 541987726
[12:09:53] mpeg2: "Chapter 30" (30) at frame 150233 time 563947164
[12:16:57] mpeg2: "Chapter 31" (31) at frame 157107 time 589750441
[12:27:33] mpeg2: "Chapter 32" (32) at frame 165648 time 621811971
[12:32:14] reader: done. 2 scr changes
[12:32:19] work: average encoding speed for job is 19.034288 fps
[12:32:19] sync: got 171365 frames, 171196 expected
[12:32:19] decomb: deinterlaced 0 | blended 1 | unfiltered 171363 | total 171364
[12:32:19] render: 171366 frames output, 0 dropped and 2 duped for CFR/PFR
[12:32:19] render: lost time: 0 (0 frames)
[12:32:19] render: gained time: 0 (0 frames) (0 not accounted for)
[12:32:19] mpeg2 done: 171365 frames
x264 [info]: frame I:1282 Avg QP:18.97 size: 37557
x264 [info]: frame P:32261 Avg QP:21.56 size: 19834
x264 [info]: frame B:137823 Avg QP:25.40 size: 6619
x264 [info]: consecutive B-frames: 1.1% 0.8% 7.2% 5.8% 4.0% 79.4% 1.3% 0.2% 0.3%
x264 [info]: mb I I16..4: 3.1% 92.1% 4.8%
x264 [info]: mb P I16..4: 1.0% 22.9% 1.6% P16..4: 35.2% 19.1% 14.7% 0.3% 0.1% skip: 5.1%
x264 [info]: mb B I16..4: 0.1% 3.6% 0.2% B16..8: 40.9% 9.7% 2.7% direct: 7.1% skip:35.7% L0:42.4% L1:40.3% BI:17.3%
x264 [info]: 8x8 transform intra:91.8% inter:80.2%
x264 [info]: direct mvs spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 91.2% 0.0% 0.0% inter: 30.2% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 30% 17% 13% 40%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 11% 23% 7% 8% 9% 8% 9% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 8% 3% 9% 15% 17% 14% 12% 11%
x264 [info]: i8c dc,h,v,p: 100% 0% 0% 0%
x264 [info]: Weighted P-Frames: Y:42.5% UV:0.0%
x264 [info]: ref P L0: 38.1% 13.8% 14.8% 8.3% 5.6% 4.2% 3.2% 2.1% 1.8% 1.6% 1.3% 1.3% 1.1% 1.0% 1.0% 0.8%
x264 [info]: ref B L0: 78.5% 9.6% 3.5% 2.0% 1.3% 1.2% 0.9% 0.6% 0.5% 0.5% 0.4% 0.4% 0.3% 0.2% 0.1%
x264 [info]: ref B L1: 95.4% 4.6%
x264 [info]: kb/s:1791.17
[12:32:19] mux: track 0, 171366 frames, 1600218863 bytes, 1791.10 kbps, fifo 4096
[12:32:19] mux: track 1, 223358 frames, 171538944 bytes, 192.00 kbps, fifo 4096
[12:32:19] mux: track 2, 2033 frames, 58740 bytes, 0.07 kbps, fifo 64
[12:32:19] libhb: work result = 0
Encode done!
HandBrake has exited.
Deleted User 13735

Re: encode stretching time by ratio of 1000/999

Post by Deleted User 13735 »

Your video was soft-telecined for NTSC DVD compliance, as expected.
Handbrake corrected the flag for 23.976 IVTC and duped a couple of frames for cfr.
All perfectly correct and no cause for concern.

As for just "how" TSMuxer estimates duration, I can't speak to that
Post Reply