Created
September 26, 2019 23:28
-
-
Save chadnickbok/c7ea051550be3e481e0b08a4d517769c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ffmpeg -y -i netflix_crosswalk_1080p30fps.mp4 -c:v libx264 -preset veryslow -b:v 2000k -threads 4 crosswalk_encode_good.mp4 | |
ffmpeg -y -i netflix_crosswalk_1080p30fps.mp4 -c:v libx264 -preset veryslow -b:v 3250k -threads 4 crosswalk_encode_better.mp4 | |
ffmpeg -y -i netflix_crosswalk_1080p30fps.mp4 -c:v libx264 -preset veryslow -b:v 4500k -threads 4 crosswalk_encode_best.mp4 | |
rm -f /tmp/reference.yuv && mkfifo /tmp/reference.yuv | |
rm -f /tmp/distorted.yuv && mkfifo /tmp/distorted.yuv | |
for quality in good better best | |
do | |
ffmpeg -y -i netflix_crosswalk_1080p30fps.mp4 -c:v rawvideo -pix_fmt yuv420p /tmp/reference.yuv | |
ffmpeg -y -i crosswalk_encode_${quality}.mp4 -c:v rawvideo -pix_fmt yuv420p /tmp/distorted.yuv | |
~/vmaf/wrapper/vmafossexec yuv420p 1920 1012 /tmp/reference.yuv /tmp/distorted.yuv ~/vmaf/model/vmaf_v0.6.1.pkl \ | |
--log crosswalk_${quality}.json \ | |
--log-fmt json \ | |
--thread 4 --subsample 1 --pool harmonic_mean | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment