Bug encoding closed captioning

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
Croaker
Posts: 2
Joined: Mon Dec 07, 2009 11:10 pm

Bug encoding closed captioning

Post by Croaker »

Trying to encode the closed captioning track as a soft sub for the first season The Mentalist DVD produces a file with a subtitle track that doesn't play. VLC sometimes will see the subtitle track, and sometimes not (different attempts). Quicktime will not play the clips at all, though vlc will, just not the subtitles. If the CC track and an external sub track are tried together, quicktime will play the clip, but hangs if you try to select the CC sub track. Same thing on the Iphone. If clip has only the CC sub track, it claims invalid file and wont even play. Clip with both tracks plays fine, will display srt sub track fine, but hangs if CC track selected.

I tried to make this work with numerous settings, the .9.4 32 bit build with 32 bit vlc, the 2907 64bit build with 64bit vlc 1.04rc4, and 64 bit .9.4 with 64 bit vlc 1.04rc4. macbook core 2 duo 10.6.2 snowleopard. here is the activity log, and i have a 4 minute clip (35 meg) if you can give me a place to put it.

I have previously successfully encoded the cc track from another show (with the 28xx build), it worked fine. I dont know if there is something off about this show or what.

Code: Select all

HandBrake Activity Log for /Users/chad/Downloads/Handbrake Encodes/THE_MENTALIST_SEASON_1_DISC_2-3.withlog.m4v: 2009-12-07 16:13:22 -0700
Handbrake Version: 0.9.4 x86_64 (2009112300)

