PyAV-Org / PyAV

Pythonic bindings for FFmpeg's libraries.
https://pyav.basswood-io.com/
BSD 3-Clause "New" or "Revised" License
2.44k stars 359 forks source link

Please add support for the srt protocol (Secure Reliable Transport) #1498

Closed gargolito closed 2 weeks ago

gargolito commented 3 weeks ago

Overview

FFMpeg has support to fully utilize the SRT protocol

Existing FFmpeg API

libavformat/libsrt.c

Expected PyAV API

Example:

container = av.open(srt://ipaddress:port?mode=caller)

This will currently fail with "unable to open file"

Investigation

Tried to open an srt video stream in caller mode

container = av.open(srt://IPADDRESS:PORT/?mode=caller)

Reproduction

  1. Start a listener (this is the server): ffmpeg -hide_banner -loglevel error -re -stream_loop -1 -i SOME_VIDEO_FILE -c copy -map 0 -f mpegts srt://localhost:5765/?mode=listener
  2. try to open the stream with python script using pyav as usual

Versions

Additional context

I really just need to be able to open srt streams, so that basic functionality would be enough for me.