LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-22-2006, 04:57 PM   #1
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Mint, Ubuntu, Knoppix
Posts: 64

Rep: Reputation: 15
Unhappy How to autoplay a mpeg movie after logging in?


Hi guys!
I'm new to this wonderful world of Linux. I installed last Novembre Mandriva 2005LE and in one word: Fantastic!
Now I would like to play a mpeg video in full screen after logging in and to put it in auto-replay.
I tried several things after searching the web but there are thousands of articles, some mentioning scripts (whatever they are), others mentioning boot levels (which I also don't know what are they) and I am getting more and more confused.
First of all, is a script a simple txt file like the .bat ones from DOS? How do I put it to run?
Is there a simple way to solve I problem?
Thanks in advance.
 
Old 01-22-2006, 05:43 PM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
To get something to run after you've logged into the GUI you need to use the desktop environment's autostart feature. If you're using KDE (default in Mandriva) then try the ~/.kde/autostart folder, in GNOME I think there's a GUI for adding things to be autostarted. More info:
http://gentoo-wiki.com/HOWTO_Autostart_Programs
http://mail.gnome.org/archives/gnome.../msg00142.html

The acutal script itself will just be a text file, just like .bat files in DOS. However you have to do 2 things to make it a valid script:
1) the first line should be
Code:
#!/bin/bash
to tell Linux that its a bash script, bash is the language of the default command line.
2) you need to right-click->properties on the script file and set the permissions to be executable, or use the chmod command from the command line.

Now to actually play the video file you'll need to use one of the video players, eg. totem or kaffeine or mplayer from the command line. I'm not sure about kaffeine or totem but I know mplayer has a lot of command line options (man mplayer) so there should be a way to get it to start in full screen mode.

Last edited by tkedwards; 01-22-2006 at 05:50 PM.
 
Old 01-25-2006, 03:02 AM   #3
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Mint, Ubuntu, Knoppix
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks!
I'll try that!
 
Old 01-25-2006, 04:12 AM   #4
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Mint, Ubuntu, Knoppix
Posts: 64

Original Poster
Rep: Reputation: 15
Excellent!
It worked perfectly!
I wrote the following:

#!/bin/bash
mplayer -verbose 0 -fs -really-quiet -nojoystick -loop 2 /home/videos/boeing727_03.avi

but I still have this issue I really would like to solve.
As you can see from the second line of the script there is the option for playing the video twice ("-loop 2") but between the two runs, instead of playing it as a sequence of two movies, it ends the first loop returns to the desktop and runs it again. Is there any option or way to put it to run as a continuos sequence?
Thanks.
 
Old 01-25-2006, 04:54 AM   #5
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Mint, Ubuntu, Knoppix
Posts: 64

Original Poster
Rep: Reputation: 15
Hi guys!
Just got the answer from a friend of mine.
Adding the following option

-fixed-vo

like this

mplayer -verbose 0 -fs -really-quiet -nojoystick -loop 2 -fixed-vo /home/videos/boeing727_03.avi

it prevents the breaks between loops/runs.
According to him this option tells mplayer to initialize just once keep him running while there is 'something' to do.
Thanks for everything!
 
Old 01-25-2006, 05:30 AM   #6
arunvk
Member
 
Registered: Nov 2005
Location: India
Distribution: Fedora 29
Posts: 197

Rep: Reputation: 30
hi

i have been using mplayer for quite sometime now. but
 
  


Reply



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
How do I convert a MPEG recorded movie to an ISO image in Linux?? avonrep37 Linux - Software 2 10-07-2005 09:13 AM
Take screenshot of mpeg movie haimeltjnfg Linux - Software 1 01-04-2005 07:34 PM
Autoplay for DVD Mojojo Linux - Software 0 05-31-2004 03:12 PM
Mpeg Movie Player? fuelinjection Linux - Software 7 05-03-2004 07:19 PM
How to convert mpeg file in mpeg-PS or TS hawkgreatelf Linux - Software 1 05-01-2003 06:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:40 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
Open Source Consulting | Domain Registration