synchronization gap in chapter?

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 section of the forum is now closed to new topics.

*******************************
Post Reply
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

synchronization gap in chapter?

Post by p_q0p_q »

HandBrake 0.10.0
MacOSX 10.10.1

For example, I choose chapter2 to 3 in 10 chapters.

When I check the completed image, it consists of chapter 1 to 3.
Information shows "Text Track" is begun from 0 second
but "video track" and "audio track" begun from 0.xx second.

A video track and the audio track of having begun from a 0.xx second seems to the cause in which chapter has begun from 1.

So if I see from Chapter 2, the position of a video track or an audio track seem to be OK.

This also happens in SVN brand-new version.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: synchronization gap in chapter?

Post by mduell »

Forum rules
READ ME before posting bugs

Forum rules
READ ME before posting bugs

Forum rules
READ ME before posting bugs
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I have read the "READ ME" page before posting.
Would you tell me if there is something wrong?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: synchronization gap in chapter?

Post by JohnAStebbins »

p_q0p_q wrote:I have read the "READ ME" page before posting.
Would you tell me if there is something wrong?
Some time ago, I bold faced the part of the instructions in the READ ME that people seem to always miss. I guess I need to change it to bold red flashing with a screeming siren :roll:
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I was not able to solve, although I changed the source code as follows.

I added "hb_log()" to "add_chapter().

When there were three or more chapters, I specified the chapters 2-3.

Then, it turns out that the chapter 1 which does not specify is added.

This occurs also by DVD and BD.

This also occurs revision 6679.


ex.) Format:"MP4 File" Video Codec:"H.264" frame rate:"23.976 fps"
Starting Time Reproduction time
Video track 0:00.33 10:03.81
Audio track 0:00.33 10:03.30
Text track 0:00.00 10:03.85


***Text track Information***
{QTtext}{font:ヒラギノ角ゴ ProN W3}{plain}{size:0}{textColor: 0, 0, 0}{backColor: 0, 0, 0}{justify:center}{timeScale:1000}{width:0}{height:0}{timeStamps:absolute}{language:0}{textEncoding:256}
[00:00:00.000]
Chapter 1
[00:00:00.334]
{textEncoding:256}Chapter 2
[00:04:24.808]
{textEncoding:256}Chapter 3
[00:10:03.855]
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: synchronization gap in chapter?

Post by Smithcraft »

We still need those encode logs...

SC
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

**********
r6690
  I inserted hb_log() to add_chapter().
Compile (MacOSX 10.10)
  ./configure --launch --launch-jobs=0 --debug=max
**********

Code: Select all

HandBrake Activity Log for /Volumes/Workhouse/Work/BD-ROM.m4v: 2015-01-07 15:11:23 +0900
Handbrake Version: rev0 x86_64 (2015010799)

