Batch Conversion

This is a straight copy without a re-encode or of the  streams.

#setting IFS allows for loops on files with spaces in their names
IFS=$(echo -en "\n\b")
for X in `ls *.mkv`; do Y=`echo $X | sed 's/.mkv/.mp4/'`; avconv -i "$X" -codec copy "$Y";  done

http://askubuntu.com/questions/159708/convert-mkv-to-mp4-with-ffmpeg

For a more complex example,

for X in `ls *.mkv`; do Y=`echo $X | sed 's/.mkv/.mp4/'`;avconv -i "$X" -c:v copy -c:a libfdk_aac -ac 2 -sn output/$Y;done



Comments