LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   How to autoplay a mpeg movie after logging in? (https://www.linuxquestions.org/questions/mandriva-30/how-to-autoplay-a-mpeg-movie-after-logging-in-406650/)

aabfm 01-22-2006 04:57 PM

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.

tkedwards 01-22-2006 05:43 PM

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.

aabfm 01-25-2006 03:02 AM

Thanks!
I'll try that!

aabfm 01-25-2006 04:12 AM

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.

aabfm 01-25-2006 04:54 AM

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!

arunvk 01-25-2006 05:30 AM

hi

i have been using mplayer for quite sometime now. but


All times are GMT -5. The time now is 02:21 AM.