jeudi 28 janvier 2016

Transcodage mp4

Une bonne galère encore...


Boucle sur des fichiers avec accents

for f in *.ext;
do
# Les "" sont importants !!
./script.sh "$f";
done;

OU
# utile pour toute une arborescence
find . -type f -name "*.ext" -exec `./script.sh` {} \;

Le script FLV → MP4

ffmpeg -i "$1" -c:v libx264 -crf 23 -preset medium -c:a aac -strict -2 -b:a 128k -ar 44100 -ac 2 $1.mp4;

Le script MP3 → MP4 (pour youtube)

ffmpeg -loop 1 -i ../bg.jpg -i "$1" -tune stillimage -pix_fmt yuv420p -strict -2 -shortest $1.mp4

Aucun commentaire:

Enregistrer un commentaire