OTZIILORD / lavfilters

Automatically exported from code.google.com/p/lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

Subtitle Rendering #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For a full playback experience, LAV should offer subtitle rendering support.

Key-features:
- Support for bitmap subs
  - VobSub
  - DVD (incl. navigation overlays) + EVO
  - DVB
  - Blu-ray (PGS)

- Support for text based subs
  - Plain text (SRT)
  - ASS/SSA

- Alpha-Blending on the video directly through LAV Video
  - YUV and RGB support (all supported output formats would be great)
- Alpha-Blending on D3D surfaces through the MPC-HC subtitle interface
- Possibly a new interface for madVR improvements?

Implementation Notes:

- VobSub/DVD/EVO support is OK in avcodec
- Plain Text can be mapped to ASS/SSA
- ASS/SSA through libass
- State of DVB in avcodec?
- State of PGS in avcodec?

Original issue reported on code.google.com by h.lepp...@gmail.com on 17 Nov 2011 at 12:18

GoogleCodeExporter commented 8 years ago
You mean you want to build sub renderer from the ground? If thats so, this is a 
huge task, you rally should cooperate with some other devs that expressed 
willingness to work on this stuff but said its was hard for them to do 
everything alone. If it will be possible to bring everyone together, it can be 
pretty successful project.
Also note that drawing subs directly on video frame is an obsolete method. 
Currently there is already concept of the new interface for comunication 
between subrenderer and video renderer by YuZhuo and madshi.

Original comment by yakits...@gmail.com on 23 Nov 2011 at 4:37

GoogleCodeExporter commented 8 years ago
I'm aware of the new interface thats being discussed and planned - as you 
might've noticed there is a point referring to it listed above.

Its actually not that huge task, the rendering logic of the subtitles is 
already existant, be it in libass or in ffmpeg, i just need to leverage those 
functions, and offer the resulting bitmaps to a subrenderer (or as an 
alternative, blend them on the video frame if no compatible renderer exists)

Original comment by h.lepp...@gmail.com on 23 Nov 2011 at 9:45

GoogleCodeExporter commented 8 years ago
I think that this will take a lot of effort nevertheless. Maybe if you just add 
a method to the splitter interface to get the current subtitle paragraph text 
at the current position. And then allow players to poll and blend subtitles 
themselves.

Original comment by marino.simic@gmail.com on 28 Apr 2012 at 10:11

GoogleCodeExporter commented 8 years ago
hello. any eta about this? thank you.

Original comment by eu.dan...@gmail.com on 5 Aug 2012 at 2:46

GoogleCodeExporter commented 8 years ago
You do not need the built-in subtitles, as it is a huge amount of work. See at 
that: http://code.google.com/p/xy-vsfilter/downloads/list It has P010 & p016 
support. 

Original comment by vite...@yandex.ru on 9 Aug 2012 at 11:52

GoogleCodeExporter commented 8 years ago
he is not going to build everything from the ground. anyway while vsfilter got 
his life prolonged a bit, it will have to die sooner or later.

Original comment by yakits...@gmail.com on 9 Aug 2012 at 2:57

GoogleCodeExporter commented 8 years ago
The first step will just be DVD subtitles because handling those is a 
requirement for getting DVD playback to work with LAV Video. Anything else - 
we'll see about that in the future.

Original comment by h.lepp...@gmail.com on 9 Aug 2012 at 3:03

GoogleCodeExporter commented 8 years ago
when  will we have the second step? :) 

Original comment by eu.dan...@gmail.com on 15 Nov 2012 at 5:33

GoogleCodeExporter commented 8 years ago
Maybe never? I have no big motivation doing much more at this time. DVD subs 
were required for DVD playback, but everything else, maybe in the distant 
future.

Original comment by h.lepp...@gmail.com on 16 Nov 2012 at 2:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You can delete comments that are inconvenient but that won't make the problem 
disappear. Fair enoug, I'll try logic now.

I don't understand why you don't consider this. You may not need it but there 
are quite a few people that could use this feature, and you yourself said it 
wouldn't be very hard or time consuming. Why not do it? It doesn't have to be 
top priority but how about make it in the not-so-distant future.
Having this feature makes more sense than... let's say... having support for 
OPUS. That's a good extra too - the more, the better - but OPUS is a format 
that is still in development and very, very, very few people actually use. It 
was virtually pointless to add support for it at this stage.

