I want to live stream from one source(ffmpeg) to multiple clients for which I'm using mkvserver. I'm able to live stream a webcam from ffmpeg(client) to mkvserver(server) as follows:
On Server :
nc -l <port-number> | ./server
On Client :
ffmpeg -f avfoundation -framerate 30 -i 0 -b 900k -f matroska -r 20 tcp://<ip-address>:<port-number>
To view the genereted steam on server, I used the ffplay
as:
ffplay tcp://<ip-address>:<port>
but I got the Connection timed out error
. Please suggest a way to view the generated stream on the server via ffplay
. Thanks!
Let me recap for clarification.
You are streaming from the client with ffmpeg
ffmpeg -f avfoundation -framerate 30 -i 0 -b 900k -f matroska -r 20 tcp://<ip-address>:<port-number>
to the server which listen with NetCat in some port over TCP.
nc -l <port-number>
You are piping the NetCat outPut (client steam) to Matroska Server Mk2 (./server) which serve the streaming in real-time over http on all interfaces on port 8080.
nc -l <port-number> | ./server
So I think that ffplay should connect through http in port 8080 to view the output of Matroska Server Mk2 (./server).
ffplay http://ip-address:8080
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With