[15:11:23] macgui: getNextPendingQueueIndex next pending encode index is:0
[15:11:23] macgui: QueueCore scanning specifically for title: 1
[15:11:23] CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
[15:11:23]  - Intel microarchitecture Haswell
[15:11:23]  - logical processor count: 8
[15:11:23] OpenCL device #1: AMD AMD Radeon R9 M295X Compute Engine
[15:11:23]  - OpenCL version: 1.2 
[15:11:23]  - driver version: 1.2 (Sep 28 2014 22:27:20)
[15:11:23]  - device type:    GPU
[15:11:23]  - supported:      YES
[15:11:23] hb_scan: path=/Volumes/BD/BD-ROM, title_index=1
[15:11:23] thread 10b71f000 started ("scan")
[15:11:23] scan: BD has 15 title(s)
[15:11:23] bd: scanning title 1
[15:11:23] bd: playlist 00000.MPLS
[15:11:23] bd: duration is 01:36:53 (5813808 ms)
[15:11:23] bd: video id=0x1011, stream type=H.264, format 1080p
[15:11:23] bd: aspect = 16:9
[15:11:23] bd: audio id=0x1100, lang=Japanese (BD LPCM), 3cc=jpn
[15:11:23] bd: audio id=0x1101, lang=Japanese (BD LPCM), 3cc=jpn
[15:11:23] bd: audio id=0x1102, lang=Japanese (AC3), 3cc=jpn
[15:11:23] bd: audio id=0x1103, lang=Japanese (AC3), 3cc=jpn
[15:11:23] bd: subtitle id=0x1200, lang=Japanese, 3cc=jpn
[15:11:23] bd: chap 1 packet=768, 371371 ms
[15:11:23] bd: chap 2 packet=2262825024, 264222 ms
[15:11:23] bd: chap 3 packet=3878966208, 339088 ms
[15:11:23] bd: chap 4 packet=5946723840, 232523 ms
[15:11:23] bd: chap 5 packet=7365199488, 301426 ms
[15:11:23] bd: chap 6 packet=9205550400, 351059 ms
[15:11:23] bd: chap 7 packet=11347680960, 225725 ms
[15:11:23] bd: chap 8 packet=12722901312, 154112 ms
[15:11:23] bd: chap 9 packet=13666418112, 451492 ms
[15:11:23] bd: chap 10 packet=16424706816, 493659 ms
[15:11:23] bd: chap 11 packet=19443940224, 351684 ms
[15:11:23] bd: chap 12 packet=21586678848, 396479 ms
[15:11:23] bd: chap 13 packet=23999473728, 389514 ms
[15:11:23] bd: chap 14 packet=26373375360, 475308 ms
[15:11:23] bd: chap 15 packet=29267721600, 302427 ms
[15:11:23] bd: chap 16 packet=31103699904, 432432 ms
[15:11:23] bd: chap 17 packet=33749507712, 281281 ms
[15:11:23] bd: title 1 has 17 chapters
[15:11:23] scan: decoding previews for title 1
[15:11:23] scan: title angle(s) 1
[15:11:23] scan: preview 1
[15:11:23] fifo_close: trashing 0 buffer(s)
[15:11:23] scan: audio 0x1101: pcm_bluray, rate=48000Hz, bitrate=2304000 Japanese (BD LPCM) (2.0 ch)
[15:11:23] fifo_close: trashing 0 buffer(s)
[15:11:23] scan: audio 0x1100: pcm_bluray, rate=48000Hz, bitrate=6912000 Japanese (BD LPCM) (5.1 ch)
[15:11:23] fifo_close: trashing 0 buffer(s)
[15:11:23] scan: audio 0x1102: ac3, rate=48000Hz, bitrate=640000 Japanese (AC3) (2.0 ch)
[15:11:23] fifo_close: trashing 0 buffer(s)
[15:11:23] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=640000 Japanese (AC3) (2.0 ch)
[15:11:24] scan: preview 2
[15:11:24] scan: preview 3
[15:11:24] scan: preview 4
[15:11:25] scan: preview 5
[15:11:25] scan: preview 6
[15:11:25] scan: preview 7
[15:11:25] scan: preview 8
[15:11:26] scan: preview 9
[15:11:26] scan: preview 10
[15:11:26] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[15:11:26] stream: 9 good frames, 0 errors (0%)
[15:11:26] Freed 7 buffers of size 1024
[15:11:26] Freed 2 buffers of size 2048
[15:11:26] Freed 3 buffers of size 4096
[15:11:26] Freed 2 buffers of size 8192
[15:11:26] Freed 1 buffers of size 16384
[15:11:26] Freed 2 buffers of size 65536
[15:11:26] Freed 1 buffers of size 262144
[15:11:26] Freed 2 buffers of size 524288
[15:11:26] Freed 1 buffers of size 4194304
[15:11:26] Allocated 5692416 bytes of buffers on this pass and Freed 5692416 bytes, 0 bytes leaked
[15:11:26] thread 10b71f000 exited ("scan")
[15:11:26] thread 10b71f000 joined ("scan")
[15:11:26] libhb: scan thread found 1 valid title(s)
[15:11:26] macgui: QueueCore scan done
[15:11:26] macgui: ScanDone state received from fQueueEncodeLibhb
[15:11:26] macgui: processNewQueueEncode number of passes expected is: 1
[15:11:26] thread 10bb59000 started ("work")
[15:11:26] macgui: QueueCore work started
[15:11:26] 1 job(s) to process
[15:11:26] starting job
[15:11:26] sync: expecting 14464 video frames
[15:11:26] job configuration:
[15:11:26]  * source
[15:11:26]    + /Volumes/BD/BD-ROM
[15:11:26]    + title 1, chapter(s) 2 to 3
[15:11:26]  * destination
[15:11:26]    + /Volumes/Work/BD-ROM.m4v
[15:11:26]    + container: MPEG-4 (libavformat)
[15:11:26]      + chapter markers
[15:11:26]  * video track
[15:11:26]    + decoder: h264
[15:11:26]      + bitrate 200 kbps
[15:11:26]    + filters
[15:11:26]      + Framerate Shaper (0:27000000:1126125)
[15:11:26]        + frame rate: same as source (around 23.976 fps)
[15:11:26]      + Crop and Scale (1920:1080:0:0:0:0)
[15:11:26]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[15:11:26]    + Output geometry
[15:11:26]      + storage dimensions: 1920 x 1080
[15:11:26]      + pixel aspect ratio: 1 : 1
[15:11:26]      + display dimensions: 1920 x 1080
[15:11:26]    + encoder: H.264 (libx264)
[15:11:26]      + preset:  veryfast
[15:11:26]      + tune:    animation
[15:11:26]      + profile: high
[15:11:26]      + level:   4.2
[15:11:26]      + quality: 20.00 (RF)
[15:11:26]  * audio track 1
[15:11:26]    + decoder: Japanese (BD LPCM) (5.1 ch) (track 1, id 0x1100)
[15:11:26]      + bitrate: 6912 kbps, samplerate: 48000 Hz
[15:11:26]    + mixdown: Dolby Pro Logic II
[15:11:26]    + encoder: AAC (Apple AudioToolbox)
[15:11:26]      + bitrate: 160 kbps, samplerate: 48000 Hz
[15:11:27] thread 10b71f000 started ("Reader")
[15:11:27] thread 10f9fc000 started ("Framerate Shaper")
[15:11:27] thread 111a69000 started ("Crop and Scale")
[15:11:27] thread 111aec000 started ("AudioSynchronization")
[15:11:27] thread 111b6f000 started ("Video decoder (libavcodec)")
[15:11:27] encx264: min-keyint: 24, keyint: 240
[15:11:27] encx264: encoding at constant RF 20.000000
[15:11:27] encx264: unparsed options: level=4.2:ref=1:bframes=5:deblock=1,1:weightp=1:subme=2:mixed-refs=0:trellis=0:psy-rd=0.40,0.00:vbv-bufsize=78125:vbv-maxrate=62500:aq-strength=0.60:rc-lookahead=10
[15:11:27] encx264: opening libx264 (pass 0)
[15:11:27] reader: first SCR 411419636 id 0x1011 DTS 411419636
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile High, level 4.2
[15:11:27] thread 11b817000 started ("H.264/AVC encoder (libx264)")
[15:11:27] thread 11b978000 started ("Audio decoder (libavcodec)")
[15:11:27] thread 1123a5000 started ("AAC encoder (Apple)")
[15:11:27] thread 112428000 started ("Video Synchronization")
[15:11:27] h264: "Chapter 2" (2) at frame 0 time 3754
[15:11:27] sync: first pts is 3754
[15:11:27] Writing Metadata to output file...
[15:11:27] thread 136733000 started ("Muxer")
[15:11:52] --add_chapter: Chapter Chapter 1, start 0, end 30097
[15:12:47] h264: "Chapter 3" (3) at frame 6335 time 23805296
[15:12:57] --add_chapter: Chapter Chapter 2, start 30097, end 23832693
[15:15:09] reader: end of chapter 3 (media 3) reached at media chapter 4
[15:15:09] reader: done. 2 scr changes
[15:15:09] thread 10b71f000 exited ("Reader")
[15:15:10] work: average encoding speed for job is 64.971786 fps
[15:15:10] thread 111aec000 exited ("AudioSynchronization")
[15:15:10] thread 136733000 exited ("Muxer")
[15:15:10] thread 1123a5000 exited ("AAC encoder (Apple)")
[15:15:10] thread 11b817000 exited ("H.264/AVC encoder (libx264)")
[15:15:10] thread 111b6f000 exited ("Video decoder (libavcodec)")
[15:15:10] thread 112428000 exited ("Video Synchronization")
[15:15:10] thread 112428000 joined ("Video Synchronization")
[15:15:10] sync: got 14465 frames, 14464 expected
[15:15:10] thread 10f9fc000 exited ("Framerate Shaper")
[15:15:10] thread 10f9fc000 joined ("Framerate Shaper")
[15:15:10] render: lost time: 0 (0 frames)
[15:15:10] render: gained time: 0 (0 frames) (0 not accounted for)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] thread 111a69000 exited ("Crop and Scale")
[15:15:10] thread 111a69000 joined ("Crop and Scale")
[15:15:10] thread 111aec000 joined ("AudioSynchronization")
[15:15:10] thread 111b6f000 joined ("Video decoder (libavcodec)")
[15:15:10] h264-decoder done: 14465 frames, 0 decoder errors, 0 drops
[15:15:10] thread 11b817000 joined ("H.264/AVC encoder (libx264)")
[15:15:10] thread 11b978000 exited ("Audio decoder (libavcodec)")
x264 [info]: frame I:489   Avg QP:19.00  size: 73549
x264 [info]: frame P:8820  Avg QP:21.85  size: 25354
x264 [info]: frame B:5156  Avg QP:22.00  size:  2287
x264 [info]: consecutive B-frames: 42.7% 31.8%  6.6%  2.2%  7.1%  9.7%
x264 [info]: mb I  I16..4:  5.8% 82.3% 12.0%
x264 [info]: mb P  I16..4:  3.0% 18.3%  0.7%  P16..4: 15.7%  8.9%  4.2%  0.0%  0.0%    skip:49.2%
x264 [info]: mb B  I16..4:  0.1%  0.5%  0.0%  B16..8:  4.3%  1.0%  0.1%  direct: 2.6%  skip:91.3%  L0:41.3% L1:51.7% BI: 7.0%
x264 [info]: 8x8 transform intra:82.9% inter:55.3%
x264 [info]: coded y,uvDC,uvAC intra: 40.9% 55.1% 17.5% inter: 6.2% 14.6% 1.5%
x264 [info]: i16 v,h,dc,p: 49% 22% 14% 16%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 19% 22%  2%  2%  3%  2%  3%  3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 18% 11%  7%  7%  8%  7%  8%  6%
x264 [info]: i8c dc,h,v,p: 47% 17% 28%  8%
x264 [info]: Weighted P-Frames: Y:5.1% UV:3.0%
x264 [info]: kb/s:3597.05
[15:15:10] thread 11b978000 joined ("Audio decoder (libavcodec)")
[15:15:10] pcm_bluray-decoder done: 0 frames, 0 decoder errors, 0 drops
[15:15:10] thread 1123a5000 joined ("AAC encoder (Apple)")
[15:15:10] thread 136733000 joined ("Muxer")
[15:15:10] --add_chapter: Chapter Chapter 3, start 23832693, end 54346927
[15:15:10] mux: file size, 284181691 bytes
[15:15:10] mux: track 0, 14465 frames, 271370547 bytes, 3596.92 kbps, fifo 4096
[15:15:10] mux: track 1, 28280 frames, 12319013 bytes, 163.28 kbps, fifo 8192
[15:15:10] mux: overhead, 11.51 bytes per frame
[15:15:10] thread 10b71f000 joined ("Reader")
[15:15:10] stream: 14466 good frames, 0 errors (0%)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] fifo_close: trashing 0 buffer(s)
[15:15:10] Freed 320 buffers of size 1024
[15:15:10] Freed 32 buffers of size 2048
[15:15:10] Freed 32 buffers of size 4096
[15:15:10] Freed 32 buffers of size 8192
[15:15:10] Freed 32 buffers of size 16384
[15:15:10] Freed 32 buffers of size 32768
[15:15:10] Freed 32 buffers of size 65536
[15:15:10] Freed 32 buffers of size 131072
[15:15:10] Freed 32 buffers of size 262144
[15:15:10] Freed 7 buffers of size 524288
[15:15:10] Freed 4 buffers of size 1048576
[15:15:10] Freed 32 buffers of size 4194304
[15:15:10] Allocated 159121408 bytes of buffers on this pass and Freed 159121408 bytes, 0 bytes leaked
[15:15:10] thread 10bb59000 exited ("work")
[15:15:10] thread 10bb59000 joined ("work")
[15:15:10] libhb: work result = 0
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: synchronization gap in chapter?

