LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 09-23-2004, 07:21 PM   #1
_UnPrEdictAbLe_
Member
 
Registered: Aug 2004
Location: Hyderabad, India
Distribution: Fedora Core 4
Posts: 183

Rep: Reputation: 30
How to make mplayer automatically switch videos like media player?


Hi,

I am using FC2 with KDE and mplayer 1.0pre5.

I have configured to play all video files by mplayer on a double click.
(apparently, gmplayer doesnt work on my pc)

so i wanted to know if there is a way if mplayer can automatically switch the video file being played if i double click on some other file while mplayer is still playing a video, just like Windows Media Player can.

And I wanted to know if there is a way to create an event for
"double clicking video toggles full screen"....also similar to WMP.

Please dont get annoyed by me quoting WMP. I know that in the playing capability, mplayer is better, but I just wanted to make these handy features available for me in Linux.

regards
unpredictable
 
Old 09-23-2004, 08:20 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
If you run mplayer without the GUI you'd probably need
to write a little wrapper-script that kills potential previous
instances of mplayer to achieve stopping the first video
on starting the next. Something like
wmp.sh
Code:
#!/bin/bash
skill -2 mplayer
mplayer -fs $1
should do the trick, including the full-screen. (not tested).

Mplayer doesn't have mouse-bindings for the
double-click, though.


Cheers,
Tink

Last edited by Tinkster; 09-23-2004 at 08:22 PM.
 
Old 09-23-2004, 09:39 PM   #3
_UnPrEdictAbLe_
Member
 
Registered: Aug 2004
Location: Hyderabad, India
Distribution: Fedora Core 4
Posts: 183

Original Poster
Rep: Reputation: 30
thanks...


i will try the script thing....

i guess i will b able to achieve the effect i wanted with the shell script thing...
(why didnt tht occur to me ?? kill and restart.. )

but i dont know how to make the mouse thing work?? do you know of how to write a script for the mouse thing???

regards
unpredictable.
 
Old 09-23-2004, 10:29 PM   #4
_UnPrEdictAbLe_
Member
 
Registered: Aug 2004
Location: Hyderabad, India
Distribution: Fedora Core 4
Posts: 183

Original Poster
Rep: Reputation: 30
Hi

i tried the script....i works fine...but there is a little problem........

when ever there is a space or a dot or a bracket in the filename or its path....

the reason being...whenever the shell encounters a backslash....it considers it as a different parameter..

so is there a way to tell it that the thing with spaces and the dots and the brackets and the backslashes is ONE filename and not different parameters??


regards
unpredictable
 
Old 09-24-2004, 05:38 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Put the $1 in quotes ...

"$1"


Cheers,
Tink
 
Old 09-25-2004, 12:35 AM   #6
_UnPrEdictAbLe_
Member
 
Registered: Aug 2004
Location: Hyderabad, India
Distribution: Fedora Core 4
Posts: 183

Original Poster
Rep: Reputation: 30
Hi

I made that work....u need to change the variable called IFS which holds the delimeter..

i just saved it in a temp variable, executed my command and restored it...

Code:
temp=$IFS
IFS=$'\n'
mplayer $1
IFS=$temp
anyway...is there a way to start the mplayer as "Always on top"....even if the command is KDE specific it would do...

regards
unpredictable
 
Old 09-27-2004, 02:44 AM   #7
deviousubb
LQ Newbie
 
Registered: Sep 2004
Distribution: Debian sid
Posts: 2

Rep: Reputation: 0
Full screen = typing f in the terminal running mplayer.
Always on Top = typing T in the terminal.
 
Old 09-27-2004, 04:11 AM   #8
_UnPrEdictAbLe_
Member
 
Registered: Aug 2004
Location: Hyderabad, India
Distribution: Fedora Core 4
Posts: 183

Original Poster
Rep: Reputation: 30
No no....i know how will it be done manually...

i wanted to know if in the command line arguments i could specify...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to make a standalone network media player from a 200MHz PII resnak Linux - Software 1 05-06-2005 07:00 PM
Make mplayer default firefox player, How hraposo Debian 1 12-14-2004 07:34 PM
Windows media player 9 ant totum/Mplayer mat_uk111 Linux - Software 3 12-06-2004 11:14 AM
how to make mplayer the default embedded firefox player for real media files hkl8324 Linux - Newbie 0 08-10-2004 02:07 PM
Xine and mplayer failed. Windows media player won. akudewan Linux - Software 7 06-23-2004 07:43 AM


All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration