Created
July 17, 2014 11:01
-
-
Save dvdvck/39e9b4b94b10ad1749e2 to your computer and use it in GitHub Desktop.
h264 converter
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 | |
#recodifica a un formato que ocupe menos espacio en disco | |
#se utiliza el encoder h6264 para video. Este encoder automaticamente | |
#coloca el bitrate segun sus algoritmos. Resultando ~515kbps | |
#se utiliza el encoder vorbis para audio (default). De igual forma | |
#el bit rate es calculado a partir del sampleo. Para 24kHz se tiene ~66kbps | |
#Contenedor matroska que me parece fabuloso | |
# | |
#Ejecutarlo justo en la raiz de los directorios que contiene los videos | |
dest=/opt/dudding/ | |
for path in `find . -name *.MP4`; do | |
dir=$dest$(dirname $path) | |
if [ ! -e $dir ]; then | |
echo "Creating dest dir $dir" | |
mkdir -p $dir | |
fi | |
#avprobe $path | |
avconv -y -i $path -ar 12k -c:v libx264 -s 640x360 -r 24 ${dest}${path%.*}.mkv | |
#break | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment