News:

--

Main Menu

Handling srt subtitles when cutting

Started by pgr, July 08, 2017, 10:06:42 AM

Previous topic - Next topic

pgr

Hi!

I've seen a few threads here regarding subtitles, most of them mention .ts files, in the context of DVD ripping.

That is NOT my question - I'm thinking about subtitles contained in .srt files (text files), whether they are packaged in a container like .m4v or as a separate file to be used by the video player along with the movie.

I often cut movies and I need to handle the srt files separately, which is a lot of hard work. Depackaging, separately editing video, then subtitles, then repackaging.

I suspect adding this feature into Avidemux shouldn't be too difficult, since Avidemux already handles editing video and audio simultaneously, this is just another channel with its own rules. But it does require some coding to adapt subtitles durations when you cut in the middle of one, etc.

I am a C++ developer (though I'm a bit out of touch, haven't developed professionally for 10 years since I became a manager).

I wouldn't mind writing this library for Avidemux. But I don't have that much time so I can't be expected to get into this large, complex project and figure out where it fits.

So @mean, do you think you could at least come up with a specification of an interface? Then I would write up the functions for you. Something like

loadSrtFile(filename)
getSrtSegment(srtFile, timeStart, Duration, destinationTimeOffset)
concatenateSrtSegments(srt1, srt2)
etc.

Does this look feasible to you? Or is it still too much work for you?

Thanks!

pls_help_im_under_water

Hi pgr,

I'm also quite annoyed that subtitles aren't edited along with the video and audio track. Did you eventually implement a solution for this? If not, did you find a way to improve your workflow to make it less cumbersome?

Thanks in advance.
- Ben