ejarosek
Posts: 29
Joined: Mon Aug 27, 2012 6:39 pm

Simultaneous OpenMAX accelerated decodes and encode / decode

Mon Aug 27, 2012 6:48 pm

So, more of a general question I guess. I modified the hello_video sample so that it played back in a window instead of fullscreen so that I could run two different instances to try multiple video playback. However, when I do so the first instance must complete before the second instance starts. My question (before I run down trying to actually program test it), is this due to the hardware acceleration being locked to a specific process at a time or due to a limit of the hardware that it can only process one decode simultaneously?

In the same vein, can the hardware handle encoding and decoding simultaneously or can only of these be done concurrently (now that we have h.264 encoding unlocked).

Thank you,
Ehren

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5282
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Simultaneous OpenMAX accelerated decodes and encode / de

Mon Aug 27, 2012 7:10 pm

Should be fine.

Pretty sure I've accidentally launched omxplayer twice, and both videos were playing.

Try adding a command line option to hello_video to launch on left or right side of screen, and try running it twice.

ejarosek
Posts: 29
Joined: Mon Aug 27, 2012 6:39 pm

Re: Simultaneous OpenMAX accelerated decodes and encode / de

Mon Aug 27, 2012 7:25 pm

Yes, that is what I did. I launched two instances at the same time but instance 2 did not start playing until instance 1 finished playing.

Could it be a resource issue? I was trying two instances playing the test.h264 file which are 1080p I think. Maybe two 720p instances...I'll try that out.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5282
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Simultaneous OpenMAX accelerated decodes and encode / de

Mon Aug 27, 2012 8:04 pm

ejarosek wrote:Yes, that is what I did. I launched two instances at the same time but instance 2 did not start playing until instance 1 finished playing.

Could it be a resource issue? I was trying two instances playing the test.h264 file which are 1080p I think. Maybe two 720p instances...I'll try that out.
What memory split are you running? With 128M I seem to be able to launch hello_video twice.

hmchen
Posts: 3
Joined: Mon Dec 10, 2012 8:28 am

Re: Simultaneous OpenMAX accelerated decodes and encode / de

Tue Dec 11, 2012 7:44 am

I am trying to play multiple video file at the same time. I launch original hello_video twice with a few clock skew.
./hello_video.bin test.h264 & sleep 2; ./hello_video.bin test.h264
Both players works well. Video is flashing due to the clock skew.
It is normal and just what I want. Video output is not locked by any player.

I modified hello_video to render video to a subwindow of quad view (file attached). First player works fine and text of background console is also visible. Then I launch the second player instance, now the display becomes complete blank. No error/warning message at all. When I kill the second instance, the video of the first player comes back.

My environment:
256MB memory split, hardfloat Raspbian wheezy 2012-10-28, and the last firmware downloaded from GitHub.

Please advice kindly.
Attachments
hello_video.tar.bz2
(3.69 KiB) Downloaded 237 times

Return to “OpenMAX”