[MPlayer-users] re:mplayer fails when invoked from at command

Corey Hickey bugfood-ml at fatooh.org
Tue Nov 21 03:26:05 CET 2006


Bertie Coopersmith wrote:
>> Your previous message didn't show this output. 
> 
> You are referring to a lot of lines like "No bind found for key 'S'."

Right.

>> It looks to me like
>> something is piping mplayer data on stdin.
> 
> I've found the way to stop that:-  </dev/null just before the mplayer command in
> my ripreal script.

I would have told you to do that, if I hadn't seen the "No bind found" 
lines. Actually, I would've recommended putting </dev/null after the 
command, but I think they're equivalent.

Anyway, that fixes the problem for me. Normally, running mplayer 
non-interactively makes it hang when it reads from STDIN, but I guess at 
sends an EOF so mplayer exits immediately.

I have no idea where your other characters on STDIN came from; I didn't 
run your complete script.

>> If you can
>> post a more specific question
> 
> (1) where in the source does the message "Terminal type `unknown' is not defined."
> come from? I have tried grepping in the sources and libraries. I thought it might
> be in ncurses but I'm not sure. Note that the same mplayer command when run
> in foreground does not output that message.
> (2) I downloaded the mplayer sources to do some grepping but actually my mplayer
> comes from a Slackware binary package. Should I compile with suitable configure
> options in the hope of fixing the problem? If so, what options to try?

You snipped out the part I should have emphasized:
"You should try to isolate the problem. People on mailing lists 
generally don't like digging through custom scripts to find an error."

In this case, I did it for you, so next time you'll know what I mean.


----------------------doesn't work; exits immediately-----------------
#!/bin/bash
cd /tmp
mplayer rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra \
   -endpos 10 -vc null -vo null -ao pcm:fast
----------------------------------------------------------------------


---------------------------works fine for me--------------------------
#!/bin/bash
cd /tmp
mplayer rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra \
   -endpos 10 -vc null -vo null -ao pcm:fast </dev/null
----------------------------------------------------------------------


Each of the above scripts can be run like this:
$ echo /tmp/ripreal.sh | at now

Hopefully, you can use that as a baseline and figure out how to make 
your script work.

-Corey



More information about the MPlayer-users mailing list