quasarstream / python-ffmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg
https://www.quasarstream.com/op/python/ffmpeg-streaming?u=py-ff
MIT License
834 stars 142 forks source link

rtsp_transport with TCP #111

Closed HuyAIHub closed 1 year ago

HuyAIHub commented 1 year ago

Big thanks to you This git repo helps me alot, thanks bro.

how can I add rtsp_transport in this code but yesterday i tried with a rtsp which need use TCP protocol when reading rtsp stream. i used these command and run it in commandline : " ffmpeg -rtsp_transport tcp -i "rtsp://x.x.x.x:554/user=x&password=x&channel=2&stream=0.sdp" -y video.jpg " => it works no mater

but i need add '-rtsp_transport tcp' in your code in python. please give me a hand

aminyazdanpanah commented 1 year ago

Try the following code:

 video = ffmpeg_streaming.input("rtsp://x.x.x.x:554/user=x&password=x&channel=2&stream=0.sdp", pre_opts={rtsp_transport: "tcp"})