ofxOMXPlayer and gstreamer

Hey all–I’m trying to build an app that can load and play both live-streamed video and video files, and switch from one to the other in the window with a keystroke. I’m running OF on a Raspberry Pi 3, with the live stream coming in from a Pi Zero and Pi Camera via raspicam/gstreamer.

I’m basically trying to combine two apps to make this work-- @jvcleave’s “example-playlist” from the ofxOMXPlayer examples and some code from @kashim on this thread. (Thanks to both of you.)

I think I have both the live stream and the video player running simultaneously, but the live stream is the only thing visible in the window, and it’s really slow.

Code is here: https://pastebin.com/cCquKCHw

I’m newish to Pi and Linux, and new to OF. Would appreciate any tips! Thanks.

ofxOMXPlayer can play streams as well (see example-http-stream)

But yeah - you have 2 video players. I would either use ofxOMXPlayer for both or the gstreamer based ofVideoPlayer

Thanks for the response–that makes sense.

I’d messed with example-http-stream a bit, but couldn’t figure out how to get it to pull down my raspivid stream. (I guess that’s my 2 video player problem). Does the stream have to be in m3u8 format? Or, can you recommend another way to send the stream that’s readable in ofxOMXplayer?

Actually not sure as libav/ffmpeg portion of ofxOMXPlayer handles all that. If the regular omxplayer app can play a stream in theory it should work

there is a rtsp://*.mp4 address in example-http-stream that is did work. I was using Wowza installed on another local machine to test