[Bf-committers] can we update ffmpeg to have RTSP support?

Chad Fraleigh chadf at triularity.org
Tue Jul 15 21:24:17 CEST 2014

On Tue, Jul 15, 2014 at 8:49 AM, Fazekas László <mneko at freemail.hu> wrote:

> What if the Blender game engine receives only a very simple
> (uncompressed pixel?) stream from a fifo and an external program
> converts the required format? Or instead of a fifo, maybe it is possible
> to use shared memory mapping.
> I'm sure it is possible in Linux but perhaps not in Windows. Is the game
> engine able to do this?
While not as dependency clean as blender supporting it internally, this
should be possible using ffmpeg and a loopback network connection:

ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s <width>x<height>
-i tcp://<port>

Also ffmpeg has a 'pipe:' protocol, so it could read from an arbitrary file
descriptor (that is connected to a spawned child process):

ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s <width>x<height>
-i pipe:<fileno>

I don't know if those features are enabled in ffmpeg by default, but since
they are rather basic, they might be part of its core code and always

However, if going with the blender built-in route, supporting mjpeg in
addition to raw/uncompressed would probably be useful. Since blender
already has libjpeg, and mjpeg is just a sequence of jpegs.

Audio would still need to be taken in account, if needed.

> 2014-07-15 16:37 keltezéssel, Dalai Felinto írta:
> > Hi,
> >
> >
> > What do I want:
> > ---------------------
> > FFmpeg libs to be compiled with: "--enable-network
> > --enable-protocol=tcp --enable-demuxer=rtsp --enable-decoder=h264"
> >
> >
> > Why do I need that for:
> > ---------------------------------
> > RTSP is used for 'remote camera' viewing, which in turn is a
> > requirement for some VR (Virtual Reality) installations. BlenderCAVE
> > (a VR framework) is in need that at the moment, and although they may
> > be able to fix their issue with patching their Blender, I would rather
> > see this available to more people.
> >
> > Bug report: https://developer.blender.org/T41004
> >
> >
> > I'm ok with RTSP but why the enable-decoder=h264?
> >
> -----------------------------------------------------------------------------
> > When I found the rtsp building instructions in the internet, the h264
> > was together, so it may be required. Also there is a known issue of
> > the game engine being extremely slow to playback some video formats.
> > I'm suspecting the lack of some decoders may be a reason for that.
> >
> > That said I'm getting some mixed google results on the license of h264
> > for playback (decoding). I'm no lawyer so does anyone know if there is
> > any license issue with that? Maybe the h264 bit is not needed only the
> > rtsp ... to be investigated.
> >
> >
> > Thanks for the consideration, let me know your thoughts,
> > Dalai


More information about the Bf-committers mailing list