Styled Subtitles

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Styled Subtitles

Postby snowx1000 » Sun Jan 25, 2009 5:20 pm

Is it possible to get styled subtitles to show up correctly with the linux build ( I messed with all the checkboxes etc). I am using the latest packages of mplayer/mencoder from the smplayer repository which supposedly has the libass patch for mencoder. Mplayer/smplayer display styled subs perfectly. Thanks.
snowx1000
 
Posts: 6
Joined: Sun Jan 25, 2009 5:18 pm

Re: Styled Subtitles

Postby snowx1000 » Sun Jan 25, 2009 6:15 pm

After going through the debug log, I see that the media server is passing the force-ass argument to mencoder specifying arial on all movies. Is there a way to let it just use what the file specifies?

EDIT: After going through the source and recompiling with different mencoder options, I realized that the problem was actually with ffmepg since that seems to be piping the mencoder stream to the ps3. I saw that recent builds of ffmpeg have ASS support (the good kind) so I compiled the latest SVN and bam, styled subs using the linux server! Anybody else running Ubuntu might have the same issue (the Medibuntu builds are really out of date). Also, make sure to check all sub options in transcoding.

Here is a guide to help:
http://ubuntuforums.org/showthread.php? ... fmpeg+x264
snowx1000
 
Posts: 6
Joined: Sun Jan 25, 2009 5:18 pm

Re: Styled Subtitles

Postby snowx1000 » Wed Feb 18, 2009 10:29 pm

bump
snowx1000
 
Posts: 6
Joined: Sun Jan 25, 2009 5:18 pm

Re: Styled Subtitles

Postby jozua » Tue May 19, 2009 4:57 pm

I can't use styled subs on my Ubuntu 9.0.4, i added the medibuntu sources list, but no sigar.
After seeing this post i also builf ffmpeg the way the page described, yet i can't get PS3Mediaserver to display ASS styled subs.

