To encode a section of a movie file to a high-quality webm file, use this simple addon for mpv. Firstly run this command to create a directory to put the lua script. mkdir -p ~/.config/mpv/scriptsmkdir -p ~/.config/mpv/scripts Then download the required script to the directory we created. wget -O ~/.config/mpv/scripts/webm.lua https://raw.githubusercontent.com/ElegantMonkey/mpv-webm/master/build/webm.luawget -O ~/.config/mpv/scripts/webm.lua https://raw.githubusercontent.com/ElegantMonkey/mpv-webm/master/build/webm.lua Once …

I made this webm using ffmpeg. Firstly, I ripped a section of video. ffmpeg -i starwars.mkv -vcodec copy -acodec copy -ss 00:19:23 -to 00:19:33 out.mkvffmpeg -i starwars.mkv -vcodec copy -acodec copy -ss 00:19:23 -to 00:19:33 out.mkv Then I did the first pass of two pass encoding. ffmpeg -i out.mkv -c:v libvpx-vp9 -pass 1 -qmin 0 …