anime - .ass/.avs/ffmpeg vfilter/fonts

I believe that plex is built on ffmpeg right? If not the rest of this might not apply perfectly but i'll go ahead and explain. 

 

anime is subtitled with soft subs in .ass format. Most of the time, this includes complex "typesetting" to translate text on screen. these are done with xy-vsfilter on most renderers such as MPC-HC, MPC-BE. VLC/XMBC uses libass which is also baked into most distributions of ffmpeg. 

 

I believe that plex is burning the subtitles into anime when streamed but its apparently not doing it through libass. because libass rarely has the issues that plex has. 

 

no matter what, plex would need to rip fonts (can be done with mkvextract) and installed to the system. this would probably require plex to be installed and run with administration privileges. 

 

so a few possible ways that anime streaming could become easy with plex. 

 

  1. an "anime" category like "TV shows" "Movies" etc that applies some different workflow than the normal streaming. This could include:
    1. using libass and ffmpeg's vfilter.
      1. i've done it before and it's pretty simple. mkvextract the .ass file then pass the argument 
        vfilter="/path/to/nameof.ass"
        

        which is fairly simple. As long as fonts are installed, this should result in proper subtitles burned in on the fly 95% of the time. Libass isn't perfect but its much better than plex currently. 

      2. even if ffmpeg isn't used, libass is available here: https://code.google.com/p/libass/

    2. using avisynth. (this is a much more powerful option and ensures that the subtitles will be seen as they were designed by the fansubbers. but may require a newer computer [but not much more than plex requires if at all])

      1. Alert users that they must install avisynth to properly support anime subtitles when they select the anime category and provide a download link to the needed filters and where to install them.

      2. 99% of anime would be supported by just two filters: ffmpegsource2 to load the video into avisynth and xy-vsfilter to burn subtitles in. Audio could be handled as it already is.

      3. then generate a .avs file (its just text) with the following inside:

        ffmpegsource2("/path/to/anime/episode.mkv")
        TextSub("/path/to/subtitles.ass")
        #spline36resize(x-pixels,y-pixels) 
        #optional if you wanted avisynth to pre-process resizing to device screen size
      4. And allow .avs as a playable content type in plex. (P.S. it already shows this on iPhone at least but crashes when trying to play it)

right now, .ass subtitle support is horrible in plex and results in errors like this: d.pr/i/aYNP   

(I've just noticed the subtitles are even a frame or two off and this sign was handled much better than most.)

 

when it should look like this (textsub through xy-vsfilter): d.pr/i/AH6A

 

and the original looks like this: d.pr/i/xuD8

 

I can help developers on how each of these parts work on a general basis including how to rip fonts in bulk using mkvextract. ffmpeg supports .avs and libass already so that should be an easy solution (assuming that plex is built on ffmpeg as I believe.)

 
 

Oh no.. look at me necroing two post... Bah better then making new ones.

Imgur mirror for 'when it should look like this (textsub through xy-vsfilter)'

imgur mirror for the original

Looks like the one that actually matters is lost.. hilariously enough.. I can try to get another set of examples later I am going to bed now.  (or perhaps I can get the OP to find a copy of the image hah)

I could have made a new topic but OP gave a good solution it looks like and explained it far better then I could.. (Would be perfect if his top picture didn't die)

Anyways this would make watching anime on Plex a lot better imo ...

 
I made new examples

Example of error

Example of what it looks like with PHT direct play

Example of what it looks like on MPC-HC

Sorry I don't have a picture of what it looks like through the filter...as I don't know how to do that.

edit: another example of the error

Example of what it should look like

These are all from Bakemonogatari s01e01

Randomacts,


I will work on getting an example back up. Need to get the original into a plex directory again.


If you are using MPC-HC or MPC-BE or kawaii codec pack or k-lite then you are already using xy-vsfilter.


I just re-read my original post and i dont know what i was thinking. This probably does use libass. The problem is libass is extraordinarily slower than xy-vsfilter. Which is bad for a live-streaming situation like plex.


The best option would therefore be to use xy-vsfilter. The one limitation to xy-vsfilter is that it is windows only. So i dont know if the plex devs are willing to implement but i wish they would.

Yeah.. it really is awful... At least for Direct Play it works fine. But we can't always have direct play...

Does crunchyroll the only real legal option for subbed anime even do subs like my examples correctly?

Ummm with crunchyroll, problems like these arent going to be an issue because they dont bother to make it look nice.


No “legal” options are going to look as good as a fansub. You might try air video HD if you are on an ios device. It’s libass implementation is much much better. But still not perfect

I didn't know I never bothered to check crunchyroll.. I went right to fansubs =p

I am not on iOS... My devices are Windows 8.1 computer , nexus 5, chromecast , my brother has a windows 8.1 laptop (however it is too weak to direct play =p)  and a windows 8.1 desktop.

i wouldn't be a fan of using xy-vsfilter as a real permanent solution due to the windows-only thing (though an option for windows users as a temporary solution would be welcomed).  an option for libass to fully render the subtitles (with, of course, a warning that it would be massively CPU-intensive) would be ideal for cross-platform compatibility, though that would be pinned on the hopes that libass becomes more optimized down the line.

It would be real nice to use my anime even if it is trasncoded... right now really only direct play is useable.

Early 2021 clean-up: duplicate