ECToo / lavfilters

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

Allowing selecting subtitles by substring match (patch included) #453

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great if LAV could automatically select subtitles based on the name 
of the subtitle track. For example, one could have LAV automatically select the 
track containing the substring "songs" in order to load "Songs & Signs" tracks 
by default instead of the full subtitles.

I've attached a patch which adds this functionality. It allows one to use rules 
like *:*@songs to select any subtitle track with the text "songs" in its name. 
One can also specify flags too, so one could write eng:fr|n@asdf to say: if 
english audio, try to use normal french subtitles with a name containing "asdf".

Note that I haven't been able to actually test the patch, as I don't have the 
environment to build LAV right now. However, if you're willing to test it, I'm 
happy to fix any bugs you identify.

Original issue reported on code.google.com by johnp...@gmail.com on 10 May 2014 at 11:52

Attachments:

GoogleCodeExporter commented 9 years ago
Oops, this should be marked as "feature request," not defect.

Original comment by johnp...@gmail.com on 10 May 2014 at 11:53

GoogleCodeExporter commented 9 years ago
I've attached a revised version of the patch. (It turns out the original 
version didn't even compile. I briefly tested this one, though, and it seems to 
work.)

Also, I wrote this under some assumptions (detailed in the comments) that 
someone more familiar with the project could probably confirm/deny. If you're 
interested in the patch, you might want to take a look at those.

Original comment by johnp...@gmail.com on 10 May 2014 at 11:03

Attachments:

GoogleCodeExporter commented 9 years ago
Nice! I asked about this three years ago on Doom9 and was told that selecting 
by name is not possible and I had to edit and force the stream I wanted, I 
couldn't see why it couldn't be added as surely it would be just a case of 
reading the string and selecting it. Perhaps I should have added the feature 
request back then but I interpreted that answer to mean that it being not 
actually possible to do this.. anyway glad to see some very useful features 
added, many of us will no doubt make good use of this if it works, thanks!

Original comment by RytheSta...@gmail.com on 14 May 2014 at 3:35

GoogleCodeExporter commented 9 years ago
Is there any chance this can be merged? I'm happy to make any necessary changes 
that would facilitate this.

Original comment by johnp...@gmail.com on 27 May 2014 at 2:35

GoogleCodeExporter commented 9 years ago
I restructured the way the matching is done to avoid the need of the mediatype 
and the wchar conversion, as the original title was in utf8 anyway.

Otherwise applied, thanks.

I'm not entirely happy that you can't match spaces, but what can you do. 
Allowing quoted strings would explode the regex complexity.

Original comment by h.lepp...@gmail.com on 1 Sep 2014 at 11:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision fa592f198eb6.

Original comment by h.lepp...@gmail.com on 1 Sep 2014 at 11:24