[16:13:22] macgui: Rip: Pending queue count is 1
[16:13:22] macgui: scanning specifically for title: 3
[16:13:22] macgui: performNewQueueScan currentQueueEncodeIndex is: 1
[16:13:22] hb_scan: path=/dev/disk1, title_index=3
[16:13:22] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
NAME OPEN FAILED
libdvdnav: Unable to find map file '/Users/chad/.dvdnav/.map'
libdvdnav: DVD disk reports itself with Region mask 0x00f00000. Regions: 1 2 3 4
libdvdread: Using libdvdcss version 1.2.10 for DVD access
[16:13:26] scan: DVD has 11 title(s)
[16:13:26] scan: scanning title 3
[16:13:26] scan: opening IFO for VTS 1
[16:13:26] pgc_id: 3, pgn: 1: pgc: 0x11ad95260
[16:13:26] scan: vts=1, ttn=3, cells=0->6, blocks=914448->1833494, 919047 blocks
[16:13:26] scan: duration is 00:43:52 (2632066 ms)
[16:13:26] scan: checking audio 1
[16:13:26] scan: id=80bd, lang=English (AC3), 3cc=eng ext=0
[16:13:26] scan: checking audio 2
[16:13:26] scan: id=81bd, lang=Portugues (AC3), 3cc=por ext=0
[16:13:26] scan: checking subtitle 1
[16:13:26] scan: id=20bd, lang=English, 3cc=eng
[16:13:26] scan: checking subtitle 2
[16:13:26] scan: id=21bd, lang=Chinese, 3cc=zho
[16:13:26] scan: checking subtitle 3
[16:13:26] scan: id=22bd, lang=Francais, 3cc=fra
[16:13:26] scan: checking subtitle 4
[16:13:26] scan: id=23bd, lang=Korean, 3cc=kor
[16:13:26] scan: checking subtitle 5
[16:13:26] scan: id=24bd, lang=Portugues, 3cc=por
[16:13:26] scan: checking subtitle 6
[16:13:26] scan: id=25bd, lang=Espanol, 3cc=spa
[16:13:26] scan: checking subtitle 7
[16:13:26] scan: id=26bd, lang=Thai, 3cc=tha
[16:13:26] scan: title 3 has 7 chapters
[16:13:26] scan: chap 1 c=0->0, b=914448->988571 (74124), 200323 ms
[16:13:26] scan: chap 2 c=1->1, b=988572->1200531 (211960), 571541 ms
[16:13:26] scan: chap 3 c=2->2, b=1200532->1465268 (264737), 739745 ms
[16:13:26] scan: chap 4 c=3->3, b=1465269->1559232 (93964), 281440 ms
[16:13:26] scan: chap 5 c=4->4, b=1559233->1828231 (268999), 812699 ms
[16:13:26] scan: chap 6 c=5->5, b=1828232->1833452 (5221), 26195 ms
[16:13:26] scan: chap 7 c=6->6, b=1833453->1833494 (42), 120 ms
[16:13:26] scan: aspect = 0
[16:13:26] scan: decoding previews for title 3
libdvdnav: Suspected RCE Region Protection!!!
libdvdnav: Suspected RCE Region Protection!!!
[16:13:27] scan: title angle(s) 1

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x00006677
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000075e9
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x0037ee1f
libdvdread: Elapsed time 0
libdvdread: Found 2 VTS's
libdvdread: Elapsed time 0
[16:13:27] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[16:13:27] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 Portugues (AC3) (Dolby Surround)
[16:13:29] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 32:27
[16:13:29] scan: title (0) job->width:720, job->height:400
[16:13:29] libhb: scan thread found 1 valid title(s)
[16:13:29] macgui: ScanDone state received from fQueueEncodeLibhb
[16:13:29] macgui: Preset: Normal (Default)
[16:13:29] macgui: processNewQueueEncode number of passes expected is: 1
[16:13:29] macgui: Setting Subtitle: 
[16:13:29] macgui: prepareJob exiting
[16:13:29] 1 job(s) to process
[16:13:29] starting job
[16:13:29] job configuration:
[16:13:29]  * source
[16:13:29]    + /dev/disk1
[16:13:29]    + title 3, chapter(s) 4 to 4
[16:13:29]  * destination
[16:13:29]    + /Users/chad/Downloads/Handbrake Encodes/THE_MENTALIST_SEASON_1_DISC_2-3.withlog.m4v
[16:13:29]    + container: MPEG-4 (.mp4 and .m4v)
[16:13:29]  * video track
[16:13:29]    + decoder: mpeg2
[16:13:29]      + bitrate 7500 kbps
[16:13:29]    + frame rate: same as source (around 23.976 fps)
[16:13:29]    + strict anamorphic
[16:13:29]      + modulus: 0
[16:13:29]      + storage dimensions: 720 * 480 -> 720 * 480, crop 0/0/0/0
[16:13:29]      + pixel aspect ratio: 32 / 27
[16:13:29]      + display dimensions: 853 * 480
[16:13:29]    + encoder: x264
[16:13:29]      + options: ref=2:bframes=2:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0
[16:13:29]      + quality: 20.00 (RF)
[16:13:29]  * subtitle track 0, Closed Captions (id 0) Text [CC] -> Pass-Through 
[16:13:29]  * subtitle track 0, English (id 1ff) Text [SRT] -> Pass-Through 
[16:13:29]  * audio track 0
[16:13:29]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[16:13:29]      + bitrate: 384 kbps, samplerate: 48000 Hz
[16:13:29]    + mixdown: Dolby Pro Logic II
[16:13:29]    + encoder: ca_aac
[16:13:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
[16:13:29] encx264: keyint-min: 24, keyint-max: 240
[16:13:29] encx264: encoding with stored aspect 32/27
[16:13:29] encx264: Encoding at constant RF 20.000000
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[16:13:29] sync: expecting 6771 video frames
NAME OPEN FAILED
libdvdnav: Unable to find map file '/Users/chad/.dvdnav/.map'
libdvdnav: DVD disk reports itself with Region mask 0x00f00000. Regions: 1 2 3 4
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav: Suspected RCE Region Protection!!!
libdvdnav: Suspected RCE Region Protection!!!

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x00006677
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000075e9
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x0037ee1f
libdvdread: Elapsed time 0
libdvdread: Found 2 VTS's
libdvdread: Elapsed time 0
[16:13:30] reader: first SCR 136166692 id 224 DTS 136167622
[16:13:30] mpeg2: "" (4) at frame 0 time 4505
[16:13:30] output track 0: ac3 in sync after skipping 1252 bytes
[16:13:31] sync: first pts is 4505
[16:16:59] reader: end of chapter 4 (media 4) reached at media chapter 5
[16:16:59] reader: done. 1 scr changes
[16:17:01] sync: got 6747 frames, 6771 expected
[16:17:01] work: average encoding speed for job is 31.975199 fps
[16:17:03] mux: track 0, 6747 frames, 30486710 bytes, 866.44 kbps, fifo 64
[16:17:03] mux: track 1, 13194 frames, 5609558 bytes, 159.42 kbps, fifo 512
[16:17:03] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[16:17:03] mux: track 3, 78 frames, 3574 bytes, 0.10 kbps, fifo 8
[16:17:03] mpeg2 done: 6748 frames
[16:17:03] render: lost time: 0 (0 frames)
[16:17:03] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:120   Avg QP:16.56  size: 34515  PSNR Mean Y:48.14 U:51.01 V:52.01 Avg:48.99 Global:48.47
x264 [info]: frame P:2914  Avg QP:20.43  size:  6673  PSNR Mean Y:44.94 U:47.83 V:49.14 Avg:45.81 Global:45.32
x264 [info]: frame B:3713  Avg QP:21.68  size:  1860  PSNR Mean Y:44.24 U:47.72 V:48.97 Avg:45.20 Global:44.50
x264 [info]: consecutive B-frames:  7.0% 35.6% 57.3%
x264 [info]: mb I  I16..4: 30.2%  0.0% 69.8%
x264 [info]: mb P  I16..4:  2.4%  0.0%  2.7%  P16..4: 56.0% 12.5%  7.1%  0.0%  0.0%    skip:19.3%
x264 [info]: mb B  I16..4:  5.9%  0.0%  0.3%  B16..8: 21.3%  1.0%  0.5%  direct:14.0%  skip:56.9%  L0:34.3% L1:50.2% BI:15.5%
x264 [info]: coded y,uvDC,uvAC intra: 41.5% 73.8% 35.8% inter: 10.3% 28.0% 1.3%
x264 [info]: i16 v,h,dc,p: 46% 17% 21% 16%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 15% 19%  6%  6%  8%  6%  7%  5%
x264 [info]: Weighted P-Frames: Y:1.1%
x264 [info]: ref P L0: 62.3% 19.3% 18.4%
x264 [info]: SSIM Mean Y:0.9792188
x264 [info]: PSNR Mean Y:44.609 U:47.828 V:49.099 Avg:45.532 Global:44.884 kb/s:866.84
[16:17:03] libhb: work result = 0
Last edited by Anonymous on Tue Dec 08, 2009 1:02 am, edited 1 time in total.
Reason: Please enclose Activity Logs in [code] blocks
Deleted User 11865

Re: Bug encoding closed captioning

Post by Deleted User 11865 »

Try http://localhostr.com/ or http://drop.io/

As long as the clip you provide can reproduce the issue, make it as short as possible. Also, don't forget to provide the encode log for said clip (or for the encode said clip has been trimmed from).
Croaker
Posts: 2
Joined: Mon Dec 07, 2009 11:10 pm

Re: Bug encoding closed captioning

Post by Croaker »

Here is the clip. see above for the log. Other disks from other shows seem to work fine....

http://localhostr.com/files/a992dc/THE_ ... ithlog.m4v
Deleted User 11865

Re: Bug encoding closed captioning

Post by Deleted User 11865 »

Well, I can't reproduce your issue fully with the sample.

The file plays in QuickTime (7.6.4) and iTunes, no matter which subtitle track is selected.

In VLC, I only see one subtitle track (the SRT file's subtitle track).

Also, the file will play on my iPhone as long as I don't select the first subtitle track (which comes from HandBrake's Closed Captions passthrough). As soon as I select this track, the file won't play.

I think the issue here is that even though your DVD has a Closed Captions track, it appears that it doesn't have Closed Captions (i.e. the CC track is empty):

Code: Select all

[16:13:29]  * subtitle track 0, Closed Captions (id 0) Text [CC] -> Pass-Through <--- first subtitle track comes from CC
[16:13:29]  * subtitle track 0, English (id 1ff) Text [SRT] -> Pass-Through <-------- second subtitle track comes from SRT file

[…]

[16:17:03] mux: track 0, 6747 frames, 30486710 bytes, 866.44 kbps, fifo 64
[16:17:03] mux: track 1, 13194 frames, 5609558 bytes, 159.42 kbps, fifo 512
[16:17:03] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8 <---------------------- the CC track is empty
[16:17:03] mux: track 3, 78 frames, 3574 bytes, 0.10 kbps, fifo 8 <------------------ the SRT file isn't
When HandBrake passes through the CC track, it creates an empty subtitle track with a duration of 0. QuickTime 7.6.4 doesn't appear to have an issue with the track, and VLC apparently just discards it. Only the iPhone seems to have problems playing the file when the CC track is enabled.

Workaround if you don't know whether the CC track is empty or not beforehand: remove it after the fact. It can be done with Subler.
Also, doing as Save As in QuickTime Pro doesn't remove it but seems to change something that makes the iPhone not see the empty track, and play the file without complaining.
Post Reply