Post by Smithcraft »

Unless something has changed in the way the logs are written, I don't see any subtitle stream in that transcoding job.

Also, looking at the mux: section of the log there are only two tracks.

SC
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I am slightly uneasy in whether I am understood in my poor English.

It is said that the section of mux:log has "track0" and "track1", and I guess you have pointed out Chapter2 and Chapter3.

However, I cannot understand that the talk of a chapter is a talk of a subtitle.

Although I specify 2 and 3 of a chapter, I conclude that it is the problem of this version 10.0 that 1 of a chapter is added to a text track,
and the video track and the audio track have not begun from 0.00 second.

Although I myself just read a source code essentially, I am not holding the cause by which a video track and an audio track shift.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: synchronization gap in chapter?

Post by Smithcraft »

Track 0 is the video stream, and not chapter 2. Track 1 is the audio stream and not chapter 3.

According the the job configuration section of the log, the subtitle stream has not been included.

SC
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I am sorry that my reply is overdue.
Where has subtitle which you have said pointed out?
I have not said subtitle(Japanese Jimaku).
Moreover, since the data of subtitle is not contained in this BD, I have not carried out specification.

Code: Select all

HandBrake Activity Log for /Users/nak/Desktop/BD-ROM.m4v: 2015-01-31 23:25:45 +0900
Handbrake Version: rev0 x86_64 (2015012599)[23:25:45] macgui: QueueCore scanning specifically for title: 1
[23:25:45] CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
[23:25:45]  - Intel microarchitecture Haswell
[23:25:45]  - logical processor count: 8
[23:25:45] OpenCL device #1: AMD AMD Radeon R9 M295X Compute Engine
[23:25:45]  - OpenCL version: 1.2 
[23:25:45]  - driver version: 1.2 (Dec 23 2014 00:17:17)
[23:25:45]  - device type:    GPU
[23:25:45]  - supported:      YES
[23:25:45] hb_scan: path=/Volumes/BD/BD-ROM, title_index=1
[23:25:45] thread 10cd65000 started ("scan")
[23:25:45] scan: BD has 15 title(s)
[23:25:45] bd: scanning title 1
[23:25:45] bd: playlist 00000.MPLS
[23:25:45] bd: duration is 01:36:53 (5813808 ms)
[23:25:45] bd: video id=0x1011, stream type=H.264, format 1080p
[23:25:45] bd: aspect = 16:9
[23:25:45] bd: audio id=0x1100, lang=Japanese (BD LPCM), 3cc=jpn
[23:25:45] bd: audio id=0x1101, lang=Japanese (BD LPCM), 3cc=jpn
[23:25:45] bd: audio id=0x1102, lang=Japanese (AC3), 3cc=jpn
[23:25:45] bd: audio id=0x1103, lang=Japanese (AC3), 3cc=jpn
[23:25:45] bd: subtitle id=0x1200, lang=Japanese, 3cc=jpn
[23:25:45] bd: chap 1 packet=768, 371371 ms
[23:25:45] bd: chap 2 packet=2262825024, 264222 ms
[23:25:45] bd: chap 3 packet=3878966208, 339088 ms
[23:25:45] bd: chap 4 packet=5946723840, 232523 ms
[23:25:45] bd: chap 5 packet=7365199488, 301426 ms
[23:25:45] bd: chap 6 packet=9205550400, 351059 ms
[23:25:45] bd: chap 7 packet=11347680960, 225725 ms
[23:25:45] bd: chap 8 packet=12722901312, 154112 ms
[23:25:45] bd: chap 9 packet=13666418112, 451492 ms
[23:25:45] bd: chap 10 packet=16424706816, 493659 ms
[23:25:45] bd: chap 11 packet=19443940224, 351684 ms
[23:25:45] bd: chap 12 packet=21586678848, 396479 ms
[23:25:45] bd: chap 13 packet=23999473728, 389514 ms
[23:25:45] bd: chap 14 packet=26373375360, 475308 ms
[23:25:45] bd: chap 15 packet=29267721600, 302427 ms
[23:25:45] bd: chap 16 packet=31103699904, 432432 ms
[23:25:45] bd: chap 17 packet=33749507712, 281281 ms
[23:25:45] bd: title 1 has 17 chapters
[23:25:45] scan: decoding previews for title 1
[23:25:45] scan: title angle(s) 1
[23:25:45] scan: preview 1
[23:25:45] fifo_close: trashing 0 buffer(s)
[23:25:45] scan: audio 0x1101: pcm_bluray, rate=48000Hz, bitrate=2304000 Japanese (BD LPCM) (2.0 ch)
[23:25:45] fifo_close: trashing 0 buffer(s)
[23:25:45] scan: audio 0x1100: pcm_bluray, rate=48000Hz, bitrate=6912000 Japanese (BD LPCM) (5.1 ch)
[23:25:45] fifo_close: trashing 0 buffer(s)
[23:25:45] scan: audio 0x1102: ac3, rate=48000Hz, bitrate=640000 Japanese (AC3) (2.0 ch)
[23:25:45] fifo_close: trashing 0 buffer(s)
[23:25:45] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=640000 Japanese (AC3) (2.0 ch)
[23:25:46] scan: preview 2
[23:25:46] scan: preview 3
[23:25:46] scan: preview 4
[23:25:47] scan: preview 5
[23:25:47] scan: preview 6
[23:25:47] scan: preview 7
[23:25:47] scan: preview 8
[23:25:47] scan: preview 9
[23:25:48] scan: preview 10
[23:25:48] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[23:25:48] stream: 9 good frames, 0 errors (0%)
[23:25:48] Freed 7 buffers of size 1024
[23:25:48] Freed 2 buffers of size 2048
[23:25:48] Freed 3 buffers of size 4096
[23:25:48] Freed 2 buffers of size 8192
[23:25:48] Freed 1 buffers of size 16384
[23:25:48] Freed 2 buffers of size 65536
[23:25:48] Freed 1 buffers of size 262144
[23:25:48] Freed 2 buffers of size 524288
[23:25:48] Freed 1 buffers of size 4194304
[23:25:48] Allocated 5692416 bytes of buffers on this pass and Freed 5692416 bytes, 0 bytes leaked
[23:25:48] thread 10cd65000 exited ("scan")
[23:25:48] thread 10cd65000 joined ("scan")
[23:25:48] libhb: scan thread found 1 valid title(s)
[23:25:48] macgui: QueueCore scan done
[23:25:48] thread 10b5bc000 started ("work")
[23:25:48] macgui: QueueCore started encoding BD-ROM.m4v
[23:25:48] 1 job(s) to process
[23:25:48] starting job
[23:25:48] sync: expecting 13705 video frames
[23:25:48] job configuration:
[23:25:48]  * source
[23:25:48]    + /Volumes/BD/BD-ROM
[23:25:48]    + title 1, chapter(s) 3 to 4
[23:25:48]  * destination
[23:25:48]    + /Users/xxx/Desktop/BD-ROM.m4v
[23:25:48]    + container: MPEG-4 (libavformat)
[23:25:48]      + chapter markers
[23:25:48]  * video track
[23:25:48]    + decoder: h264
[23:25:48]      + bitrate 200 kbps
[23:25:48]    + filters
[23:25:48]      + Framerate Shaper (0:27000000:1126125)
[23:25:48]        + frame rate: same as source (around 23.976 fps)
[23:25:48]      + Crop and Scale (1920:1080:0:0:0:0)
[23:25:48]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[23:25:48]    + Output geometry
[23:25:48]      + storage dimensions: 1920 x 1080
[23:25:48]      + pixel aspect ratio: 1 : 1
[23:25:48]      + display dimensions: 1920 x 1080
[23:25:48]    + encoder: H.264 (libx264)
[23:25:48]      + preset:  veryfast
[23:25:48]      + profile: main
[23:25:48]      + level:   4.0
[23:25:48]      + quality: 20.00 (RF)
[23:25:48]  * audio track 1
[23:25:48]    + decoder: Japanese (BD LPCM) (5.1 ch) (track 1, id 0x1100)
[23:25:48]      + bitrate: 6912 kbps, samplerate: 48000 Hz
[23:25:48]    + mixdown: Dolby Pro Logic II
[23:25:48]    + encoder: AAC (Apple AudioToolbox)
[23:25:48]      + bitrate: 160 kbps, samplerate: 48000 Hz
[23:25:48] thread 10b4ef000 started ("Reader")
[23:25:48] thread 10cc44000 started ("Framerate Shaper")
[23:25:48] thread 10cd65000 started ("Crop and Scale")
[23:25:48] thread 10d019000 started ("AudioSynchronization")
[23:25:48] thread 1106ca000 started ("Video decoder (libavcodec)")
[23:25:48] encx264: min-keyint: 24, keyint: 240
[23:25:48] encx264: encoding at constant RF 20.000000
[23:25:48] 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
[23:25:48] encx264: opening libx264 (pass 0)
[23:25:48] reader: first SCR 435199642 id 0x1011 DTS 435199642
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
[23:25:48] thread 1173f0000 started ("H.264/AVC encoder (libx264)")
[23:25:48] thread 126039000 started ("Audio decoder (libavcodec)")
[23:25:48] thread 12704f000 started ("AAC encoder (Apple)")
[23:25:48] thread 1270d2000 started ("Video Synchronization")
[23:25:48] Writing Metadata to output file...
[23:25:48] thread 1260bc000 started ("Muxer")
[23:25:48] h264: "Chapter 3" (3) at frame 0 time 3754
[23:25:48] sync: first pts is 3754
[23:25:57]      **add_chapter: Chapter 2  start 0, end 12762
[23:28:13] h264: "Chapter 4" (4) at frame 8130 time 30523550
[23:28:47]      **add_chapter: Chapter 3  start 12762, end 30536004
[23:29:33] reader: end of chapter 4 (media 4) reached at media chapter 5
[23:29:33] reader: done. 2 scr changes
[23:29:33] thread 10b4ef000 exited ("Reader")
[23:29:33] work: average encoding speed for job is 60.650517 fps
[23:29:33] thread 1260bc000 exited ("Muxer")
[23:29:33] thread 126039000 exited ("Audio decoder (libavcodec)")
[23:29:33] thread 10d019000 exited ("AudioSynchronization")
[23:29:33] thread 12704f000 exited ("AAC encoder (Apple)")
[23:29:33] thread 1270d2000 exited ("Video Synchronization")
[23:29:33] thread 1270d2000 joined ("Video Synchronization")
[23:29:33] sync: got 13705 frames, 13705 expected
[23:29:33] thread 10cc44000 exited ("Framerate Shaper")
[23:29:33] thread 10cc44000 joined ("Framerate Shaper")
[23:29:33] render: lost time: 0 (0 frames)
[23:29:33] render: gained time: 0 (0 frames) (0 not accounted for)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] thread 10cd65000 exited ("Crop and Scale")
[23:29:33] thread 10cd65000 joined ("Crop and Scale")
[23:29:33] thread 10d019000 joined ("AudioSynchronization")
[23:29:33] thread 1106ca000 exited ("Video decoder (libavcodec)")
[23:29:33] thread 1106ca000 joined ("Video decoder (libavcodec)")
[23:29:33] h264-decoder done: 13705 frames, 0 decoder errors, 0 drops
[23:29:33] thread 1173f0000 exited ("H.264/AVC encoder (libx264)")
[23:29:33] thread 1173f0000 joined ("H.264/AVC encoder (libx264)")
x264 [info]: frame I:457   Avg QP:17.35  size: 79368
x264 [info]: frame P:8731  Avg QP:19.96  size: 29596
x264 [info]: frame B:4517  Avg QP:18.69  size:  3369
x264 [info]: consecutive B-frames: 48.2% 22.4%  3.6% 25.8%
x264 [info]: mb I  I16..4: 57.9%  0.0% 42.1%
x264 [info]: mb P  I16..4: 21.1%  0.0%  4.3%  P16..4: 21.4% 10.7%  4.4%  0.0%  0.0%    skip:38.1%
x264 [info]: mb B  I16..4:  0.8%  0.0%  0.1%  B16..8:  5.7%  1.3%  0.1%  direct: 6.8%  skip:85.1%  L0:43.5% L1:50.2% BI: 6.3%
x264 [info]: coded y,uvDC,uvAC intra: 24.2% 61.8% 20.5% inter: 7.6% 21.8% 1.6%
x264 [info]: i16 v,h,dc,p: 47% 24% 14% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 23%  6%  5%  5%  5%  5%  4%
x264 [info]: i8c dc,h,v,p: 47% 18% 27%  8%
x264 [info]: Weighted P-Frames: Y:4.4% UV:2.6%
x264 [info]: kb/s:4336.70
[23:29:33] thread 126039000 joined ("Audio decoder (libavcodec)")
[23:29:33] pcm_bluray-decoder done: 0 frames, 0 decoder errors, 0 drops
[23:29:33] thread 12704f000 joined ("AAC encoder (Apple)")
[23:29:33] thread 1260bc000 joined ("Muxer")
[23:29:33]      **add_chapter: Chapter 4  start 30536004, end 51455653
[23:29:33] mux: file size, 322041794 bytes
[23:29:33] mux: track 0, 13705 frames, 309887733 bytes, 4336.71 kbps, fifo 4096
[23:29:33] mux: track 1, 26784 frames, 11687480 bytes, 163.56 kbps, fifo 8192
[23:29:33] mux: overhead, 11.52 bytes per frame
[23:29:33] thread 10b4ef000 joined ("Reader")
[23:29:33] stream: 13706 good frames, 0 errors (0%)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] fifo_close: trashing 0 buffer(s)
[23:29:33] Freed 320 buffers of size 1024
[23:29:33] Freed 32 buffers of size 2048
[23:29:33] Freed 32 buffers of size 4096
[23:29:33] Freed 32 buffers of size 8192
[23:29:33] Freed 32 buffers of size 16384
[23:29:33] Freed 32 buffers of size 32768
[23:29:33] Freed 32 buffers of size 65536
[23:29:33] Freed 32 buffers of size 131072
[23:29:33] Freed 32 buffers of size 262144
[23:29:33] Freed 5 buffers of size 524288
[23:29:33] Freed 4 buffers of size 1048576
[23:29:33] Freed 32 buffers of size 4194304
[23:29:33] Allocated 158072832 bytes of buffers on this pass and Freed 158072832 bytes, 0 bytes leaked
[23:29:33] thread 10b5bc000 exited ("work")
[23:29:33] thread 10b5bc000 joined ("work")
[23:29:33] libhb: work result = 0
I specify the range of a chapter by Chapters.
I carry out animation conversion of the range of 3 through 4.

