[MPlayer-DOCS] MPlayer in shell-script

Ralf Eleven ralf11 at gmx.net
Wed Apr 8 00:17:18 CEST 2009


Hallo,

I want to use MPlayer in a shell-script to convert audios and videos
(For example from youtube over /tmp) to several audio-formats. The
script shall also can record livestreams. I want to use MPlayer to
decode ( -ao pcm:waveheader:file=${tmppcm}), because it works for a lot
of formats and it is fast. I want to use zenity for gui in the script.
For decode I thought to use mplayer -gui, because it could show progress
and I could built a own MPlayer-gui for the script and I could build a
debian-packet.

My problem:
Mplayer shall close themself, if the file is decoded complet, that it
can encode to the certain file-format. Also it should be possible to
stop MPlayer, for example for stoping to record a livestream.
If I write this line:
mplayer -gui -noborder -really-quiet -geometry 100%:100% -nojoystick
-nolirc -ao pcm:waveheader:file=${tmppcm} $playlist "$f"
then Mplayer don't close themself after decoding. So encoding can't be
started.

My question: Is there an order to stop the MPlayer -gui completly
themselves after decoding, that I don't have to close MPlayer by
ENTER-button? I  didn' found something in the man-page and not in the
mplayer-doc. Maybe i have to do something with mplayer -input.

The not finished script is attached.

Thank you for the help.
/Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: convert2audio
Type: application/x-shellscript
Size: 25887 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-docs/attachments/20090408/40d5b8aa/attachment.bin>


More information about the MPlayer-DOCS mailing list