Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sorry, I didn't realize I forgot to post the script and stuff:
Code:
LPATH="/mnt/main/media/stream"
for file in "$LPATH/young/"*".asf" ; do
fname="${file##*/}"
fname="${fname%.*}"
asf2mp3 "$file" "$LPATH/young/$fname.mp3"
#rm -f $file
if [ -e "$LPATH/young/$fname.mp3" ] ; then
echo "destination file: $LPATH/young/$fname.mp3"
fi
done
I am trying to convert stream rips of mms streams to mp3 thru wav midway. asf2mp3 is a function i made and placed in /usr/bin
Code:
# constant variables:
tmp="/tmp/tmp.wav"
if [ "$1" == "-help" ] || [ "$1" == "-h" ] || [ "$1" == "help" ] ; then
echo "Usage: asf2mp3 <input file> [output file]
-help -h help for this help file
-version -V check the version of Asf2Mp3
-required -r check for required installs
-verbose -v output details (verbose) feature not yet activated
-quiet -q quiet mode feature not yet activated";
elif [ "$1" == "-V" ] || [ "$1" == "-version" ] ; then
echo "Asf2Mp3 version 1.3.1 All Rights with Ted"
elif [ "$1" == "-r" ] || [ "$1" == "-required" ] ; then
echo "Required installs are mplayer and lame"
else
# this script converts asf to mp3 file formats, script requires mplayer and lame to be working simultaneously:
mplayer "$1" -novideo -vc dummy -ao "pcm:file=$tmp"
lame -b 64 "$tmp" "$2"
rm -f "$tmp"
fi
Directory looks like this, (i've moved it to media, and changed the paths in the script respectively):
Code:
ted:$ cd young
vector://mnt/main/media/stream/young
ted:$ ls
2012.08.05_08.00.02.mp3 2012.08.16_00.30.01.mp3 2012.08.17_00.00.01.asf
2012.08.16_00.27.11.mp3 2012.08.16_01.00.01.mp3 2012.08.17_01.00.01.asf
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.