Starting Time Reproduction time
Video track 0:00.14 9:31.73
Audio track 0:00.14 9:31.39
Text track 0:00.00 9:31.72

This text track expresses the chapter and is a kind of cue function.

{QTtext}{font:ヒラギノ角ゴ ProN W3}{plain}{size:0}{textColor:0, 0, 0}{backColor:0, 0, 0}{justify:center}{timeScale:1000}{width:0}{height:0}{timeStamps:absolute}{language:0}{textEncoding:256}
[00:00:00.000] Chapter 2
[00:00:00.142]
{textEncoding:256}Chapter 3
[00:05:39.289]
{textEncoding:256}Chapter 4
[00:09:31.729]

Chapter 2 in range specification outside is added to this movie, and I think it's a problem that a video truck and an audio truck have not started from 0 seconds.

Aren't there those reproducing this situation?
Moreover, aren't there those who can be corrected?
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I tried this 0.10.0beta1.
For example, if animation conversion of the range of 3 through 4 is carried out, a chapter will be made in 2 to 4.
The time of onset of the video track, the audio track, and the text track has gathered in 0 second.

I put in the patch which erases the chapter which is not needed for revision 6893.

Code: Select all

--- handbrake-svn/libhb/muxavformat.c	2014-12-26 18:47:52.000000000 +0900
+++ handbrake-svn_/libhb/muxavformat.c	2014-12-26 19:07:26.000000000 +0900
@@ -1071,6 +1098,10 @@
                 // chapter N.  So we are always writing the previous chapter
                 // mark.
                 track->current_chapter = buf->s.new_chap - 1;
