Re: [Audacity-devel] Add support for importing/exporting SRT subtitles as labels
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Pokechu22 <pok...@gm...> - 2019-11-13 18:45:56
|
After looking over the recently closed pull requests, it turns out PR #170 <https://github.com/audacity/audacity/pull/170> *also* implemented the subrip format, and that there is a wiki page about using SRT with Audacity <https://wiki.audacityteam.org/wiki/Movie_subtitles_%28*.SRT%29> by manually converting the label format. Our implementations are fairly similar, but #170 uses wxDateTime and ParseFormat, which seems a lot simpler. It shouldn't be too hard to reimplement it based on that. That PR also used "|" to indicate a newline in the label editor, which is an interesting choice. Ideally we'd just support multiline labels natively, but that's also a good option to consider. --Poke On Mon, Oct 14, 2019 at 12:58 PM Pokechu22 < pok...@gm...> wrote: > For me at least, I implemented this so that I could caption an audio file > <https://commons.wikimedia.org/wiki/File:Eisenhower_farewell_address.ogg>. > Captioning a video file would definitely also work, but that adds a bit of > complexity regarding positions on screen (which both SubRip and WebVTT > support to various degrees). I don't think it's super important for the > average user (since I don't think many people use labels as is) but I think > people who have a use for it would benefit greatly. > > Barring that, one thing I did not address with SubRip is that it supports > multiple lines in captions, which is not supported by labels in audacity. > Beyond just editing, the current text format would not work with multiple > lines on a single label. With the current PR I just flattened it into one > line when importing, but more advanced labels would allow for it. > > Code-wise, I would like some advice on how to improve the timestamp > parsing, since it's rather messy. > > Regarding Karaoke: it probably failed to record since it's not rendered > using the GPU. An external screen recorder (e.g. OBS > <https://obsproject.com/>) probably would work. It probably also would > be possible to render a video using FFmpeg since I believe you can pipe raw > video to it and it can encode it, but I don't know enough about that to > implement it. > > Regarding images: I don't think any subtitle format supports those, since > it would not be machine readable. It looks like WebVVT might support it through > CSS <https://w3c.github.io/webvtt/#obtaining-css-boxes>, but it would be > pretty messy. I'm not entirely sure how it'd be used, either. > > --Poke > > On Mon, Oct 14, 2019 at 12:00 PM Robert Hänggi <aar...@gm...> > wrote: > >> I'm 100 % for it. >> While we're at video: >> I've tried to make a lyrics video from Audacity by screen capturing >> the Karaoke window (with the XBox game bar, Windows+G) but it didn't >> work for my graphics card. >> A native way to do it would be great. >> It would also be nice to be able to import still images into a label >> and let Audacity export that. >> Looking forward to your suggestions/PRs. >> Robert >> >> On 14/10/2019, James Crook <cr...@in...> wrote: >> > We're not doing too well on staying on top of pull requests. >> > We have 26 open and 338 closed. >> > >> > Ideally we'd have one person responsible for ensuring every pull request >> > got an answer and most of the time have no open pull requests. >> > >> > I suspect nothing happened there because no one here had worked with sub >> > rip format, so noone had an idea of how important (or not) it was. >> > I don't think support for WebVTT is essential to progressing/accepting >> > srt support. I do think if we intend WebVTT, it would be wise to plan >> > an update to labels. >> > >> > --James. >> > >> > >> > On 14/10/2019 18:49, Jonatã Bolzan wrote: >> >> Hi >> >> >> >> I see no discussion about this PR: >> >> https://github.com/audacity/audacity/pull/170 >> >> >> >> What do you think? I think this is interesting as Audacity can be used >> >> for >> >> video-related projects. In the future, I would be interested in >> extending >> >> support for WebVTT if this is something you are interested in. >> >> >> >> Thanks for considering. >> >> -- >> >> Jonatã Bolzan Loss >> >> >> >> >> >> >> >> _______________________________________________ >> >> audacity-devel mailing list >> >> aud...@li... >> >> https://lists.sourceforge.net/lists/listinfo/audacity-devel >> > >> > >> > >> >> >> _______________________________________________ >> audacity-devel mailing list >> aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-devel >> > |