dividuum / info-beamer

The Multimedia Presenter for Lua (for commercial projects, use info-beamer pi instead)
https://info-beamer.com/
Other
227 stars 48 forks source link

How is the video output handled? #69

Closed Sezotove closed 6 years ago

Sezotove commented 6 years ago

Working on a project where we're looking to display videos/images and be able to send a stream back to a WOWza box. Thought I could do this is ffmpeg and grab x11, but realized it's not using x11 so that will not work.

Would you know the ffmpeg input option to use here?

So far the info-beamer platform is working well and handling what we need at the moment.

Thanks for the help.

dividuum commented 6 years ago

I assume you're talking about the Raspberry Pi version, since that one doesn't use x11, right? I don't think there's any way to capture and encode a live stream of the Pi's output that's fast enough for any resolution other than potato quality and low frame rate. The only project I know that at least tries is https://github.com/DougGore/telepi. I personally didn't test it, but with it you should be able to capture the complete output and generate a h264 stream. But I seriously doubt that you get any thing better than 10fps with that.

Sezotove commented 6 years ago

That is correct, it is the Pi version. From https://www.ffmpeg.org/ffmpeg-devices.html#Input-Devices it shows there are several methods of input that ffmpeg can grab, x11 being one of them. Was not sure if there were any others listed that were related to how you had the video output being shown.

Sezotove commented 6 years ago

As an example, I thought maybe it was using framebuffer, so with ffmpeg I attempted to grab the /dev/fb0 and stream it, which worked, but only displayed my terminal, not the output from info-beamer.

dividuum commented 6 years ago

That is expected, as info-beamer doesn't draw into the framebuffer. Instead it uses (multiple) dispmanx layers. See this blog post if you want to learn a bit more about this. So x11 or framebuffer grabbing won't help. You'll have to snapshot the dispmanx output. The tool I linked does that. I don't know if ffmpeg is capable of that too. Unless there's Pi specific code, I doubt it.