Mencoder
Aus SchnallIchNet
wmv2avi
- Convert WMV in MPEG-4 file (Xvid):
mencoder video.wmv -ovc xvid -oac mp3lame -o video.avi
Script
#!/bin/bash for file in *.wmv; do OutName=`basename "$file" .wmv`.avi if [ -f "$OutName" ]; then answer="" echo "File exists! ($OutName)" echo -n "(D)elete current or (s)kip converting? (default: skip) "; read answer; case $answer in D|d) rm "$OutName"; ;; S|s|*) continue; ;; esac fi # encode echo "Encoding file: $OutName" echo "vpass 1: Please wait!" mencoder "$file" -ovc lavc -lavcopts vcodec=mjpeg:vpass=1 -ofps 23.0 -o "$file".temp.avi -oac copy &> /dev/null echo "vpass 2: Please wait!" mencoder "$file" -ovc lavc -lavcopts vcodec=mjpeg:vpass=2 -ofps 23.0 -o "$file".temp.avi -oac copy &> /dev/null echo "audio: Please wait!" mencoder "$file".temp.avi -ovc lavc -lavcopts vcodec=mpeg4 -ofps 23.0 -o "$OutName" -oac mp3lame -lameopts cbr:preset=192 &> /dev/null # cleanup rm "$file".temp.avi done ### EOF ###