5 # ./convert_audiots_to_ogg.sh file.ts file_converting.ogg prog.ogg old
7 # Converts the supplied MPEG-2 audio ts file to an Ogg Vorbis file
15 if [ ! -f "$OGG_FILENAME" ]; then
17 echo "Converting $TS_FILENAME to Ogg Vorbis"
19 echo '$ ffmpeg -i "'$TS_FILENAME'" -acodec vorbis -aq 60 "'$CONV_FILENAME'"'
21 ffmpeg
-i "$TS_FILENAME" -acodec vorbis
-aq 60 "$CONV_FILENAME" > ffmpeg_out.txt
2>&1
26 mv "$TS_FILENAME" "$OLD_DIR"
28 if [[ $RETVAL != 0 ]]; then
30 #echo '$ ffmpeg -i "'$TS_FILENAME'" -acodec vorbis -aq 60 "'$CONV_FILENAME'"'
34 echo "Error: ffmpeg returned '"$RETVAL"'"
39 mv "$CONV_FILENAME" "$OGG_FILENAME"
45 echo "Error: .ogg filename already exists: " $OGG_FILENAME