.srt subtitles not working
#1
Hi,

I am a bit new to encoding etc.
I have an MP4 file which i added .srt into the file and a chapter track.

Long story short:
Everything (including subtitles) works in quicktime x, vlc, mplayer osx extended
But not in xbmc

Media information
Code:
General
Complete name : /Volumes/MEDIA HDD/Films/The Dark Knight (2008).m4v
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 3.42 GiB
Duration : 2h 23mn
Overall bit rate : 3 404 Kbps
Encoded date : UTC 2011-03-15 23:20:29
Tagged date : UTC 2011-03-16 19:57:41
Writing application : HandBrake 0.9.5 2011010300
hdvd : 0
rtng : 0
Video ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2h 23mn
Bit rate mode : Variable
Bit rate : 3 136 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 12.048 fps
Maximum frame rate : 24.390 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.063
Stream size : 3.15 GiB (92%)
Writing library : x264 core 112
Encoding settings :
cabac=1 / ref=4 / 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=6 / sliced_threads=0 / slices=4 / 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=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / crf_max=0.0 / ip_ratio=1.40 / aq=1:1.00 / nal_hrd=none
Encoded date : UTC 2011-03-15 23:20:29
Tagged date : UTC 2011-03-16 16:26:02
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177


Audio ID :2
Format :AAC
Format/Info :Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2h 23mn
Bit rate mode : Variable
Bit rate : 264.6 Kbps
Maximum bit rate : 493 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 270 MiB (8%)
Language : English
Encoded date : UTC 2011-03-15 23:20:29
Tagged date : UTC 2011-03-16 16:26:01


Text #1 ID : 4
Format : Timed text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 2h 23mn
Bit rate mode : Variable
Bit rate : 76 bps
Stream size : 80.5 KiB (0%)
Language : English
Encoded date : UTC 2011-03-16 17:02:51
Tagged date : UTC 2011-03-16 17:02:51


Text #2 ID : 5
Format : Apple text
Codec ID : text
Duration : 2h 23mn
Bit rate mode : Variable
Bit rate : 1 bps
Stream size : 903 Bytes (0%)
Encoded date : UTC 2011-03-16 19:52:34
Tagged date : UTC 2011-03-16 19:52:34
Menu
00:00:00.000 :Chapter 1
00:05:41.000 :Chapter 2
00:09:54.000 :Chapter 3
00:13:10.000 :Chapter 4
00:20:58.000 :Chapter 5
00:26:11.000 :Chapter 6
00:28:55.000 :Chapter 7
00:31:01.000 :Chapter 8
00:37:07.000 :Chapter 9
00:42:53.000 :Chapter 10
00:45:58.000 :Chapter 11
00:48:15.000 :Chapter 12
00:52:37.000 :Chapter 13
00:56:33.000 :Chapter 14
00:58:44.000 :Chapter 15
01:03:16.000 :Chapter 16
01:07:41.000 :Chapter 17
01:10:06.000 :Chapter 18
01:13:42.000 :Chapter 19
01:17:23.000 :Chapter 20
01:21:40.000 :Chapter 21
01:24:06.000 :Chapter 22
01:30:06.000 :Chapter 23
01:33:22.000 :Chapter 24
01:39:15.000 :Chapter 25
01:41:23.000 :Chapter 26
01:44:16.000 :Chapter 27
01:46:18.000 :Chapter 28
01:50:27.000 :Chapter 29
01:53:31.000 :Chapter 30
01:56:22.000 :Chapter 31
01:59:32.000 :Chapter 32
02:02:55.000 :Chapter 33
02:08:25.000 :Chapter 34
02:11:45.000 :Chapter 35
02:14:41.000 :Chapter 36
02:19:16.000 :Chapter 37
02:23:45.000 :Chapter 38

Debug log of XBMC playing it (it seems it load the subtitles?):
http://pastebin.com/1rehgj97

Interesting parts?:
Code:
20:05:34 T:2953850880 M:551510016    INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: START
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: Checking for common subdirs...
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: Done (time: 1 ms)
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: Searching for subtitles...
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: Done (time: 56 ms)
20:05:34 T:2953850880 M:551510016   DEBUG: CacheSubtitles: END (total time: 58 ms)
20:05:34 T:2953850880 M:551510016    INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles done
20:05:34 T:2953850880 M:551510016  NOTICE: Creating Demuxer

Code:
20:05:34 T:2953850880 M:538148864  NOTICE: Opening Subtitle stream: 2 source: 256
20:05:34 T:2963464192 M:538148864   DEBUG: thread start, auto delete: 0
20:05:34 T:2953850880 M:538148864   DEBUG: FactoryCodec - Overlay: FFmpeg Subtitle Decoder - Opening
20:05:34 T:2963464192 M:538148864  NOTICE: running thread: CDVDPlayerAudio::Process()
20:05:34 T:2953850880 M:538148864   DEBUG: Open - Unable to find codec 94213
20:05:34 T:2953850880 M:538148864   DEBUG: FactoryCodec - Overlay: FFmpeg Subtitle Decoder - Failed
20:05:34 T:2953850880 M:538148864   ERROR: OpenStream - Unable to init overlay codec
20:05:34 T:2953850880 M:538148864 WARNING: OpenSubtitleStream - Unsupported stream 2. Stream disabled.
20:05:34 T:2953850880 M:538148864 WARNING: OpenDefaultStreams - failed to restore selected subtitle stream (0)
20:05:34 T:2953850880 M:538148864  NOTICE: Opening Subtitle stream: 2 source: 256
20:05:34 T:2953850880 M:538148864  NOTICE: Opening Subtitle stream: 3 source: 256
20:05:34 T:2953850880 M:538148864   DEBUG: FactoryCodec - Overlay: FFmpeg Subtitle Decoder - Opening
20:05:34 T:2953850880 M:538148864   DEBUG: Open - Unable to find codec 94213
20:05:34 T:2953850880 M:538148864   DEBUG: FactoryCodec - Overlay: FFmpeg Subtitle Decoder - Failed
20:05:34 T:2953850880 M:538148864   ERROR: OpenStream - Unable to init overlay codec
20:05:34 T:2953850880 M:538148864 WARNING: OpenSubtitleStream - Unsupported stream 3. Stream disabled.

