[MPlayer-users] stopping a dumpstream after a specified amount of time
Hugo González Monteverde
hugonz-lists at h-lab.net
Tue Oct 19 08:09:30 CEST 2004
Yes, you can open MPlayer in a pipe and send it the "quit" command,
after sleeping. In Python, I'd do:
filep = popen("mplayer whatever", "w") #pipe set to read your commands
sleep (number of seconds you want to capture)
filep.write("quit")
filep.flush()
filep.close()
Anyone suggest how to say this in SH???
Hugo
james houston wrote:
> I want to use the Linux mplayer's dumpstream option to
> capture an online radio station, but it needs to stop
> after a specified amount of time (when the radio
> program is over).
>
> So I want a command like this:
> mplayer -quiet -dumpstream -dumpfile /test.mp3
> -playlist http://64.236.34.67:80/stream/8018
>
> The problem is that once you issue the command it
> captures the audio indefinitely, or at least until you
> issue a ctrl-c command. But I want it to stop without
> user interaction. As far as I know the only way to do
> this would be to check the PID and kill the process
> after a certain amount of time. This seems like a
> clunky way to do it. Does anyone know how you might do
> it more elegantly using the slave mode in mplayer?
>
> Thanks
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
>
More information about the MPlayer-users
mailing list