Question

Video streaming between Unix Server (ffmpeg) and Windows client (vlc) completed without errors.

Server side:

ffmpeg -f v4l2 -r 25 -i /dev/video0 http://192.168.1.114:27018/feed1.ffm

Client side:

vlc player: Media -> Open Network Stream: http://192.168.1.114:27018/test.swf

However, video streaming has approximately 10 s. delay. For this reason, I tried using rtp instead http, but without result. Specifically, on server side I run:

ffmpeg -f v4l2 -r 25 -i /dev/video0 rtp://192.168.1.114:27018/feed1.ffm

After the stream begun, on client side I typed: rtp://@:27018 but it doesn't respond.

What I am missing? Is there any other way I could avoid delay?

No correct solution

OTHER TIPS

Short (incomplete) solution for the problem with the RTP stream:

  • Setup FFMPEG with the command line:

    ffmpeg -f v4l2 -r 25 -i /dev/video0 rtp://<client_ip>:<client_port>
    

    where <client_ip> and <client_port> need to be replaced with the client's IP address and port number, respectively.

Description of the problem with the RTP stream and the solution:

  • Generally, when setting up an HTTP server (in this case, namely HTTP multimedia server), on the server's side, the local port and the local IP address that the server needs to listen on are specified. So when you set up FFMPEG to stream on http://192.168.1.114:27018/, it probably means that FFMPEG (the server) will listen on its one interface that has the IP 192.168.1.114 and on the port 27018. Then the client needs to connect to http://192.168.1.114:27018 to get the streams.
  • However, when setting up an RTP FFMPEG server, the client address(es) and port(s) are specified on the server's side, meaning (inaccurately) that the server sends the packets to the desired addresses and the clients need to listen on their ports if they want the available streams. So the FFMPEG server needs to be setup with the URL rtp://<client_ip>:<client_port> and not the URL rtp://<server_ip>:<server_port>, for the <client_ip> to be able to access the stream on his local port <client_port>.

For more info on the FFMPEG's RTP URL format and a starting point for some intriguing concepts in RTP streaming (like multicasting), visit here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top