2021-01-18 Emacs news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file and emacs-devel.

2021-01-11 Emacs news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file and emacs-devel.

Using Emacs to fix automatically generated subtitle timestamps

I like how people are making more and more Emacs-related videos. I think subtitles, transcripts, and show notes would go a long way to helping people quickly search, skim, and squeeze these videos into their day.

Youtube’s automatically-generated subtitles overlap. I think some players scroll the subtitles, but the ones I use just display them in alternating positions. I like to have non-overlapping subtitles, so here’s some code that works with subed.el to fix the timestamps.

(defun my/subed-fix-timestamps ()
  "Change all ending timestamps to the start of the next subtitle."
  (goto-char (point-max))
  (let ((timestamp (subed-subtitle-msecs-start)))
    (while (subed-backward-subtitle-time-start)
      (subed-set-subtitle-time-stop timestamp)
      (setq timestamp (subed-subtitle-msecs-start)))))

Then it’s easy to edit the subtitles (punctuation, capitalization, special terms), especially with the shortcuts for splitting and merging subtitles.

For transcripts with starting and ending timestamps per paragraph, I like using the merge shortcut to merge all the subtitles for a paragraph together. Here’s a sample: https://emacsconf.org/2020/talks/05/

Tonight I edited automatically-generated subtitles for a screencast that was about 40 minutes long. The resulting file had 1157 captions, so about 2 seconds each. I finished it in about 80 minutes, pretty much the 2x speed that I’ve been seeing. I can probably get a little faster if I figure out good workflows for:

  • jumping: avy muscle memory, maybe?
  • splitting things into sentences and phrases
  • fixing common speech recognition errors (ex: emax -> Emacs, which I handle with regex replaces; maybe a list of them?)

I experimented with making a hydra for this before, but thinking about the keys to use slowed me down a bit and it didn’t flow very well. Might be worth tinkering with.

Transcribing from scratch takes me about 4-5x playtime. I haven’t tweaked my workflow for that one yet because I’ve only transcribed one talk with subed.el , and there’s a backlog of talks that already have automatically generated subtitles to edit. Low-hanging fruit! =)

So that’s another thing I (or other people) can occasionally do to help out even if I don’t have enough focused time to think about a programming challenge or do a podcast myself. And I get to learn more in the process, too. Fun!

2021-01-04 Emacs news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file and emacs-devel.

Adding an overlay to my webcam via OBS 26.1

A- likes to change her name roughly every two months, depending on whatever things she’s focusing on. In 2020, she went through six names, giving us plenty of mental exercise and amusement. Pretend play is wonderful and she picks up all sorts of interesting attributes along the way, so we’re totally fine with letting her pretend all the time instead of limiting it to specific times.

A-‘s been going to virtual kindergarten. So far, her teachers and classmates have been cool with the name changes. They met her in her Stephanie phase, and they shifted over to Elizabeth without batting an eye. A-‘s been experimenting with a new name, though, so I thought I’d try to figure out a way to make the teachers’ lives a little easier. We use Google Meet to connect to class. A- likes to log in as me because then we’re alphabetically sorted close to one of her friends in class, the high-tech equivalent of wanting to sit with your friends. So the name that’s automatically displayed when she’s speaking is no help either.

It turns out that OBS (Open Broadcast Studio) has a virtual webcam feature in version 26.1, and it works for MacOS X and Linux. I followed the instructions for installing OBS 26.1 on Ubuntu. To enable the virtual webcam device on Linux, I installed v4l2loopback-dkms. I was initially mystified when I got the error could not insert 'v4l2loopback': Operation not permitted. That was because I have Secure Boot on my laptop, so I just needed to reboot, choose Enroll MOK from the boot menu, and put in the password that I specified during the setup process. After I did that, clicking on the Start Virtual Camera button in OBS worked. I tested it in Google Meet and the image was properly displayed. I don’t know if we’ll need it, but it’s handy to have in my back pocket in case A- decides to change her name again.

Yay Linux and free software!

2020-12-28 Emacs news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file and emacs-devel.