Fix duplicate subtitles with different extensions - #37
Conversation
|
That's actually the intended behaviour. What I meant by 'desired' is the behaviour you are describing where all subtitles streams are extracted then saved/converted to the desired format. I intended it that way as I meant for this tool as an standardisation tool for subtitles (i.e. all in same srt format) regardless of the original format. Perhaps what you're proposing or fixing could be a separate feature / flag where only targeted formats will extracted? I think it may be better implemented that way? |
|
But it's not really doing conversion, is it? At least I don't do any post-processing, and just extracting an ASS subtitle stream and saving it with an |
|
There's conversation being done by ffmpeg during extraction process even without postprocessing. However, an possible issue I noticed in the past when converting ass to srt is that ffmpeg often leaves behind some positioning tags which I theorized is causing issues for some players in your case. The postprocessing step for srt actually cleans it out and I personally never had any issues with player not recognizing the srt file afterwards. The only issues with ass to srt is that some very complex ass files (i.e. multi-line texts) simply just can't be put in srt format without subtitles taking up the whole screen. |
|
Got it, then I think the behavior I added would need more changes to be a separate feature. I'll close this PR because it won't fit as it is then. |
Hi, I noticed some subtitle file duplicates after extraction, which happened because of the loop over the desired extensions:
srtwas desired, every supported subtitle stream was extracted and saved with that extension.asswas also desired, the same happened, overlapping with the subs extracted previously but now with a different extension.I did a quick fix with a dict of extensions to supported codecs, but I only included the ones that still seem relevant, not sure what you think about that.