Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
disable output on mplayer [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Jul 25, 2007 9:47 am    Post subject: disable output on mplayer [SOLVED] Reply with quote

i want to use mplayer for giving out information of different audio files.
the content should NOT be played. i tried with the option "-nosound" which causes that there is no info output too.
the option "-ao null" causes mplayer to be silent, but it plays the file anyway.
is there a way to let mplayer process the file but then NOT play it?

thanks
--alex


Last edited by alex.blackbit on Thu Jul 26, 2007 5:33 am; edited 1 time in total
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Jul 25, 2007 10:00 am    Post subject: Re: disable output on mplayer Reply with quote

alex.blackbit wrote:
i want to use mplayer for giving out information of different audio files.
the content should NOT be played. i tried with the option "-nosound" which causes that there is no info output too.
the option "-ao null" causes mplayer to be silent, but it plays the file anyway.
is there a way to let mplayer process the file but then NOT play it?

thanks
--alex


You could use -oa null -vo null, but that is probably not going to help you, cause it will keep playing, even if you don't see or hear anything. So, the terminal will be locked until you press 'q'. So, I doubt mplayer can be used for this purpose. I don't have any alternative, though I suppose that some video libs around should have a simple tool to identify video files.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Jul 25, 2007 10:31 am    Post subject: Reply with quote

thank you for your answer. however, i did not expect that.
now i thought about doing something like the following:
Code:
mplayer file.ext& sleep 2;echo finished
that actually works... i mean, i exists after the 2 seconds (of course), but now i do not get the output i need... the thing between the ===== lines.
is there a way to get that back?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Jul 25, 2007 11:40 am    Post subject: Reply with quote

alex.blackbit wrote:
thank you for your answer. however, i did not expect that.
now i thought about doing something like the following:
Code:
mplayer file.ext& sleep 2;echo finished
that actually works... i mean, i exists after the 2 seconds (of course), but now i do not get the output i need... the thing between the ===== lines.
is there a way to get that back?


Mmm, I am not sure I understood correctly. That command line that you posted, will launch mplayer (as always, actually playing the sound and video), on the background, thanks to the ampersand (&). Then it just sleeps 2 seconds and then echoes a message. It will echo a message after 2 seconds, but that doesn't mean that mplayer will get killed after that time. Actually, it will continue running in the background... So, I am not sure that you are on the right way at all.

Maybe you intended to do something in the lines of:

Code:

mplayer file.avi &MPID=${!}; echo SLEEPING...; sleep 5; kill $MPID


Of course, you still need to bring back the output of mplayer, since it seems to cut it a bit when running in the background. I don't know how to do that, or even if it is possible.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Jul 25, 2007 12:00 pm    Post subject: Reply with quote

thanks for the reply, but i solved the problem in an other way.
i got a reply on the mplayer mailing list. the right option to do what i want is "-frames 0".

have a nice day
--alex
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Wed Jul 25, 2007 12:20 pm    Post subject: Reply with quote

Or use midentify
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
Dottout
l33t
l33t


Joined: 07 Mar 2006
Posts: 882

PostPosted: Wed Jul 25, 2007 2:52 pm    Post subject: Reply with quote

also `file' gives a useful output
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum