mercoledì 3 novembre 2010

How to specify a recording time for mplayer

I passed the last few days looking for some way to stop mplayer recording after some time. I really often use mplayer to record concert streamings on various internet radios and more than once I left it recording over the entire night (not so good!). It seemed to be impossible, but it's not.
The command I use for recording audio streams using mplayer (since Ubuntu 8.04 until, for sure, 10.04) is

mplayer "http://streamaddress.com/somePort" -ao pcm:file=/home/myHome/file.wav -vc dummy -vo null

If you want mplayer to stop recording after 56 seconds, you can add
-endpos 56
to the precedent command, or if you want to stop it after 1 hour and ten minutes
-endpos 01:10:00

Nessun commento: