Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
20th August 2021, 09:53 | #1 | Link |
Registered User
Join Date: Jul 2007
Posts: 48
|
Force FFmpeg output only TCP as RTSP proxy
Hi! do somebody here knows how to force ffmpeg outputing a TCP rtsp instead of default UDP? I know how to force the input to TCP, with -rtsp_transport tcp option, but I can't find how to force the output.
Read somewhere that someone solved suggesting to use avformat_write_header(ofmt_ctx, &options); but didn't say nothing mode about that.. and this is too generic info. Thanks a lot for help! |
20th August 2021, 12:27 | #2 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Any of these any good,
What steps are needed to stream RTSP from FFmpeg? https://stackoverflow.com/questions/...sp-from-ffmpeg FFmpeg - capture a rtsp stream and re-stream it to another rtsp-server https://stackoverflow.com/questions/...er-rtsp-server How to minimize the delay in a live streaming with ffmpeg https://stackoverflow.com/questions/...ng-with-ffmpeg StackOverflow:- Hot answers tagged rtsp https://stackoverflow.com/tags/rtsp/hot?filter=year Or more of same, Google:- Code:
"ffmpeg" NEAR "TCP rtsp" site:stackoverflow.com Good Luck
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
20th August 2021, 20:54 | #3 | Link |
Registered User
Join Date: Jul 2007
Posts: 48
|
Hi, thanks for links, I've spent hours reading all around, I can't solve my problem.
I?m using this string, it connect to first sopurce by TCP, but ffmpeg is not opening a tcp listenng port. It does open 4 UDP ports with different values (far from what I've specified for tcp), anyway I've tried to connect to them too with VLC, but no one works. ffmpeg -re -i rtsp://adminassord@rtsp.source:554/live.sdp -rtsp_transport tcp -f rtsp -rtsp_transport tcp rtsp:/192.168.0.100:50041/ May you kindly correct it if it is wrong? |
21st August 2021, 00:58 | #4 | Link |
Registered User
Join Date: Sep 2005
Posts: 130
|
You need to put the -rstp_transport tcp before the input, something like this
PHP Code:
Last edited by patul; 21st August 2021 at 01:01. |
23rd August 2021, 13:19 | #5 | Link |
Registered User
Join Date: Jul 2007
Posts: 48
|
thanks for answering me,
I underline the problem is not input (to connect by tcp only to an rtsp source), the problem is output, to stream from ffmpeg only with TCP, ignoring any UDP request and forse to use TCP only. How this can be possible? Thank you. I've tried some apps on Android TV to show an rtsp stream, they will connect by UDP as first attempt, there are no way to foce this clients to use TCP, I've tried with Windows firewall but didn't work. I need to kill UDP Thank you |
25th August 2021, 21:20 | #7 | Link |
Registered User
Join Date: Jul 2007
Posts: 48
|
I've solved it using https://github.com/aler9/rtsp-simple-server
in the end you may get a TCP stream from the rtsp://serverIPort/proxied seems there are no ways to tell ffmpeg to stream on TCP only |
Tags |
ffmpeg, proxy, rtsp, tcp |
|
|