Convert ASX to MP3 (or WAV)
From an email tonight …
Hey Geoff,
Great success! I managed to easily convert your news.asx file to a MP3 (and a PCM file in between if that’s useful to you).
First of all, I installed mplayer and ffmpeg (I didn’t have either):
bob@stella:~$ sudo apt-get install ffmpeg mplayerThen, I converted the news.asx file to a PCM file:
bob@stella:~$ mplayer -ao pcm news.asxThis created a file called audiodump.wav. I then converted that to a MP3 using ffmpeg.
bob@stella:~$ ffmpeg -i audiodump.wav news.mp3I was then left with a mp3 file which I could do what I pleased with. Ironically I used mplayer to confirm that it’s content was playable - we’ve come full circle:
bob@stella:~$ mplayer news.mp3Then, because I’m a tidy kiwi I cleaned up behind myself:
bob@stella:~$ rm audiodump.pcmLet me know how you get on.
Cheers,
- Bob -
Geoff Barkman wrote:
> Hi Bob
> This is the asx file that I was talking to you about tonight at the dunlug meeting.
> I record using mimms, which is a media file grabber. It plays using mplayer if needed… but I haven’t found a way to convert it to an editable file that I can just grab a 5 minute clip out of the audio… I have to play it in real time and hit record when the news starts.
> I looked at recording less than a 11 minute clip… but the time seems to vary at the radio station and I end up loosing the start or finish of the news.
>
> My shell script that I run using a crontab has this code in it.
>
> #!/bin/bash
>
> mimms -t 11 -c http://www.thesomethingorother.com/listenlive/news.asx /home/geoff/NEWS/news.asx &
>
> It gets saved as a file called news.asx.
> I looked at recording it using just an ordinairy old radio tuner… but it is only broadcast on AM radio in dunedin… the web stream option has higher quality audio on it.
>
> Cheers
> Geoff Barkman
Why don’t you just use a pipe? Then you don’t have to clean up.