+                
+//hb_log("    : current_chapter &d, chapter_start %d, chapter_end %d",track->current_chapter,job->chapter_start,job->chapter_end);
+                if(track->current_chapter < job->chapter_start)
+                    goto close;
 
                 // chapter numbers start at 1, but the list starts at 0
                 chapter = hb_list_item(job->list_chapter,
@@ -1213,6 +1244,7 @@
         return -1;
     }
 
+close:
     hb_buffer_close( &buf );
     return 0;
 }
Then, although the chapter was made in 3 to 4, an animation was not correctly changed in the first portion.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: synchronization gap in chapter?

Post by Smithcraft »

p_q0p_q wrote:I am sorry that my reply is overdue.
Where has subtitle which you have said pointed out?
I have not said subtitle(Japanese Jimaku).
Moreover, since the data of subtitle is not contained in this BD, I have not carried out specification.
What text track are you referring to in your first post, if not some sort of subtitle track?

SC
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

When you play the completed video in quicktime and you look at the video information, text track has been created as Chapter data of the video.
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I forgot to write.

I created two Patches for the testing, when this Problem was discovered.
I have included the custom-made source in this Patch.

Code: Select all

--- handbrake-svn/libhb/muxavformat.c	2014-12-26 18:47:52.000000000 +0900
+++ handbrake-svn_/libhb/muxavformat.c	2014-12-26 19:07:26.000000000 +0900
@@ -560,6 +560,14 @@
                     name = "Stereo";
                     break;
 
