If you already know how to use eepitch then the next step is to learn how to use links to videos in eev.
All the videos that I made about eev are available both on Youtube and on my home page. Youtube always converts them to a format is blurry at some points, so it is usually better to download the original version of the video from http://angg.twu.net/eev-videos/; in the case of a video with subtitles this can be done by running the two "wget"s below,
and then running the "mpv --fs --osd-level=2 ...", that plays the video in fullscreen mode and with the time and the subtitles being shown in OSD. Note that you don't need eev for this - you only need to run three commands in a shell.
1. How the links to videos work
Some sections of the eev tutorials contain "[Video links:]" blocks. For example, the section on eepitch contains this:
These links are trivial to use if you are reading the HTMLized versions of the intros... if you click on a timestamp, like "10:36", this plays that video on youtube starting from 10:36, and if you click on the name of a function, like "find-eevnavvideo", this goes to an intro that explains how the links to videos work.
If you are in Emacs and you execute this sexp with M-e,
...then everything is trivial if:
In this case eev will call mpv and make it play the local copy of that video starting from 0:14. If we don't have a local copy we get a temporary buffer "that downloads the local copy", like the one at the right in this screenshot:
2. What are local copies?
Eev always downloads "local copies" of files from the internet using a method called "psne-ing", that is explained here: (find-psne-intro). Psne converts URLs to filenames using this convention:
Psne-ing the URL above means running an eepitch block like this one to download a local copy with wget:
The eepitch block above downloads a single file: a video in .mp4. The script in the right half of the previous screenshot "psne"s both a video in .mp4 and its subtitles in .vtt. When we execute it we see this:
Note that now the script is at the left, and the target buffer for eepitch is at the right. Also, remember that the sexp
Look the right half of the screenshot above. The outputs of the "wget"s indicate that now, after the "wget"s, we do have a local copy of the video and its subtitles, and now all further attempts to run the sexp above would "play the local copy" instead of "(showing a temporary buffer that) download(s) a local copy".
Now look at the last lines of the "script" at the left above. It has these sexps in comments:
The `find-fline' can be used to display the local copy using dired. The `find-video's will play the local copy - the first plays it from the beginning, and the second plays it from the timestamp given in the sexp that generated that buffer, that was this one:
The other lines mention the "short code" and the "youtube hash" of the video, and they will make more sense after we understand "first-class videos".
3. First-class videos
"First-class" and "second-class" videos are explained here:
I have this in my ~/.emacs:
It gives me a quick way to list all the first-class videos that eev knows about. Running `M-x 1c' displays the list in the left half of the screenshot below,
and following one of the links gives me the buffer at the right.
Remember that the sexp
plays a video. The "eev2021" in the `find-eev2021video' is the "short code", or the `c', of a first-class video, and running
displays a lot of information about that video. If we put the point on a string like "eev2021" or "eev2021video" and we type `M-x find-1stclassvideo-links', the `find-1stclassvideo-links' will detect the `c' around point and will ask if we want information about the video whose `c' is "eev2021"; after we confirm it will run the sexp above. So `M-x find-1stclassvideo-links' gives us a way to start from a sexp that would play a video, and display information about that video instead of playing it.
4. Mpv: keys (and playing in high speed)
Mpv can be controlled with the keyboard using these keys. The ones that I use & remember are these ones:
When a video has subtitles I often use something like `]]]]]]]]]]]]]]]]]]]]]]' to play it in high speed, and then BACKSPACE to go back to normal speed when I find a part that looks especially interesting.
One of my main reasons for subtitling the first-class videos of eev is to let people "watch" them in super-high speed.
5. A "smaller fullscreen"
Compare the two screenshots below:
The first one shows a video being played in "real fullscreen" and the second shows a video being played in a "smaller fullscreen" (that is a term that I've invented). When the subtitles are more important then the image I prefer to watch videos in "smaller fullscreen". Let me explain.
By default eev calls mpv with the command-line options "--fs" and "--osd-level=2", that mean "use full screen" and "display the subtitles and the current position". In "real" full-screen mode the subtitles and the position cover a part of the video being played; in "smaller fullscreen" mpv still uses the whole screen but it shrinks the size of the video a bit to make the subtitles appear on a black background. One way to switch between "use real fullscreen" and "use smaller fullscreen" is by running `M-x find-mpv-links', that displays the temporary buffer below:
Then we have to run the "(defun mf ...)" and the "(defun ms ...)". After that we can run `M-x mf' to make the next invocations of mpv use "real fullscreen" and `M-x ms' to make the next invocations of mpv use "smaller fullscreen". Note that `ms' adds two options to `ee-mpv-video-options'... I don't know how to switch between "real fullscreen" and "smaller fullscreen" using mpv's keybindings, but that hack looks good enough for me.
I recommend watching the videos about eev in high speed and in "smaller fullscreen".
6. People who hate videos
In 2022dec29 I was very happy because I had, ahem, "finally found a way to make my videos accessible to people who hate videos", and I sent this e-mail to help-gnu-emacs. The reactions were bad, and I realized that people who hate videos come in several types... I am just one of these types, and my solution was only wonderful to me and to people like me. 🙁
7. Subed and subtitles in Lua
The best way to edit subtitles in Emacs is with subed,
but I never became very proficient with it, and a few weeks before the EmacsConf 2022 I wrote a few Lua classes for generating subtitles in .vtt... I saw that I could edit subtitles very quickly with them, and my Lua files with subtitles were quite readable, so I started using that a lot. You can access my "subtitles in Lua" here:
It is possible to make eev play videos in M$ Windows, but the setup is a bit tricky, and very few people have tested it. I described it in this video:
Basically, people have to run `(find-wconfig-intro)' and follow at least the instructions that:
If you try that or would like to try that, please get in touch with me... any feedback would help me a lot!