I think the problem lies with mencoder because of the following:
- When i use the version medibuntu or ubuntu tries to give me (or any other pre-compiled version) and i turn on ASS subs in PS3Media server, it'll give me a corrupt data screen on every movie that uses subs.
- When i compile my own version with ASS subs enabled, PS3Media server shows me the movie on my screen, but without any subs, even if i select the subs in the transcoding folder.
- When i run the command that PS3Media server uses to get a working video file (with ASS enabled), and play it later on my own pc, it plays fine, but without subs. If i do this with the mencoder from ubuntu or medibuntu it gives me a segmentation fault.
- When i select fontconfig+ASS default style, the video plays fine with subs (but not styled ofcourse).
- When i search all over the internet for this problem i come across posts on the mplayer.hq-dev mailinglist that say that ASS support is not working in mencoder. For some reason there is a patch, but it does not seem to do anything on my system.
Patch i tried can be found here: (http://forum.doom9.org/archive/index.php/t-142714.html) or here (http://lists.zerezo.com/mplayer-dev-eng/msg20795.html)
- Lastly, when i play the same files in mplayer, it plays fine with styled ASS subs, so finding the decoder/fonts are not the problem.

I'd be happy to get styled subs working, and i'll probably will keep trying some more, but i think i've hit a dead end at the moment and maybe only the guys who develop mencoder can actually fix this.
jozua
 
Posts: 11
Joined: Sat May 16, 2009 4:23 pm

Re: Styled Subtitles

Postby jozua » Sun May 24, 2009 12:38 pm

Ok, i've seem to have solved the problem of not displaying the ASS subtitles, it works now with ASS & Fontconfig enabled in PMS, thanks to the sticky post on top of this forum. Should've seen that sooner. :oops:
But.. it still wants to default to Arial according to the line generated bij PMS when it transcodes, it doesn't use the embedded subtitles and therefore it still looks different when i play it with mplayer (or any other) on the same machine as where is stream the video to the ps3 from.
Maybe it's something with the fonts, i'll try to find the font used and add that to to fonts on the machine, maybe that helps.
jozua
 
Posts: 11
Joined: Sat May 16, 2009 4:23 pm

Re: Styled Subtitles

Postby jozua » Sun May 24, 2009 2:18 pm

Well, extracting the fonts and installing them on the system didn't work. I installed them in ~/.fonts, updated my fontscache and pointed PMS to the folder for "alternate subs", but it still gave me the arial subs and this line in the log:

mencoder -ss 0 -quiet /storage/public/Anime/Unburned/Jigoku Shoujo Mitsuganae/[FTP-A]Jigoku Shoujo Mitsuganae 01[H264](1280x720)[4AAE475D].mkv -quiet -quiet -oac lavc -of mpeg -lavfopts format=asf -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 2 -lavdopts debug=0:threads=1 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=256:threads=1:keyint=1:vqscale=1:vqmin=2 -ass -fontconfig -subcp cp1251 -subfont /usr/share/fonts/truetype/msttcorefonts/Arial.ttf -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1 -ass-force-style FontName=Arial,Outline=1,Shadow=2,MarginV=10 -quiet -quiet -sid 0 -quiet -quiet -ofps 24000/1001 -quiet -quiet -mc 0 -noskip -af lavcresample=48000 -srate 48000 -o /tmp/javaps3media/mencoder1243170593736

It seems like its forcing mencoder to use Arial subs.


When i encode the same video from command line without the follwing options: "-subfont /usr/share/fonts/truetype/msttcorefonts/Arial.ttf" & "-ass-force-style FontName=Arial,Outline=1,Shadow=2,MarginV=10", it plays with the intended subs. Althought it pauses about every fraction of a second, something seems to be wrong with the encoding.
Anyone has any ideas on how to encode it properly?
jozua
 
Posts: 11
Joined: Sat May 16, 2009 4:23 pm

Re: Styled Subtitles

Postby jozua » Sun May 24, 2009 5:39 pm

I tried playing a file again and saw these lines in the debug log of PMS:
[New I/O server worker #1-1] DEBUG 18:29:00.369 Search extension for caadl.ttf
[New I/O server worker #1-1] DEBUG 18:29:00.369 Search extension for EFFLORES.ttf
[New I/O server worker #1-1] DEBUG 18:29:00.370 Search extension for batang.ttc

Apparantly PMS is searching for these fonts, it does so after the transcoding which seems to suggest it transcodes with arial subfont. And i don't see any line where it says it failed to load a font.
I still can use these fonts in office applications so the system itself can find them. I put all the subtitle fonts in another folder in my home directory (~/.fonts) before i updated the cache. Maybe PMS only searches /usr/share/fonts/truetype? I'll try putting them there next.

[edit]
Ok, i've put the subtitles in a seperate folder in the system's truetype folder and updated the cache again, now the lines mentioned above are gone. Seems it isn't searching for the fonts anymore.. but, i still see the arial font, not solved yet.
jozua
 
Posts: 11
Joined: Sat May 16, 2009 4:23 pm

Re: Styled Subtitles

Postby CifeX » Fri Oct 30, 2009 12:01 am

I find a solution :D

1) compile mencoder with ass patch (http://smplayer.svn.sourceforge.net/vie ... s/patches/) (remove other mencoder before)
2) in pms tick ASS + fontconfig + ASS default style
3)in option add : container == mkv :: -keep-pts
CifeX
 
Posts: 6
Joined: Wed Jan 21, 2009 2:35 am

Re: Styled Subtitles

Postby jozua » Sat Nov 14, 2009 5:15 pm

Yes, thanks for that, i finally got it to work :)

I've read this a while ago, but couldnt try it out because i switched to amd64 for a while. But after reading this i switched back to Debian 32bit again and tried this out. Too bad 64 bits wont get decent codec support :(
One note, i thought you put the line about -keep-pts in the custom options, it only worked for me after editing the "expert settings" and put it there in the same format as the other options.
Now ive got decent subs again on my anime, thanks very much!
jozua
 
Posts: 11
Joined: Sat May 16, 2009 4:23 pm

Re: Styled Subtitles

Postby CifeX » Sun Nov 22, 2009 7:05 pm

i'm on mandriva 64 and it work fine, don't for you?
i just compiled x264, ffmpeg-mt and mplayer with ass patch.
you're right about keep-pts but i believe it's an optionnal line, you can test and remove it.
CifeX
 
Posts: 6
Joined: Wed Jan 21, 2009 2:35 am

Next

Return to Linux/Unix Support

Who is online

Users browsing this forum: Bing [Bot] and 9 guests