+                case 4:
+                    name = "ProLogicII";
+                    break;
+
+                case 5:
+                    name = "5.1ch";
+                    break;
+
                 default:
                     name = "Surround";
                     break;
@@ -1071,6 +1098,10 @@
                 // chapter N.  So we are always writing the previous chapter
                 // mark.
                 track->current_chapter = buf->s.new_chap - 1;
+                
+//hb_log("    : current_chapter &d, chapter_start %d, chapter_end %d",track->current_chapter,job->chapter_start,job->chapter_end);
+                if(track->current_chapter < job->chapter_start)
+                    goto close;
 
                 // chapter numbers start at 1, but the list starts at 0
                 chapter = hb_list_item(job->list_chapter,
@@ -1213,6 +1244,7 @@
         return -1;
     }
 
+close:
     hb_buffer_close( &buf );
     return 0;
 }
or

Code: Select all

--- handbrake-svn/libhb/muxavformat.c	2014-12-26 18:47:52.000000000 +0900
+++ handbrake-svn_/libhb/muxavformat.c	2014-12-26 19:07:26.000000000 +0900
@@ -560,6 +560,14 @@
                     name = "Stereo";
                     break;
 
+                case 4:
+                    name = "ProLogicII";
+                    break;
+
+                case 5:
+                    name = "5.1ch";
+                    break;
+
                 default:
                     name = "Surround";
                     break;
