MrOaiki
Posts: 33
Joined: Fri Jun 28, 2013 12:21 am

Mplayer using the GPU or OMXplayer looping seamlessly

Fri Jun 28, 2013 12:30 am

I made a bash script suiting my needs exactly. One part of the script is all about looping video files seamlessly, one after the other, over and over again. Works great on my home computer. Today I bought a Raspberry Pi and installed all programs I need as well as putting my script in there. It turns out the video shutters and so does the sound when mplayer is invoked to do its job. After searching this forum, it turns out mplayer doesn't support GPU rendering of the video. It also turns out that omxplayer does.

Questions:

1. Does Mplayer support using the GPU for playing video? If yes, how do I make it do that?

2. If Mplayer does NOT support using the GPU, only and only Omxplayer does, how do I make Omxplayer loop several video files in a folder, and doing so seamlessly. So, no terminal, no paus, just the files running one after the other.

Thanks allot.

ghans
Posts: 7889
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Fri Jun 28, 2013 6:06 am

1. No . And therefore there is nothing to enable.
2. Search the forums , you can also use Google for that.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

MrOaiki
Posts: 33
Joined: Fri Jun 28, 2013 12:21 am

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Fri Jun 28, 2013 10:30 am

Thank you very much for quick response. I will try to find a script suiting my needs. So far I've only found one script and that one isn't "seamless".

yamiseto
Posts: 1
Joined: Sat Jul 20, 2013 5:23 pm

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Sat Jul 20, 2013 5:29 pm

Thank you for all the constructive replies. I've come here from Google, to find these informative answers to the same question that OP asked.

Now, my addition to the discussion. If you don't know the answer, save yourself and everyone else some time. Don't reply.

Thanks.

trickiedick
Posts: 4
Joined: Sun Jan 13, 2013 12:49 pm

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Tue Jul 23, 2013 9:06 am

I have a project that was wanting a seamless loop. I'm still working on it, but I used omxplayer called from a python script, itself called from /etc/rc.local - this gave me a startup straight to the video playing.

I wanted to not see the terminal screen once it started looping so I tried using fbi - the framebuffer picture viewer "underneath" (ie called before omxplayer). On my script fbi is called with a list of .jpg files and does a looping slideshow - "underneath" the video player.

Code: Select all

fbishell = "fbi -a -noverbose -t 3 " + picture_path
fbi = subprocess.Popen(fbishell, stderr=None, stdout=None, shell=True)
The omxplayer line is

Code: Select all

omxp = subprocess.Popen(['omxplayer',movie_path],stdout=PIPE,stdin=PIPE)
so that you can send keyboard commands to omxplayer:

Code: Select all

omxp.stdin.write("q")
Because in my application the videos do not play constantly but have to wait to play at a given time (I'm actually synchronising 3 raspberry pis showing video) when the omxplayer finishes, I -should- then see the fbi slideshow. What I actually get is flashes of a black screen, and of the slideshow....

At least I don't see the terminal screen.

maigre
Posts: 1
Joined: Fri Dec 12, 2014 6:28 pm

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Fri Dec 12, 2014 6:32 pm

hi,
it's a bit a necro bump,
but i'm now working on HPlayer an omxplayer fork.
You can find it there:
https://github.com/Hemisphere-Project/HPlayer

It supports loop over file / playlist / folder,
and some other cool features like osc remote control,
opengl shaders, etc..

It's based upon ofxOMXPlayer from jvcleave

cheers

Kron98
Posts: 2
Joined: Wed May 30, 2018 3:53 pm

Re: Mplayer using the GPU or OMXplayer looping seamlessly

Wed May 30, 2018 6:44 pm

Hey. Adafruit uses Mplayer to display video on a 3.8 touchscreen without HDMI. Is it possible to run this script on startup, automatically?

https://learn.adafruit.com/adafruit-pit ... ing-videos

Return to “Graphics, sound and multimedia”