Editing videos with Emacs and subed-record.el
| emacs, subed, videoI want to document more of my Minecraft adventures with A+. Video is a natural way to do this. It builds on her familiarity with the tutorials and streams she enjoys watching. I set up OBS on her laptop and plugged in my Blue Yeti microphone. We did our first interview yesterday. I edited and subtitled it (because why not!), uploaded it as an unlisted YouTube video, and shared it with her dad, sister, and cousins.
I did the video editing in Emacs with subed-record. First, I used WhisperX to transcribe the video, and I used subed-align to fix the timestamps with aeneas. I normalized the audio with Audacity and I exported the .opus file for use in subed-record.el. Then I added NOTE #+SKIP
before times I wanted to remove, like when she asked for a retake. Here's what that subtitle markup looks like:
WEBVTT NOTE #+SKIP 00:00:00.000 --> 00:00:16.679 And then I'll record in my side also and we'll just put it in somehow. Somehow. Okay. We can edit that, right? Yeah, we'll learn how to edit things. It'll be great. NOTE Introduction #+AUDIO: cuberventures-001.opus [[file:intro.webm]] #+OUTPUT: cuberventures-001-fxnt-create-2-windmill-home-cafe-trains-hotel-half-underwater.webm 00:00:16.680 --> 00:00:19.399 Okay, so now we're here with <username>. 00:00:19.400 --> 00:00:23.039 I want to find out what you like about Minecraft and 00:00:23.040 --> 00:00:26.079 all the cool things that you have been building lately.
This was a little different from my usual video creation workflow, where I record the audio and the video separately. When I wrote subed-record.el, I assumed I'd edit the audio first, choose images/GIFs/videos that were already ready to go, and then combine those visuals with sections of audio, speeding things up or slowing things down as needed. Now I wanted to apply the same edits to the video as I did to the audio. A+ did a great job of looking at stuff in Minecraft while talking about them, so I wanted to keep her narration in sync. I added some code to allow me to specify a same-edits keyword for the visuals. That meant that I would use the same selection list that I used for cutting the audio. Here's what that subtitle markup looks like:
NOTE [[file:2024-12-31 10-35-14.mkv]] #+OPTIONS: same-edits 00:00:43.860 --> 00:00:45.941 Shall we take a tour of my world? 00:00:45.942 --> 00:00:50.079 Sure, let's tell people which mod pack this is. 00:00:50.080 --> 00:00:55.639 This is FXNT Create 2, also known as FoxyNoTail Create 2. NOTE Windmill 00:00:55.640 --> 00:00:58.239 I've got this little bit of path leading to the interview 00:00:58.240 --> 00:01:01.839 room. This is my unfinished windmill. I've been meaning to
This workflow lets me cut out segments in the middle of the video, like this:
00:17:30.200 --> 00:17:33.119 great start for a tour. I'm looking forward to seeing what 00:17:33.120 --> 00:17:34.112 you will build next. NOTE #+SKIP 00:17:34.113 --> 00:18:02.379 Do you have any last words before we try to figure out this video editing thing? Yeah. We'll cut that last part out. Let's just do a retake on that last part. Someday. Out here. Okay. There you go. This is a beautiful view. 00:18:02.380 --> 00:18:08.119 The last things I want to say about this world is there'll be
I also wanted to start the video with a segment from my recording, so we could see her avatar on screen during the introduction. She kept her computer on first-person POV instead of changing the camera. I used mpv to figure out the timestamps for the start and end of the part that I wanted to use, then I used ffmpeg to cut that clip. I added a comment with a link to that video in order to use it before the main video. That's the [[file:intro.webm]]
in the first section's comments.
After testing a small section of the transcript by selecting a region and using subed-record-compile-video
, I deselected the region and used subed-record-compile-video
to produce the whole video.
I also modified subed-record-compile-subtitles
to include the other non-directive comments, so I
can include the section headings in the raw VTT
file and have them turn up in the exported
version. Then I can use the new
subed-section-comments-as-chapters
command to
copy those as chapters for the YouTube
description.
We're not going to share that particular video yet, but I'm looking forward to trying that technique with videos about stuff I'm figuring out in Minecraft or Emacs. It's also tempting me to think about ways to specify transitions like crossfades and other fancy effects like overlays.
I like using the transcript as the starting point for video editing. It just makes sense to me to work with it as text. I also like this experiment with documenting more of our Minecraft experimentation. It seems to get her talking and encourages her to build more. I'm looking forward to learning more about Minecraft and making videos too.
We did another video today using the new shortcuts I've just set up for toggling OBS recording. This time we didn't even need to do any editing. I used Org Export to make her a little HTML file that had the two videos on it, so she can review it any time. Onward!