@@ -943,6 +951,7 @@
     chap->start = start;
     chap->end = end;
     av_dict_set(&chap->metadata, "title", title, 0);
+//hb_log("   add_chapter  : title[%s]",title);
 
     return 0;
 }
@@ -1046,6 +1055,7 @@
     pkt.dts = dts;
     pkt.pts = pts;
     pkt.duration = duration;
+//hb_log("--avformatMux_3: duration %"PRIu64", pts %"PRIu64"",duration,pts);
 
     if (track->type == MUX_TYPE_VIDEO && ((job->vcodec & HB_VCODEC_H264_MASK) ||
                                           (job->vcodec & HB_VCODEC_FFMPEG_MASK)))
@@ -1058,6 +1068,23 @@
         pkt.flags |= AV_PKT_FLAG_KEY;
     }
 
+//hb_log("    start %d, new_chap %d, prev_chapter_tc %d, current_chapter %d",buf->s.start,buf->s.new_chap,track->prev_chapter_tc,track->current_chapter);
+//hb_log("  hb_buffer_settings_s: s.start %d",buf->s.start);
+//hb_log("                      : s.duration %d",buf->s.duration);
+//hb_log("                      : s.stop %d",buf->s.stop);
+//hb_log("                      : s.renderOffset %d",buf->s.renderOffset);
+//hb_log("                      : s.pcr %d",buf->s.pcr);
+//hb_log("                      : s.discontinuity %d",buf->s.discontinuity);
+//hb_log("                      : s.new_chap %d",buf->s.new_chap);
+//hb_log("  hb_mux_data_s: duration %d",track->duration);
+//hb_log("               : prev_chapter_tc %d",track->prev_chapter_tc);
+//hb_log("               : current_chapter %d",track->current_chapter);
+//hb_log("               : st->time_base %d",track->st->time_base);
+//hb_log("               : st->start_time %d",track->st->start_time);
+//hb_log("               : st->duration %d",track->st->duration);
+//hb_log("               : st->nb_frames %d",track->st->nb_frames);
+//hb_log("               : st->disposition %d",track->st->disposition);
+
     switch (track->type)
     {
         case MUX_TYPE_VIDEO:
@@ -1071,6 +1098,10 @@
                 // chapter N.  So we are always writing the previous chapter
                 // mark.
                 track->current_chapter = buf->s.new_chap - 1;
+                
+//hb_log("    : current_chapter &d, chapter_start %d, chapter_end %d",track->current_chapter,job->chapter_start,job->chapter_end);
+                if(track->current_chapter < job->chapter_start)
+                    goto close;
 
                 // chapter numbers start at 1, but the list starts at 0
                 chapter = hb_list_item(job->list_chapter,
@@ -1213,6 +1244,7 @@
         return -1;
     }
 
+close:
     hb_buffer_close( &buf );
     return 0;
 }
Capture of the source using the Patch became right with both. But the flame of the the first of this moving image is not changed correctly. Moreover, only a video tracks is reproduced behind time several ms.

I tested also r6935.
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

This 0.10.1bate2 has the same problem.
p_q0p_q
Novice
Posts: 54
Joined: Thu Dec 11, 2014 3:01 pm

Re: synchronization gap in chapter?

Post by p_q0p_q »

I tested by the newest version 0.10.1.
This result had the completely same problem as a beta version.

The portion of synchronous processing of a track was not found in me.
Post Reply