Open erichorwitz opened 4 years ago
SRT would be amazing... and I am sure if you were open to it, we could get a bunch of people to crowd fund/sponsor its development.
+1
I see that you investigated not decoding corrupted frames (link in that wiki page is dead now), but that plus SRT for adjustable latency + recovery on lossy networks would be awesome.
Has anyone tried piping Ultragrid through the srt-live-transmit
tool?
+1
I'm going to try what @R6A8kJOk suggested. I'm new to UG, so I need to figure out how to send the output to pipe.
Has anyone tried piping Ultragrid through the
srt-live-transmit
tool?
This is a good idea for testing, but I don't think this would work in combination with reflectors.
I’d try this:
On the sender side: Listen on SRT port e.g. 6000, send it to remote:7000 Send Ultragrid to localhost:6000
On the receiver side: Listen on SRT 7000, output to localhost:8000 Listen with Ultragrid on localhost:8000
This would probably break Ultragrid reflectors, but SRT has their own flavor I believe.
How to deal with the fact that UG sends video and audio on separate ports? Run 2 instances of srt?
Worth a try. Could work, might break sync. Try video only first maybe.
I couldn't figure out how to only output UG to pipe. srt-live-transmit only accepts udp/srt input, so I did this: UG RTSP -> ffmpeg(codec copy) SRT -> SRT VLC That works, but latency increase is significant even with latency=0 with SRT.
./uv -t avfoundation:device=2:mode=15:fps=30 -c libavcodec:encoder=h264_videotoolbox:bitrate=2M --video-protocol rtsp 127.0.0.1
ffmpeg -i rtsp://127.0.0.1:8554/ultragrid -c copy -f mpegts 'srt://0.0.0.0:7000?pkt_size=1128&mode=listener&nakreport=1&listen_timeout=-1'
You should not need a pipe, just tell srt to listen on the port that UG sends to, which by default is 5004.
In theory is should be something like:
srt-live-transmit udp://:5004 srt://IP:port
Pipe as in move through a series of ports. Not literal Unix pipes.
Alright. Video does not load in VLC with that configuration.
./uv -t avfoundation:device=2:mode=15:fps=30 -c libavcodec:encoder=h264_videotoolbox:bitrate=2M --video-protocol rtsp 127.0.0.1
srt-live-transmit udp://:5004 'srt://:7000mode=listener&nakreport=1&listen_timeout=-1'
I also tried with UltraGrid RTP protocol. Still no.
RTSP is a server and udp for SRT input is a listener, so that won't work. Same for RTSP SDP.
ffplay doesn't like playing the direct output of UG.
./uv -t avfoundation:device=2:mode=15:fps=30 -c libavcodec:encoder=h264_videotoolbox:bitrate=2M 127.0.0.1
ffplay udp://127.0.0.1:5004
See this workaround.
Just for the record, we've started the implementation some time ago, it was at least basically usable (IIRC). I've rebased it over current code, however we've slightly lost a bit interest in it so it is uncertain if it will be merged in future.
Thanks for the update. I'm also less interested in this as using the external srt-live-transmit works fine.
I'm still interested - but I see that the external appears to work fine as well.
Would it be possible to add SRT stream support?
Thanks