Created
March 31, 2015 13:30
-
-
Save mtrl/2feb6a03ae01c212e851 to your computer and use it in GitHub Desktop.
Convert all flvs to mp4 using ffmpeg
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 | |
# do a wc -l > flvs.txt from the root first then doit.sh flvs.txt | |
while read line | |
do | |
name=$line | |
outputfile=${name/\.\/0/\.\/mpgs\/} | |
dir=$(dirname "$outputfile") | |
mkdir -p $dir | |
out=${outputfile/\.flv/\.mp4} | |
echo "Processing ${out}" | |
ffmpeg -loglevel panic -i ${name} -c:v libx264 -crf 19 ${out} < /dev/null | |
done < $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment