Omx player


12 posts
by susan.pryce » Wed Aug 22, 2012 7:54 am
I m a complete beginner. Could someone please give me specific instructions. I have loaded tracks on USB , opened in terminal. Typed omxplayer. But what do I type next? Many thanks
Posts: 2
Joined: Fri Aug 03, 2012 5:09 am
by Vanfanel » Wed Aug 22, 2012 8:25 am
You must specify the files you want to play. omxplayer needs to know what to play :)
You can also write "man omxplayer" and look for the right parameters if you need any.

The point is that maybe you must find out where the files are stored, so you should start by mounting the physical device contaning them, etc... But maybe you already did that part!
Posts: 245
Joined: Sat Aug 18, 2012 5:58 pm
by windhero » Wed Aug 22, 2012 8:50 am
The command to play videos (when using hdmi port) is
sudo omxplayer -o hdmi /blablablabla/.../filename.filetype

for example to play a video called test.avi that is located in /home/pi/videos/ folder one would type

sudo omxplayer -o hdmi /home/pi/videos/test.avi

Remember that its case sensitive, so you must type the exact same thing. For example if the file was named TeSt.avi and you typed test.avi, it wouldnt work.

Hope this solved your problems.

Tip: when typing the line, there is a way to fill the words without having to type them completely. This is useful when you have to type something very long:

For example, the file I want to play is named 9122352325325566.avi and its located in /media/23993939993/ folder. Instead of typing every single number you can type

sudo omxplayer -o hdmi /media/239[TAB] and it fill fill the rest (as long as you only have 1 file in the folder /media/ that starts with 239) so it will look like

sudo omxplayer-o hdmi /media/23993939993/

then continue typing

sudo omxplayer-o hdmi /media/23993939993/9122[TAB] and it will fill the line again as long as you only have 1 file in the folder /media/23993939993/ that starts with 9122
Posts: 34
Joined: Fri Aug 03, 2012 9:56 am
by falloniser » Wed Aug 22, 2012 10:02 am
Wow, I feel like a real ludite here. So I need to type the entire file path to get my video going? :(

I have a feeling I'm going to get very frustrated making 100 typos before my video starts to play...
Posts: 1
Joined: Wed Aug 22, 2012 9:52 am
by Beanz » Wed Aug 22, 2012 11:22 am
When i was using the Squeeze release i installed Openelec as well and if i wanted to watch a video i just ran openelec and viewed it in XBMC which is a great gui so any user can find their way round it.

At the moment i'm solely using my pi as a media server so have installed Xbian instead which is the same as openelec just a bit smoother and for me it doesn't crash when exiting a video like openelec did.
viewtopic.php?f=35&t=12893
http://xbian.org/
Posts: 49
Joined: Thu Apr 05, 2012 3:44 pm
by Ed Raket » Wed Aug 22, 2012 12:04 pm
windhero wrote:Tip: when typing the line, there is a way to fill the words without having to type them completely. This is useful when you have to type something very long:

For example, the file I want to play is named 9122352325325566.avi and its located in /media/23993939993/ folder. Instead of typing every single number you can type

sudo omxplayer -o hdmi /media/239[TAB] and it fill fill the rest (as long as you only have 1 file in the folder /media/ that starts with 239) so it will look like

sudo omxplayer-o hdmi /media/23993939993/

then continue typing

sudo omxplayer-o hdmi /media/23993939993/9122[TAB] and it will fill the line again as long as you only have 1 file in the folder /media/23993939993/ that starts with 9122


This is brilliant m8! Thx for sharing, this makes my keyboard last longer... :mrgreen:
User avatar
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm
by daviewales » Mon Nov 12, 2012 1:59 pm
You shouldn't need to use sudo to run omxplayer. Sudo is for when you need elevated permissions, such as changing or editing system files, etc.

Also, if you don't enjoy typing file paths, but would still like to use omxplayer to play video, try following the steps shown here:
http://jeffhoogland.blogspot.com.au/2012/08/howto-launch-omxplayer-via-gui.html

These steps will allow you to launch omxplayer automatically when you double-click on a video.

Incidentally, did you know that omxplayer can play videos from the text-based console you see before you type "startx" to get the gui?
Posts: 19
Joined: Wed Apr 25, 2012 12:22 am
by nfendall » Tue Nov 13, 2012 8:34 pm
I cannot get omx player to work at all, I have a folder on the desktop of the pi called test and in that folder a mp4 file called test.mp4. In terminal I navigate to the test folder and then type in the command
omxplayer -o hdmi /Desktop/test/test.mp4
I get the have a nice day! Reply but no video and in the log file the only error is
ERROR: COMXPlayer: :OpenFile - /Desktop/test/test.mp4

Can anyone please help me!?!? I am running the latest wheezy image

Thanks
Posts: 4
Joined: Sun Nov 11, 2012 10:48 pm
by KenT » Tue Nov 13, 2012 10:08 pm
If you have navigated to inside the test folder then you need omxplayer -o hdmi test.mp4

alternatively use the complete path - omxplayer -o hdmi /home/pi/Desktop/test/test.mp4
Pi Presents - A display package for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 534
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
by stick » Wed Nov 14, 2012 12:00 am
That "have a nice day" error message wound me up for days.
Have a look at:
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=15327&p=158646
Posts: 6
Joined: Mon Oct 15, 2012 9:19 pm
by bobbydriver » Fri Nov 16, 2012 2:11 pm
If you don't get the video and it keeps just saying "have a nice day" then it might be that your memory split is no good. I had that error when I only had 16mb of the RAM dedicated to GPU

Do you know what memory split you are running? I upped mine to 128mb for GPU and OMX player started working
Posts: 41
Joined: Thu Oct 18, 2012 9:06 am
by tusmaster » Tue Dec 04, 2012 4:27 pm
daviewales wrote:Also, if you don't enjoy typing file paths, but would still like to use omxplayer to play video, try following the steps shown here:
http://jeffhoogland.blogspot.com.au/2012/08/howto-launch-omxplayer-via-gui.html

Well... I did it correctly, but it seems it is not working on my Wheezy...
I get a black screen (that is "washable" by moving the mouse, strange...).
If somebody has a clue to make omxplayer work with GUI on wheezy... Thanks ! ;)
Posts: 10
Joined: Thu Sep 13, 2012 12:57 pm