What is wrong with the file?

Is it because there is no "ID 3"? (Similar to "Text #2 ID : 5" ) - the file has ID 1, ID 2, ID 4, ID 5

Cheers!
Reply
#2
So a few people have looked at it now without response.

Should I file a bug report. I have a short video (copyright free) that i created which i can upload as a sample.
Reply
#3
The first thing to test is whether they show in something like ffplay from ffmpeg - it may be an ffmpeg error is all.

Assuming that's ok, then yes, file a bug report.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
Thanks for your reply Jonathan.

I had a go at trying to get/make ffplay etc but failed miserably after a couple of hours (i have no knowledge of building or compiling - and not clever enough either!).

Could I be cheeky and upload a non copy-writed video to rapidshare and ask you or someone else to give it a quick test?

If it works in anyone else's xbmc then that would be great!

The video is a short video(<20 sec, 3.3mb download) of a friend in slow motion with the following subtitle (which works in quicktime&vlc but not in XBMC)

http://www.mediafire.com/?e22fkvqn2qb8mm8

The subtitle is simply:
Code:
1
00:00:01,00 --> 00:00:03,000
- Ball is thrown
- Looks like it is going to hurt

2
00:00:05,00 --> 00:00:10,000
- This is not good

3
00:00:10,00 --> 00:00:15,000
- Pain Occurs


Many thanks!
Reply
#5
From further digging I couldn't find anything using the error code from xbmc in any ffmpeg stuff but did find another post on xbmc:
http://forum.xbmc.org/showthread.php?tid=61669

And A boxee post:
http://forums.boxee.tv/showthread.php?t=20378 (though this seems largely irrelevant)
Reply
#6
FYI: I did add to your ticket and agree with your thoughts plus added a bit more support material ... http://trac.xbmc.org/ticket/11360#comment:8
Reply
#7
Yea I saw. Cheers for mentioning handbrake - I use that to attach subtitles and sometimes it works, others it does't.

Your ticket seems to imply you had some linux experience, perhaps you could try jmarshall's suggestion about ffplay. I still can't figure it - i'm not good at that sort of thing, I try plenty.
Reply
#8
pseudo7 Wrote:Yea I saw. Cheers for mentioning handbrake - I use that to attach subtitles and sometimes it works, others it does't.

Your ticket seems to imply you had some linux experience, perhaps you could try jmarshall's suggestion about ffplay. I still can't figure it - i'm not good at that sort of thing, I try plenty.

The only linux boxes I have are my three linux atv 1's ! I actually compile xbmc on them then install from there so I can use git head. At any rate ... I don't have a compiled version of ffplay on my mac but can try to compile it. Otherwise some other HandBrake devs have linux and I will see if one of them can give ffplay on linux a spin. A note though ... On mac you can use a player called Movist ... this allows you to switch between QuickTime and FFmpeg encoding . Now on Quicktime decoding the subs show up just fine ... when you switch to ffmpeg encoding they don't.

That said we use ffmpeg to decode .mp4s when we read them. In that case the ffmpeg decoder *does* pick up the subs track. This however does not imply that ffmpeg could *play* them. XBMC (and yes, I have tested head as of yesterday does see the subs tag as you pointed out (it shows up as there in the audio and subs panel) it just apparently has issues displaying them.

I went to try Mplayer extended but for some reason it choked on my file though its a pretty old version.

Frankly I was under the (apparently wrong) impression that xbmc used its own player. Will keep digging as best I can to provide more support material though it would seem the samples provided and docs would be a good start.

As an aside I am surprised you have had issues with HandBrake embedding srt's as opposed to subler, they both use basically similar code and the same libmp4v2 mp4 muxer. In fact subler was written by ritsuka an hb dev.

EDIT: Okay just updated Mplayer (which is based on ffmpeg) ... Your subtitles show up in mplayer. So that works.

Will attach a log from mplayer to the ticket.
Reply
#9
Sorry dude, I do check this thread but then every time I post in the ticket you have posted here.
I think we've exhausted both of our knowledges on what it could be without specifically knowing the ins and outs of XBMC.

As a tidbit of information, XBMC did use its own decoding thing DVDplayer:
quite a good wiki on it:
http://wiki.xbmc.org/index.php?title=DVDPlayer

If anything (with regard to the subtitles) I would like to know how hard it is to implement as I never like the idea requesting something that is really really challenging to implement especially when developers do this in their free time. It's not fair.
Although i'm thinking of offering a financial reward for the resolution of this issue if it more than a simple bug fix as it is important to me (have bit of a hearing loss in both ears so I like subtitles in my films and having them in the container makes it easier as their the correct subtitles(in sync)).
Reply

Logout Mark Read Team Forum Stats Members Help
.srt subtitles not working0