Playing around with the demo for Pseudonym...
Following http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide
Encoding video layer (no sound, sound is in overlay)
Video 1
First pass
ffmpeg -i Vid1.mp4 -passlogfile vid1 -c:v libvpx-vp9 -pass 1 -b:v 10M -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 4 -aq-mode 0 -an -f webm /dev/null
Second pass
ffmpeg -i Vid1.mp4 -passlogfile vid1 -c:v libvpx-vp9 -pass 2 -b:v 10M -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -lag-in-frames 25 -g 4 -aq-mode 0 -an -f webm Vid1.webm
Video 2
First pass
ffmpeg -i Vid2.mp4 -passlogfile vid2 -c:v libvpx-vp9 -pass 1 -b:v 10M -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 4 -aq-mode 0 -an -f webm /dev/null
Second pass
ffmpeg -i Vid2.mp4 -passlogfile vid2 -c:v libvpx-vp9 -pass 2 -b:v 10M -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -lag-in-frames 25 -g 4 -aq-mode 0 -an -f webm Vid2.webm
Encoding bm layer (soundtrack with beats)
This turns black in the image to an alpha channel. It's crude, but good for demonstration purposes.
Beat Meter 1
First pass
ffmpeg -i Vid1.mp4 -i BM1.mp4 -passlogfile vid1 -c:v libvpx-vp9 -vf "colorkey=0x000000:0.1:0.0,format=yuva420p" -auto-alt-ref 0 -pass 1 -b:v 10M -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 4 -aq-mode 0 -an -map 1:v:0 -f webm /dev/null
Second pass
ffmpeg -i Vid1.mp4 -i BM1.mp4 -passlogfile vid1 -c:v libvpx-vp9 -vf "colorkey=0x000000:0.1:0.0,format=yuva420p" -auto-alt-ref 0 -pass 2 -b:v 10M -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -lag-in-frames 25 -g 4 -aq-mode 0 -c:a libvorbis -map 1:v:0 -filter_complex amix=inputs=2:duration=longest -f webm BM1.webm
Beat Meter 2
First pass
ffmpeg -i Vid2.mp4 -i BM2.mp4 -passlogfile vid2 -c:v libvpx-vp9 -vf "colorkey=0x000000:0.1:0.0,format=yuva420p" -auto-alt-ref 0 -pass 1 -b:v 10M -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 4 -aq-mode 0 -an -map 1:v:0 -f webm /dev/null
Second pass
ffmpeg -i Vid2.mp4 -i BM2.mp4 -passlogfile vid2 -c:v libvpx-vp9 -vf "colorkey=0x000000:0.1:0.0,format=yuva420p" -auto-alt-ref 0 -pass 2 -b:v 10M -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -lag-in-frames 25 -g 4 -aq-mode 0 -c:a libvorbis -map 1:v:0 -filter_complex amix=inputs=2:duration=longest -f webm BM2.webm