subed icon indicating copy to clipboard operation
subed copied to clipboard

Describe workflow for writing new subtitles?

Open larsmagne opened this issue 4 years ago • 10 comments

The README seems geared towards editing existing subtitles. It would be nice if there was a section there to describe what the typical workflow would be when writing brand new subtitles: I've played around with the mode for fifteen minutes, and I don't think I've quite understood how this mode is to be used efficiently.

larsmagne avatar Nov 29 '19 03:11 larsmagne

Editing is indeed my use case. I've tried to keep creating subtitles from scratch in mind, but I couldn't come up with a good work flow.

Even the editing work flow hasn't been very efficient for me. I think the mpv integration should be much tighter but I'm not sure how exactly.

If C-h m doesn't help, I'm afraid I can't either.

rndusr avatar Nov 29 '19 10:11 rndusr

I've uploaded a movie to Youtube, and then made Youtube auto-segment the audio, and then downloaded the resulting .srt file from Youtube. :-/ It has no text, of course, but it does mark the sections where there's talking, so using that I'm making some progress.

But it can be hard to actually hear what people are saying when listening to looped snippets, so I've added some commands to snap out of the loops and listen more continuously, which helps.

The mode seems quite intuitive once you've got a scaffolding going. But, yes, the mpv integration needs just a bit more... stuff. Perhaps widening the loops sometime.

larsmagne avatar Nov 29 '19 15:11 larsmagne

I think I've added options that let you define how much time before/after the subtitle the loop to include.

But the issue is that the loop might overlap with the previous subtitle, and then the cursor would jump back to the previous loop if that feature is turned on. Maybe disabling cursor-jumping while looping would fix this. I don't remember if I've tried.

rndusr avatar Nov 29 '19 16:11 rndusr

Adding some time after the loop just makes the mode continue on to the next title (if there's an overlap) due to

subed-mpv-playback-position-hook #'subed--ensure-subtitle-loop

The mode is rather difficult to debug due to all the indirection in the code, and all the functions that seem to appear out of nowhere -- it makes the normal Emacs debugging interfaces rather useless, unfortunately.

larsmagne avatar Nov 29 '19 17:11 larsmagne

It looks like disabling point-to-player sync while looping fixes that issue I vaguely remember. I've pushed a simple fix and changed the default values of subed-loop-seconds-before/after to 1 second.

That should give you some time to understand badly aligned subtitles without moving point.

rndusr avatar Nov 29 '19 18:11 rndusr

I would also be interested in that answer.

alienbogart avatar Mar 09 '20 16:03 alienbogart

I ended up uploading the video to youtube and using their tool to create the "scaffolding": They add the timings for each line, basically, and then I downloaded that file, and used this Emacs mode to fill in the translations. But it's not ideal...

larsmagne avatar Mar 10 '20 09:03 larsmagne

I ended up uploading the video to youtube and using their tool to create the "scaffolding": They add the timings for each line, basically, and then I downloaded that file, and used this Emacs mode to fill in the translations. But it's not ideal...

I coincidentally subtitled my video yesterday using YouTube's builtin tool. It's certainly not ideal, but a lot better than I thought. If I could use Emacs to create subtitles from scratch I could even make that a hobby, all the other programs are so-not-Emacs hahaha

Thanks ;)

alienbogart avatar Mar 10 '20 10:03 alienbogart

Aside from M-i (insert blank subtitle(s)), I have no idea how creating subtitles from scratch would work with Emacs. It looks like there are some other tools that can generate subtitles from audio/video sources, but I haven't used any of them.

https://github.com/search?q=generate+subtitles

rndusr avatar Mar 10 '20 11:03 rndusr

another possibility would be to install and set up vosk https://github.com/alphacep/vosk-api, and then use https://github.com/boi4/subextractor/blob/master/extract_srt.py.

(you have to download some ~1GB models for the speech-to-text extraction.)

this means no upload to youtube, which seems to have a max 15 mins limit for free accounts.

mooseyboots avatar Jun 09 '21 11:06 mooseyboots