Search code examples
websocketffmpeggstreamer

Ingesting websocket with FFMPEG or Gstreamer


I'm searching to understand how to ingest WebSocket video stream with FFMPEG or Gstreamer.

I know I can ingest RTMP or RTSP in both softwares but ingesting WebSocket could increase reliability in the system.


Solution

  • Are you sure you need to use websocket to do that ? RTMP is TCP based so you have reliability.

    With Gstreamer you could use : appsrc with libsoup websocket client implementation.

    Here an example libsoup implementation : https://github.com/david7482/libsoup_websocket_client/blob/master/websocket_client.c

    Here an example of appsrc gstreamer https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html?gi-language=c

    Best regards