[MPlayer-users] re:mplayer fails when invoked from at command
Bertie Coopersmith
bertie at coopersmith.demon.co.uk
Tue Nov 21 11:46:10 CET 2006
On Mon, 20 Nov 2006 18:26:05 -0800
Corey Hickey <bugfood-ml at fatooh.org> wrote:
> 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
Thanks a lot. I'll try that and let you know the result. Meanwhile, I took
your advice and compiled mplayer from source. (I did this on another, similar,
PC).
Since I'm not concerned to handle video I specified:-
./configure --disable-mencoder --enable-runtime-cpudetection
--disable-tv --disable-ridix-internal --disable-ridix-external
The new Mplayer's behaviour was just as before - ok in foreground, fail under at.
I also found that TERM under at was either null or 'dumb' so I now
export ATTERM=TERM and in ripreal I have TERM=$ATTERM. (Now its value is 'xterm' when
the at command is given in X and 'linux' when at is commanded from the console).
This gets rid of the error message about unknown terminal type which may have a bearing on the formatting of the diagnostics in the mail message from at.
(One wishes the Unix people had not chosen a command name which clashes so badly with a common English word!).
I searched 'getenv' in the source and checked that the values concerned come through ok into the at environment.
Bertie.
More information about the MPlayer-users
mailing list