pepri / subtitles-editor

Visual Studio Code extension for editing SubRip Text (SRT) files with subtitles.
https://marketplace.visualstudio.com/items?itemName=pepri.subtitles-editor
58 stars 8 forks source link

(Feature request) Subtitle conversion #15

Closed piersdeseilligny closed 3 years ago

piersdeseilligny commented 3 years ago

First of all, thanks for the extension! It's great to have one which handles several different subtitle types, rather than just one.

The one extra feature I wish it had is converting between file types, so for example through a "Save subtitle as..." command, which would allow converting, for example, a .sbv file to .srt. I'm not sure what the best approach would be, but I imagine it could be as simple as generating subtitles from whichever intermediary data type the extension uses internally for all its other operations.

pepri commented 3 years ago

Thanks for the feature request! The conversion can get tricky when there are additional metadata on the line with timestamps, or when there is special formatting in the subtitles. I added simple time format conversion, which should cover the most cases. I can add additional commands (strip metadata, strip tags, etc.) if there is a need for them.

The command is available under "Subtitles: Convert Time Format" in version 1.1.6.