- Bugfix: VTT: Ignore timestamp-like text at the start of subtitle cues.
- subed-word-data: Load JSON data from WhisperX.
- Merging should not include the current subtitle if the point is at the beginning of the subtitle.
- subed-merge-with-next separates subtitles with spaces instead of newlines. If you prefer it the other way (keeping line breaks), let me know and we can make it an option.
- subed-create-file regenerates IDs.
- Bugfix: Handle extra attributes after VTT timestamps (for example, from YouTube VTTs). Thanks to Jeff Trull for reporting this!
- Bugfix: subed-waveform should now handle the
case where the stop time +
subed-waveform-preview-msecs-after might extend
past the end of the file.
Thanks to rodrigomorales1 and rndusr for the bug reports and pull requests!
- Bugfix: Fix the requires in subed-waveform to load subed-common.
- Bugfix: Handle SRT cues that have lines that only contain numbers, as they were getting confused with cue IDs.
- New commands
subed-shift-subtitles-to-start-at-timestamp
andsubed-move-subtitles-to-start-at-timestamp
should make it easier to adjust timestamps without doing msec math. - Add workflow notes to README.org.
- Add extra line after comments in text output.
subed-guess-format
can now take a filename.
- New ol-subed adds subed: links to Org Mode. To use it, add
(require 'ol-subed)
to your configuration. Then you can store links withorg-store-link
. M-mouse-2
(M-middle-click) on a subed waveform shifts subtitles.- VTT: msecs are now optional.
- New command
subed-wdiff-subtitle-text-with-file
compares subtitle text with a script or other subtitles. It uses the external wdiff tool. - subed-subtitle-comment now returns nil when there’s no comment.
- subed-waveform:
M-mouse-1
(M-left click) andM-mouse-3
(M-right-click) now set the start or end timestamp and copy it to the previous or next subtitle, respectively. This makes it easier to holdM-
down to change timestamps with the mouse or withM-[
,M-]
,M-{
, and M-}, navigating between subtitles withM-n
andM-p
.- You can now show waveforms for all the subtitles using M-x
subed-waveform-show-all. Set subed-waveform-show-all to non-nil if
you want this to be the default behavior of
M-x subed-waveform minor-mode
.
- Default to keeping MPV open at the end of the file.
- New hooks:
subed-subtitles-sorted-hook
,subed-subtitle-merged-hook
- New function
subed-media-file
for things like subed-record which can refer to multiple sources in one file.
- subed-align: Use current media file even if it’s a video, and restore the comments assuming the subtitles are in sequence.
- add .m4a to the list of media extensions
New commands and functions:
- M-J: subed-mpv-jump-to-current-subtitle-near-end
- subed-waveform:
- S-mouse-1: subed-waveform-set-start-and-copy-to-previous
- S-mouse-3 (right-click): subed-waveform-set-stop-and-copy-to-next
- subed-append-subtitle-list
New option:
- subed-sample-msecs
Other changes:
- Update loop after adjusting timestamps
- Appending or splitting subtitles in VTT files with comments now puts new subtitles before the next comment.
Ignore MPV socket errors when closing files on remote computers.
Guess the format when the generic subed-mode is loaded. Also, require svg when subed-waveform is loaded.
Added subed-waveform, which you can enable with subed-waveform-minor-mode. This makes it easier to review the waveform for the current subtitle so that you can use it to adjust the start or stop time. It requires the ffmpeg executable. Thanks, mbork!
subed should not autoplay media over TRAMP.
Adjusting the starting or stopping timestamp (including via merges) should now also update the looping start and stop times.
I changed subed-mode
so that it doesn’t add functions to local
hooks, because that seems to mess up configuring hooks from your Emacs
init file. Please see README.org for recommended code to add to your
subed-mode-hook
. I decided to suggest each line separately so that
it’s easier for people to disable specific behaviors instead of hiding
it in subed-setup-defaults
.
There are new customizable values for subed-enforce-time-boundaries that affect setting or adjusting the start or stop times if a subtitle will end up overlapping with the previous or next subtitle (based on subed-subtitle-spacing), or if a subtitle will have negative duration.
'adjust
: the new default. If a subtitle will have invalid times, adjust the other time to resolve the conflict.'clip
: set the current time to at most (or at least) the other time, taking spacing into account.'error
: report an error when trying to set an invalid time.nil
: don’t perform any checks, just set the time.
By default, you can adjust times with M-[
(decrease-start-time
), M-]
(increase-start-time
), M-{
(decrease-stop-time
), and M-}
(increase-stop-time
).
I’ve been writing more tests to cover the behavior, but I might’ve missed stuff, so please let me know if things turn up!
subed-toggle-sync-point-to-player should not confuse subed when it is already looping over a subtitle. Also, subed-loop-seconds-before and subed-loop-seconds-after now default to 0 for less confusion.
subed-parse-file should handle nil filenames now. Also, it should not try to autoplay media.
Bugfix: Actually include VTT comments when inserting subtitles programmatically.
subed-align now keeps VTT comments. It also doesn’t remove silences by default now, since aeneas turned out to be a little too aggressive about silence detection.
subed-move-subtitles and subed-scale-subtitles are now interactive commands. The documentation for subed-scale-subtitles now mentions subed-move-subtitles, and I’ve updated the README to mention them.
subed should compile without checkdoc warnings or obsolete functions now.
You can now use subed-copy-region-text
to copy the text from
subtitles in a region. Call it with a prefix argument (C-u M-x
subed-copy-region-text
) to include comments.
Calling C-u M-x subed-convert
will retain comments in the TXT
output.
VTT comments are now parsed and returned as part of subed-subtitle
and subed-subtitle-list
. This makes it easier to build workflows
that use the comment information, such as adding NOTE lines for
chapters and then creating a new file based on those lines and the
subtitles following them.
A new function subed-create-file
helps create a file with a list of
subtitles.
Sanitizing VTT files with subed-sanitize
should retain comments now.
subed-convert
should now create a buffer instead of a file if the
source is a buffer that isn’t a file.
- subed-align-options is a new variable that will be passed to aeneas during execution.
- Calling subed-split-subtitle with the C-u prefix will now allow you to specify either an offset or a timestamp. If a timestamp is specified, it will be used as the starting timestamp of the second subtitle.
subed now talks about media files instead of video files, since audio files are fine too. Updating the function names and documentations to refer to media instead of video files can help people think of using subed for audio files as well. Distinguishing between video and audio extensions can be useful for tools like aeneas, which expect audio files.
I defined obsolete function and variable aliases for most things, but subed-mpv-media-file (used to be subed-mpv-video-file) uses defvar-local, so it didn’t work well with define-obsolete-variable-alias. If you have any code that uses subed-mpv-video-file, please rewrite it to refer to subed-mpv-media-file instead.
New commands subed-merge-dwim, subed-merge-region, subed-merge-region-and-set-text, and subed-set-subtitle-text can help with making chapter files.
Added more details to the README.org.
This version also includes bugfixes for subed-align and subed-vtt.
New function subed-parse-file.
New command subed-align in the subed-align.el file lets you use aeneas for forced alignment. This can assign timestamps to each line of text.
VTT files can now have optional cue identifiers. A cue identifier is a line of text before the timestamps that can identify the cue. It should not contain “–>”.
When you load word data, subtitle words that were successfully matched with the word-level timestamps will now be highlighted so that it’s easier to split at them.
Added support for SRV2 files in subed-word-data.el. You can use subed-word-data-load-from-file to load word-level timing data from SRV2 files or add subed-word-data-load-maybe to the subed-mode-hook.
VTT no longer assumes that the start of the file is part of the first subtitle.
VTT and SRT are now less confused by spaces at the end of a subtitle when splitting.
Delete the CPS overlay when disabling it
Fixed TSV fontlocking. Improved subed-convert so that the new buffer is also visiting a file.
Added new command subed-convert
.
Added subed-tsv.el for Audacity label exports. Use M-x subed-tsv-mode to load it.
Use - instead of : in mpv socket names to see if that will make it work better on Microsoft Windows.
- Consolidated the different faces to subed-id-face, subed-time-face,
and subed-time-separator-face. Added tests for font-locking. Dropped
text font-locking for now since we didn’t have a good regular
expression for it.
Obsolete:
- subed-srt-id-face
- subed-srt-time-face
- subed-srt-time-separator-face
- subed-srt-text-face
- subed-vtt-id-face
- subed-vtt-time-face
- subed-vtt-time-separator-face
- subed-vtt-text-face
- subed-ass-id-face
- subed-ass-time-face
- subed-ass-time-separator-face
- subed-ass-text-face
Thanks to Igor for the bug report!
- Added support for SRT comment syntax thanks to mbork. http://mbork.pl/2022-09-05_Comments_in_srt_files
- Allow mm:ss.000 (optional hours) when validating VTT files.
- Use just the buffer name hash when naming the MPV socket.
subed now tries to avoid sorting already-sorted buffers, which should reduce interference with mark rings and other things.
Added obsolete function aliases in case people are calling format-specific functions in their code.
Format-specific modes are now initialized with (subed-srt-mode)
,
(subed-vtt-mode)
, or (subed-ass-mode)
instead of the corresponding
(subed-vtt--init)
functions.
I implemented the format-specific functions with cl-defmethod
, so if
you have any code that refers to functions like
subed-vtt--timestamp-to-msecs
, you will need to change your code to
use generic functions such as subed-timestamp-to-msecs
.