Skip to content

Instantly share code, notes, and snippets.

@morphkurt
Last active July 8, 2016 07:11
Show Gist options
  • Save morphkurt/587d148ca04ede9945f061d203a3d54f to your computer and use it in GitHub Desktop.
Save morphkurt/587d148ca04ede9945f061d203a3d54f to your computer and use it in GitHub Desktop.
Creating Multiple Resoultion YUV files
#!/bin/bash
source_width=1920
source_height=1080
test_name=funckytown
source_file=/mnt/tmp/wowza/qa/source/soure_1920x1080.yuv
encode_location=/mnt/tmp/wowza/qa/multires
ffmpeg_bin=/opt/xxxx/bin/ffmpeg
declare -a resolutions=("1280x720" "1024x576" "640x360" "512x288" "480x270")
prepare-source () {
mkdir -p $encode_location/$test_name
for r in "${resolutions[@]}"
do
$ffmpeg_bin -y -pix_fmt yuv420p -f rawvideo -s ${source_width}x${source_height} -i $source_file -f rawvideo -pix_fmt yuv420p -s $r $encode_location/$test_name/source-$r.yuv
done
}
prepare-source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment