Large media files used by www.prisonpc.com
These are currently only local copies of YouTube videos used by folks whose employers block access to YouTube.
The files in videos/
have been created like so:
-
Download the video with
yt-dlp
:yt-dlp --write-subs --write-auto-subs "https://www.youtube.com/watch?v=8VOYS1jJ8a8"
Note
That the sub(titles) mentioned above downloads the subs and embeds them
in the mkv, but these don't get embedded in the mp4 or webm files by
ffmpeg
. Mozilla
says
you can use the vtt file, but I've not tried this.
-
Remove the full video name, leaving only the YouTube ID:
$ ls 'PrisonPC Introduction [8VOYS1jJ8a8].en-GB.vtt' 'PrisonPC Introduction [8VOYS1jJ8a8].mkv' $ rename 's/.*\[([^\]]*)\]/$1/' * $ ls 8VOYS1jJ8a8.en-GB.vtt 8VOYS1jJ8a8.mkv
-
Convert video to mp4 (and possible webm):
for f in *.mkv do ffmpeg -i "$f" "${f/mkv/mp4}" #ffmpeg -i "$f" "${f/mkv/webm}" done
-
Use the local video short code in the website markdown to reference the video:
{{< local_video 8VOYS1jJ8a8 >}}