Occasional corruption when streaming over UDP on localhost

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Occasional corruption when streaming over UDP on localhost

Jonathan Viney
Hi everyone,

I am attempting to receive an RTSP stream, save it to disk, and also make
it available for other consumers to use on the same machine. Eg:

Process 1:
ffmpeg -rtsp_transport tcp -i rtsp://10.1.1.1:554/stream.asp -c copy -y
direct-copy.ts -c copy -f mpegts "udp://127.0.0.1:2345"

Process 2:
ffmpeg -f mpegts -i udp://127.0.0.1:2345 -c copy -y udp-out.ts

The problem is that the file captured by process 2 over UDP has occasional
corruption. The file written directly to disk by process 1 is correct.

I experimented with using the new zmq capabilities, and that worked fine
with both TCP and IPC transports.

Process 1:
ffmpeg -rtsp_transport tcp -i rtsp://10.1.1.1:554/stream.asp -c copy -y
direct-copy.ts -c copy -f mpegts "zmq:ipc:///tmp/feed1"

Process 2:
ffmpeg -f mpegts -i "zmq:ipc:///tmp/feed1" -c copy -y zmq-out.ts

The file captured with ZMQ does not have any corruption. Is there a way to
achieve a valid stream using UDP?

Cheers,
-Jonathan.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".