Original comment by lastmome...@gmail.com on 17 Nov 2012 at 1:38

GoogleCodeExporter commented 8 years ago
Adding support for Opus took 10 minutes, if even that. The comparison is rather 
bad.

There are very good subtitle renderer already available, so why spent my effort 
trying to duplicate their work? Its not like you can't view subtitles now. Grab 
xy-vsfilter, its fast and allows rendering subs in high quality.
It may not be "very" hard, but its still a significant effort to get it working 
right. Quick and easy solutions are not what i do, and doing it right takes 
time.

First and foremost, i write an audio and a video decoder. Not post-processors, 
not subtitle renderer. Its an idea for the distant future when i run out of 
other things to do, not more.

Additionally, i work on what i want to work on, stuff thats fun to work on, and 
what i learned working on DVD subs for DVD playback - its not much fun. I can't 
choose what i work on when i'm at my dayjob, but i can for LAV, so i will.

Original comment by h.lepp...@gmail.com on 17 Nov 2012 at 1:46

GoogleCodeExporter commented 8 years ago
We won't bother you when xy-vsfilter will support dxva :)

Original comment by eu.dan...@gmail.com on 17 Nov 2012 at 1:52

GoogleCodeExporter commented 8 years ago
In case you didn't notice, LAV with DVD subs also doesn't show any subs with 
DXVA2-Native, no difference. :P

Original comment by h.lepp...@gmail.com on 17 Nov 2012 at 1:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
10 minutes may not be a lot in and of themselves but considering that virtually 
no one will benefit from the support for OPUS makes even 10 minutes not worth 
it.

Well, there are other video and audio decoder out there as well, and yet you 
duplicate their work. Which is actually good because not all of them are as 
good and/or stable.

Nobody asks for anything quick. It doesn't have to be done in a month or two. 
But, you know, a little by little. It may not be fun but you can consider it a 
gesture to the community. I myself have done things that are not very fun but 
that would help a good number of people.

Still, it's your decision after all. It was worth a shot to try and convince 
you.

Original comment by lastmome...@gmail.com on 17 Nov 2012 at 2:18

GoogleCodeExporter commented 8 years ago
I don't care about dvd's because:
1. CPU usage for dvd's is low. So it doesn't really mather if it is using dxva 
or not
2. for some time now we use blueray. 
Also I think it's a problem for WMP/WMC users. 

Original comment by eu.dan...@gmail.com on 17 Nov 2012 at 2:26

GoogleCodeExporter commented 8 years ago
Like a little child. You take your toys (set it to none) and leave :D This way 
you'll fix it. Maybe you can close to fix it for good.

Original comment by eu.dan...@gmail.com on 17 Nov 2012 at 2:40

GoogleCodeExporter commented 8 years ago
Why priority none for this enhancement? As you said: "For a full playback 
experience, LAV should offer subtitle rendering support." Otherwise it will be 
incomplete and maybe useless in the future. 

Original comment by adipiciu...@gmail.com on 17 Nov 2012 at 2:43

GoogleCodeExporter commented 8 years ago
What priority is listed here, or even if this entry exists or not, does in no 
way influence what i will do. As the description of the "None" Priority field 
says: "There is no timeframe defined when this will be implemented." - and this 
is the truth. I just adjusted the field to properly reflect my intentions.

After i added support for DVD subs and encountered some of the problems 
associated with subtitle rendering, i decided to move this down the list of 
things to do. You're not happy with that? Feel free to contribute code 
yourself. Complaining and asking for stuff is easy.

Anyway, this is not a debate. Contribute and help make it a reality yourself, 
or wait and accept my own timeline, you won't influence it no matter how hard 
you try. My personal time goes into this, so i decide what i use it for.

Original comment by h.lepp...@gmail.com on 17 Nov 2012 at 3:03

GoogleCodeExporter commented 8 years ago
I will not be pursuing further subtitle support in LAV.
The entire topic is too large for me to try to handle in the little time I have 
without having to neglect the other parts of LAV.

Original comment by h.lepp...@gmail.com on 14 Dec 2014 at 10:41