0
On the Google developer vp9 documentation here, the recommended command ffmpeg command lines seem to be incorrectly formed.
It seems to me that the command such as this
ffmpeg -i tears_of_steel_1080p.webm -vf scale=320x240 -b:v 150k \
-minrate 75k -maxrate 218k -tile-columns 0 -g 240 -threads 2 \
-quality good -crf 37 -c:v libvpx-vp9 -c:a libopus \
-pass 1 -speed 4 tos-320x240.webm && \
ffmpeg -i tears_of_steel_1080p.webm -vf scale=320x240 -b:v 150k \
-minrate 75k -maxrate 218k -tile-columns 0 -g 240 -threads 2 \
-quality good -crf 37 -c:v libvpx-vp9 -c:a libopus \
-pass 2 -speed 1 -y tos-320x240.webm
should actually be more along the lines of
ffmpeg -i tears_of_steel_1080p.webm -vf scale=320x240 -b:v 150k \
-minrate 75k -maxrate 218k -tile-columns 0 -g 240 -threads 2 \
-quality good -crf 37 -c:v libvpx-vp9 -c:a libopus \
-pass 1 -speed 4 -y /dev/null && \
ffmpeg -i tears_of_steel_1080p.webm -vf scale=320x240 -b:v 150k \
-minrate 75k -maxrate 218k -tile-columns 0 -g 240 -threads 2 \
-quality good -crf 37 -c:v libvpx-vp9 -c:a libopus \
-pass 2 -speed 1 tos-320x240.webm
This is based on ffmpeg documentation here
However quoting the Google documentation page
'Note that the first-pass and second-pass commands are chained together. The -y argument in the second-pass command answers "Yes" when FFMpeg asks to overwrite the first-pass statistics file with the output video.'
Based on my understanding of two pass in ffmpeg, the "statistics" file will be by default in ffmpeg2pass-0.log and the actual output file is useless.
Is the libvpx-vp9 encoder using the two pass settings differently than is standard in ffmpeg? Or is Google developers page just wrong?
Would it not be considered "best practice" to discard the encoded output with /dev/null or NUL for to avoid unnecessary disk writes? Or am I just being nitpicky? (Which is perfectly plausible) – MR1865 – 2019-03-02T06:46:26.330
Unless you intend to inspect or use the first-pass encode in some way, yes. – Gyan – 2019-03-02T07:02:02.780