Created
May 9, 2016 12:44
-
-
Save roxlu/bb48d9ecb75fd600944f4208ed9892dc 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/sh | |
set -x | |
if [ ! -d ${PWD}/h264 ] ; then | |
mkdir h264 | |
fi | |
if [ ! -d ${PWD}/r264 ] ; then | |
mkdir r264 | |
fi | |
for f in *.mov ; do | |
name=${f##*/} | |
name=${name%.*} | |
input_name="${name}.mov" | |
output_h264_name="${name}.h264" | |
output_r264_name="${name}.r264" | |
if [ 1 == 1 ] ; then | |
if [ ! -f ."/h264/${output_h264_name}" ] ; then | |
./ffmpeg -i "${input_name}" \ | |
-vcodec libx264 \ | |
-an \ | |
-bf 0 \ | |
-bsf:v h264_mp4toannexb \ | |
-profile:v high \ | |
-level:v 5.1 \ | |
-tune fastdecode \ | |
-pix_fmt yuv420p \ | |
"./h264/${output_h264_name}" | |
fi | |
if [ ! -f "${PWD}/r264/${output_r264_name}" ] ; then | |
./r264_creator --input "${PWD}/h264/${output_h264_name}" --output "${PWD}/r264/${output_r264_name}" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment