FFMPEG with unix domain sockets

From AcrodusWiki
Revision as of 16:11, 16 December 2025 by Alex (talk | contribs) (Created page with "This is some information regarding using ffmpeg and ffplay with unix sockets as input/output. Example path of unix domain socket -i unix:/tmp/video/stream.socket The following options can be used -timeout -listen and -type STREAM socket type=1, DGRAM socket type -2. Listen=1 for server, Listen=0 for client. Note that significant problems were had with DGRAM unix sockets, current assumption is that the ffmpeg/libavformat/unix.c file is not adequate for handling DGRAM...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is some information regarding using ffmpeg and ffplay with unix sockets as input/output.

Example path of unix domain socket -i unix:/tmp/video/stream.socket

The following options can be used -timeout -listen and -type

STREAM socket type=1, DGRAM socket type -2. Listen=1 for server, Listen=0 for client.

Note that significant problems were had with DGRAM unix sockets, current assumption is that the ffmpeg/libavformat/unix.c file is not adequate for handling DGRAM sockets.

Example of working commands to use ffmpeg to communicate with ffplay via STREAM socket.

ffmpeg -i rtsp://test:Password@192.168.50.91:554/Streaming/Channels/101 -c copy -f h264 -type 1 -listen 1 unix:/tmp/video/test.socket
ffplay -type 1 -i unix:/tmp/video/test.socket

Note the FFMPEG instance does no decoding, the FFPLAY instance does this.