[Gambas-user] Problem running mplayer from EXEC

Tobias Boege taboege at ...626...
Mon Oct 20 14:23:34 CEST 2014


On Mon, 20 Oct 2014, bill-lancaster wrote:
> 
> this code:-
> 
> Exec ["mplayer", "/folder/somemusic.mp3"] 
> 
> runs ok, but when trying to capture the mplayer ouput by adding] 'For Read
> As "Process_Run"', mplayer doesn't run and this message is displayed. in Sub
> Process_Run_Read()
> 
> MPlayer 1.1-4.8 (C) 2000-2012 MPlayer Team
> 
> Terminal type `unknown' is not defined.
> 
> Playing /folder/somemusic.mp3.
> 
> libavformat version 54.20.4 (external)
> Mismatching header version 54.20.3
> 
> libavformat file format detected.
> 
> Any ideas would be welcome.
> 

Seems like mplayer wants a terminal to do its things, you know, like this
line

  A:   8.6 (08.6) of 334.0 (05:34.0)  0.8%

which it keeps updated constantly. It needs a terminal to update data on
screen (the notion of a "screen" basically implies that there is a terminal
involved). If you use FOR READ, Gambas connects the mplayer process to a
pipe which isn't a terminal.

Try FOR INPUT instead, which will create a pseudo-terminal, and see if that
is enough for mplayer.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list