[FFmpeg-user] ffprobe timeout is not working
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon Sep 21 01:28:40 EEST 2020
Am Sa., 19. Sept. 2020 um 19:14 Uhr schrieb gilmotta
<flight.display.1 at gmail.com>:
>
> Hello Everybody,
>
> I'm afraid this is a recurring subject but -timeout and -stimeout is not
> working for me. I look at older posts but no luck.
>
> I tried seconds, milliseconds and micro seconds but no matter what I do
> ffprobe returns immediately when I type the command with -timeout or
> -stimeout
>
> /var/www/ffmpeg-4.3/ffprobe -timeout 30000000 -v error -i
> rtmp://localhost/streams/stream1
> [rtmp @ 0x587f5c0] Cannot open connection
> tcp://localhost:1935?listen&listen_timeout=-64771072
> rtmp://localhost/fds/stream1: Address already in use
Complete, uncut console output missing.
Does the patch below (inlined) help?
Carl Eugen
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index d9741bc622..c4975097a0 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -120,7 +120,7 @@ typedef struct RTMPContext {
int nb_tracked_methods; ///< number of tracked methods
int tracked_methods_size; ///< size of the
tracked methods buffer
int listen; ///< listen mode flag
- int listen_timeout; ///< listen timeout to
wait for new connections
+ uint64_t listen_timeout; ///< listen timeout to
wait for new connections
int nb_streamid; ///< The next stream id
to return on createStream calls
double duration; ///< Duration of the
stream in seconds as returned by the server (only valid if non-zero)
char username[50];
@@ -2653,7 +2653,7 @@ static int rtmp_open(URLContext *s, const char
*uri, int flags, AVDictionary **o
port = RTMP_DEFAULT_PORT;
if (rt->listen)
ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port,
- "?listen&listen_timeout=%d",
+ "?listen&listen_timeout=%"PRId64,
rt->listen_timeout * 1000);
else
ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL);
More information about the ffmpeg-user
mailing list