[FFmpeg-user] Converting mkv to mp3 failures

JD jd1008 at gmail.com
Fri Jul 14 22:10:53 EEST 2017


This is the script I ended up creating to convert hundreds of mkv to mp3
and avoid creating a tsunami of stdin that seems to flood ffmpeg and 
make it falter.

#!/bin/bash
export prog=/bin/ffmpeg
export D=/thumbdrive_A
rm -f $D/*
for F in VIDEO_[0-9]*; do
vidfile=`cat $F`
N=`basename $vidfile | sed -e 's/mkv//' -e 's/mp4//' -e 's/webm//'`
$prog -i $vidfile  -map 0:a -c:a libmp3lame -ab 320k -ac 2 -y $D/$N"mp3"
done



More information about the ffmpeg-user mailing list