Writing some subs support. Need some help
#1
Hi,

I checked current DVDPlayer and MPLayer code responsible for separate file subtitles support and decided to add support for:

MicroDVD {240}{288} and {240}{}
MPL2 [100][120]
TMPlayer/VPlayer 00:00:10:

Most of others could be also easy ported from MPlayer's code but nowdays 90% is MicroDVD and other 10% is SRT + TMplayer for older stuff

Currently I got c/cpp app that knows how to count iPTSStartTime, iPTSStopTime and got subtitle body in char line[1024]. All of this per one line so I believe that with
Code:
while (m_pStream->ReadLine(line, sizeof(line)))
it should work.
It also does detect MicroDVD, MPL2, TMPlayer and SRT formats. Again others detection can be easily implemented as most of my code is more or less DVDPlayer's and MPlayer's + my way how to compute iPTSStartTime, iPTSStop for DVDPlayer.

It does not support any text formatting (<i>, /, {y:i}, etc.) and will act just like XBMC for Xbox - just show them as a text

Now what help I need.
1. If I edit DVDPlayerSubtitle.cpp, DVDPlayerSubtitle.h and add some files to DVDSubtitles folder, I only need to modify and recompile Makefiles in dvdplayer and dvdplayer/DVDSubtitles ?
2. How will DVDplayer act if it gets one subtitle endtime in for ex 00:00:05 and next subtitle starttime in 00:00:04 ? I add about 3-4s to starttime and use it as endtime for subs without endtime ( {240}{} and 00:00:10:)
3. What is the fastest way of getting movie's FPS at DVDSubtitleParser<put_sub_format_here>.cpp level? If possible, without passing it as a variable between 10000 functions
Regards,
Embrion
Reply
#2
P.S. Does DVDPlayer support '\n' in pOverlay->AddElement(new CDVDOverlayText::CElementText(strUTF8.c_str())); or in case of | in subtitle, I need to split it into two lines and pass one at time?
Regards,
Embrion
Reply
#3
Thumbs Up 
Great to see someone working on this! I recommend you try to catch elupus and/or vulkanr on IRC to get the answers to your questions on-the-fly.
http://wiki.xbmc.org/?title=Appendix_D:_...ment_Notes
http://wiki.xbmc.org/?title=DVDPlayer
http://forum.xbmc.org/showthread.php?tid=6982

PS! You do not happen to be a student?, if so see this: http://wiki.xbmc.org/?title=Google_Summer_of_Code_2008
Quote:Team-XBMC proposal ideas up for discussion

...

* Unified Subtitle Parser / Display Filter Library for XBMC's in-house DVDPlayer video-player core
** Create a Unified Subtitle Parser Library for external and embedded subtitles, plus a FFmpeg libavfilter filter for it
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.
Reply
#4
Well, I am a student (currently finishing engineer's degree studies) but at the end of march I must finish writing my engineer's degree work and than I'm not a student anymore (at least not before I start master's degree studies which is after end of summer)
Apart from this, I only want my subtitles to work and share this with others so I'll leave GCoC to someone who's going to do something more than me and spend more time than me on codingSmile

Thx for info, I'll try to catch one of the devs and ask them.
Regards,
Embrion
Reply
#5
a CElementText can add multiline subtitles like that yes, so you don't need to separate.

assuming only dvdplayer folder needs to be recompile is bound to cause problems. make sure you have ccache installed, and do a make depend in root of xbmc after each svn update and you get atleast some dep tracking. but before you do extensive error tracking, do a rebuild. don't know how many wasted hours i've had due to compile issues.
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
#6
skip microdvd, I already have code for that. just need to fixup stuff with video fps.
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
#7
Well, if You're doing MicroDVD, maybe You could add also others I made code for?
Check out http://pastebin.com/m7bf29e10
Mostly it would be copy, paste job to existing SRT parser
Regards,
Embrion
Reply
#8
Well whip up a patch and I'll review and apply it if looks fine. Feel free to create a general class for timestamp based formats (take a flag on constructor or something indicating type).
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
#9
OK. I'll start as soon as I finish my engineer's degree exam and stuff
Regards,
Embrion
Reply

Logout Mark Read Team Forum Stats Members Help
Writing some subs support. Need some help0