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

alexstorm

pgr,

If you are still around and see this, the answer is you need a Edit Decision List (EDL) and AVIDemux doesn't keep one.  Most other editors for video / film do keep such a list after a session.  So, a synced subtitle srt to the EDL list only works, when AVIDemux adds EDL as a new feature.

I think you are stuck until that happens.  Older video editors can probably be purchased for stand alone workstation and not a paid monthly / annual fee for cloud editing.  The only issue, is the lack of codec support in older editors.  Still, you could edit from an high quality master with no compression on older editors, get the EDL list and then there is probably a subtitle editor that automatically updates an .srt based on the EDL.  I use Aegisub which I think will do it.  Give it a try, it's a good subtitle editor program with a lot of features.

Hope that helps.