ofVideoplayer fairly unusable on RPI3


#1

playing a few simple, small size , very short h264 movie(.mov) clips (no sound) on RPI 3, OF 0.98 (latest jessie).

Get lots of these errors:
[warning] ofGstUtils: setPosition(): unable to seek
and sometimes:
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module omxh264dec-omxh264dec0 reported: No valid frames decoded before end of stream

Tried the video player example (fingers movie) which generally freezes after a few plays or if you touch the mouse.
stripped this app down to a real simple load and play when a key is pressed - slightly better but still not usable.
issues:

Using setFrame to set the player to the first frame seems to set it to -1. player does not appear to update.
or seems to go to the wrong frame. if you assign .play() to a key and press the key so it gets 2 play messages close together, the video and app seems. to freeze.

Tried different codecs - made no difference.
tried the info here:

this just makes it worse.
Of course it all works perfectly on OSX, but it has to run on the RPI…

Anyone got simple video playback working reliably on an RPI3? I really need to make this work.

I looked at ofxOMXplayer but that freezes the machine solid when I try to compile LOL…
and I don’t think it can do frame by fame locating.

TIA.


#2

Hi steeley,

Yes I did. Not only simple video playback but a rock solid production media player on Raspi 1, 2 and 3. They do their job in a museum 14 hours every day for years now. Code evolved, worked with mulitple OF versions. Full HD no problem on a Raspi 3. I did not manage to run every codec/setting, but as long you are able to render your videos accordingly you should be fine.
I used ofxOmxPlayer though. Rarely had any problems with it. Did you get use the apporopriate branch?

In fact I posted quite a lot about this topic. Maybe start here to get an overview?

crossing fingers…
oe


#3

Thanks dasoe - thats a nice bit of work.

To clarify, I’ve done a lot of fairly advanced OF video work, but only on OSX - all works great :slight_smile:

This simple project is small 160x140 movies, which can play even on the oldest slowest mac/PC.
They play fine on an RPI with FFmpeg tools VLC etc.
I’m not trying to do full HD or anything close to that.

As I mentioned even the OF video example is unreliable and stutters or freezes the app. so clearly the issue
is with ofvideoplayer on RPII.

I could use a sequence of still images and do an animation but I have been given a load of rendered small videos
to use. Unfortunately I can’t get the people I’m working for to redo their videos as image sequences as they are busy on other stuff.( and refuse to do it anyway to solve “my” problem :frowning: … )

I’ll look at ofOMXlayer addon again, but I think that might be replacing one set of problems with another.

thx.


#4

Hi steely,

this is really strange - but I know you are not the only one with these kinds of experience (as you can see in the post I linked last time).

Just for your information: My last tests is maybe 2 months ago. I was curious about Arturo’s claim that standard ofVideoPlayer could be usable on Raspi. I was setting up a fresh raspbian and OF. I was then trying standard ofVideoPlayer, no special settings, with the bunny example, which is HD. I was getting 16-20 fps. Not as quick as ofxOmxPlayer but still impressive. I tried the finger movie too - as far as I remember - and it was OK. So I had a very different experience from you.

So there seem to be settings that work OK and some that do not at all. As I did not manage to get a non-working setting yet I have no idea what might cause this. But I am interested - in case you get any clues, please share.
Just 2 questions I already have: You used the raspian image, not Noobs? Did you use arm6 or arm7 OF?

anyway good luck, I’ll try to check by from time to time!
oe


#5

Thanks for your help and interest dasoe.
Actually just got OMX player running on RPI - very nice… might use it in the future if I need full on HD.
I’ll see if it can do what i want with my teeny tiny little movies :slight_smile:

I may just write a video frame extractor and build a simple image/animation sequencer - I’ve done
lots of still image sequencing in OF. Could be fun, but I’m getting a bit short of time LOL.

I’m using raspbian liite latest jessie. OF was installed as per the instructions on the OF site. I’ve done lots of RPI
installs of OF and had no install issues so far.

Again, the issue is not a question of trying to play big videos and 30+ FPS rates. It is the fact that the standard RPI player seems to get confused as to where it is, and the various play ,set position and set frame commands do not work correctly. EXACTLY the same simple code and media works fine on my mac. My small videos play fine in a media player on RPI.

Anyway here is the output of ofOMXvideoplayer as it is playing:

error ] AudioCodecOMX::GetChannelMap - FFmpeg reported 2 channels, but the layout contains 0 ignoring
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 33.3333
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): Opened video PASS
[ error ] OMX_ERRORTYPE Component::waitForEvent(OMX_EVENTTYPE, long int): OMX.broadcom.audio_render waitForEvent Event: OMX_EventPortSettingsChanged TIMED OUT at: 20
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout


#6

Hello steeley,

Hmm, interesting. Sorry I am not really quick at the moment. While time is running for you…
I never tried with raspian light. This is one possible difference. The other would be versions of course. So there is 2 possible ways to go:

For ofVideoPlayer: maybe you find some time to test this App. To get the most info please try first the already compiled version in bin/. If it works well, try cleaning/compiling it to see if there’s a change. It should run the bunny video with around 18 fps. If you change the video in the code to “fingers.mov” it should run (small video) at 60fps.
If it does not work well I may provide an image of a SD card for next try?

For ofxOmxPlayer: If you ignore the errors, does it play the video as expected?

Last question (just to be sure): Did you set the GPU memory on the raspi to higher value, like 256?

have a good day!
oe


#7

hey no problem dasoe…

I have got things working quite well now. I reinstalled OF again and OMX player just to be sure all install stuff was OK.

I tried my little movies and those errors don’t seem to appear. They play smoothly in OMXplayer.
In fact, they didn’t seem to stop things working. They are only there every 10 seconds or so when playing the bunny movie. Perhaps I am worrying too much LOL…

Thx.


#8

… although I have now found that if I have a movie playing , and I use a key command to stop or locate a second movie, the first movie glitches every time the second movie gets located or starts playing again… :frowning:

Probably need to do some thread stuff and control remotely via tcp to get it smoother.