ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 1 -an -f null -row-mt 1 NUL && ^
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus -row-mt 1 output.webm
input.mp4
file size is 197,007 KiB and output.webm
is 197,132 KiB.
For context, we have approx. 9TB of Zoom Meeting Recordings stored in AWS S3. My goal is to optimize the storage consumption by converting to VP9. I'm willing to sacrifice a bit of quality to optimize storage.
I am seeing better results on some other (non-Zoom) H.264 files (reduced from 88MiB in H.264 to 11MiB in VP9) with the exact same ffmpeg options.
Here's the details on the input file:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2022-03-17T16:20:43.000000Z
Duration: 01:14:31.74, start: 0.000000, bitrate: 360 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 755.480000
Metadata:
title : Recording Started
Chapter #0:1: start 755.480000, end 4465.840000
Metadata:
title : Sharing Started
Chapter #0:2: start 4465.840000, end 4471.720000
Metadata:
title : Sharing Stopped
Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 126 kb/s (default)
Metadata:
creation_time : 2022-03-17T16:20:43.000000Z
handler_name : AAC audio
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1040, 232 kb/s, 25 fps, 25 tbr, 30k tbn (default)
Metadata:
creation_time : 2022-03-17T16:20:43.000000Z
handler_name : H.264/AVC video
vendor_id : [0][0][0][0]
encoder : AVC Coding
Stream #0:2[0x3](und): Data: bin_data (text / 0x74786574)
Metadata:
creation_time : 2022-03-17T16:20:43.000000Z
handler_name : Text
Output file:
Input #0, matroska,webm, from 'output.webm':
Metadata:
COMPATIBLE_BRANDS: isommp42
MAJOR_BRAND : mp42
MINOR_VERSION : 0
ENCODER : Lavf59.22.100
Duration: 01:14:31.75, start: -0.003000, bitrate: 361 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 755.480000
Metadata:
title : Recording Started
Chapter #0:1: start 755.480000, end 4465.840000
Metadata:
title : Sharing Started
Chapter #0:2: start 4465.840000, end 4471.720000
Metadata:
title : Sharing Stopped
Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv, progressive), 1920x1040, SAR 1:1 DAR 24:13, 25 fps, 25 tbr, 1k tbn (default)
Metadata:
HANDLER_NAME : H.264/AVC video
VENDOR_ID : [0][0][0][0]
ENCODER : Lavc59.26.100 libvpx-vp9
DURATION : 01:14:31.727000000
Stream #0:1: Audio: opus, 48000 Hz, mono, fltp (default)
Metadata:
HANDLER_NAME : AAC audio
VENDOR_ID : [0][0][0][0]
ENCODER : Lavc59.26.100 libopus
DURATION : 01:14:31.752000000
I'm noticing that H.264/AVC is still listed in the metadata for Stream #0:0 in the output file, but I don't see this same detail on my successfully-reduced VP9 files.