ssa/ass support (implemented please read)

Got an idea? Missing something? Post your feature request here.
Ricky1252
Contributor
Contributor
Posts: 12
Joined: 18 Mar 2013, 01:13
Has thanked: 4 times
Been thanked: 7 times

ssa/ass support (implemented please read)

Unread post by Ricky1252 »

Hello Madsonic users.

I have implemented the use of ssa/ass A bit more user friendly guide for subsonic/madsonic and I request src to add a bit of code for my method to work. Currently im stuck using 3180, which I love! however, upgrading would allow me to see more amazing development, and that would be great! =) Ill explain the proccess in hope its added or grant me access to src so I can add it myself for new releases.

First off the code I require is in transcoding service, basically need basefilename the way i implemented it
more or less I added this at the beginning on the interpolation strings

Code: Select all

String filenn = mediaFile.getName();
also a bit further down

Code: Select all

            if (cmd.contains("%f")) {

                cmd = cmd.replace("%f", filenn);

            }
this adds %f to be basefilename....

ffmpeg will need to be upgraded to have --enable-libass. Recompile or download a compiled version of ffmpeg with --enable-libass and of course place it in the transcode folder.

Although there is many ways to do this next part, the easiest route would be creating a folder for your subtitles. I created a folder called sub for my ass/ssa subtitles... /var/subsonic/transcode/sub

The ssa/ass subtitles require to be manually placed here. If there is no file for said video, it will not play. Of course I have a workaround for this.
Creat a file named clean.ass.
clean.ass

Code: Select all

[Script Info]
ScriptType: v4.00+
[V4+ Styles]
this should be the contents of the file. place it in /var/subsonic/transcode/

now for transcoding... note, I only use this for mkv's.
step 1 - workaround for no ass file...

Code: Select all

ffmpeg -i /var/subsonic/transcode/clean.ass -n /var/subsonic/transcode/sub/%f.ass
step 2

Code: Select all

ffmpeg -ss %o -i %s -b %bk -s %wx%h -copyts -af asetpts=PTS-%o/TB -vf ass='/var/subsonic/transcode/sub/%f.ass',setpts=PTS-%o/TB -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -

and ta da! done! you now have working ssa/ass subtitles for Subsonic/Madsonic.

One last thing I want to note, fonts may need to be added for some of the subtitles to work properly. Iv only done this on linux. Any with questions or comments please ask away and ill be happy to answer or help! =]
These users thanked the author Ricky1252 for the post:
Madsonic
Rating: 7.69%
Post Reply