找台光碟機不容易
gio to get data from cdda://sr0
#/bin/bash
file_count=$(gio list cdda://sr0/ | wc -l)
for i in $(seq 1 $file_count)
do
gio copy cdda://sr0/Track\ $i.wav ./
done
VOB cover to MP4
#/bin/bash
for f in /media/ubuntu/disc1/VIDEO_TS/*.VOB ;
do
tmp=$f
file_name=${tmp##*/}
ffmpeg -i "$f" -b:v 3000k -b:a 128k ~/$file_name.mp4;
done
WAV cover to MP3
轉檔後,檔名為Track 1.wav Track 2.wav
多了這個空格,煩麻…= =
#/bin/bash
list=$(find $1 -name '*.wav')
i=0
FPATH=""
FILE_NAME=""
for files in $list;
do
if [ $i -eq 0 ]; then
echo 0
FPATH=${files%\Track} #路徑
echo d=$FPATH
i=1
else
echo 1
FILE_NAME=$files
in_f=$(echo $FPATH/Track $FILE_NAME)
out_f=$(echo $FPATH/Track ${FILE_NAME%.*})
echo in_f=$in_f, out_f=$out_f
ffmpeg -i "$in_f" -acodec mp3 -ab 160k -af aformat=s16:44100 "$out_f.mp3"
i=0
fi
done
exit 0
ref:Ubuntu Forums
沒有留言:
張貼留言