javacv icon indicating copy to clipboard operation
javacv copied to clipboard

ffmepgframerecorder start timeout

Open ggslayer opened this issue 1 year ago • 5 comments

Hi, when there is no network, in my ubuntu system, the FFmpegFrameRecorder'start method timeout with 20 seconds, I think this is relative with system? is there some method can change the connect timeout of rtmp server ? thankyou!

ggslayer avatar Jan 09 '23 14:01 ggslayer

How is this question different from issue #1966?

saudet avatar Jan 09 '23 14:01 saudet

It's different, in my test case, when I set rw_timeout to 5000000, It works with record method. (I disconnect the network when streaming), In this case, I call recorder's start method when there is no network, It don't return in 5000000, it takes 20 seconds. even there is no rw_timeout set, the start method returns 20 seconds later always, I think rw_timeout is not affect for start method.

ggslayer avatar Jan 09 '23 14:01 ggslayer

I can't find any other timeout option which can control the avio_open2, I see your example, should I must give a callback implement?

ggslayer avatar Jan 09 '23 14:01 ggslayer

/** * grabber.getFormatContext() is null before grabber.start(). * * But if network is disabled grabber.start() will never return. * * That's why interrupt_callback not suitable for "network disabled * case". */

I notice this comment, In my recorder case, I can't use formatcontext before start succeed. So the interrupt_callback is not suitable for my purpose( set the connect timeout), So, I have no direction about the connect timeout of recorder to rtmp server. Can you give me some advise? thank you very much

ggslayer avatar Jan 09 '23 15:01 ggslayer

How is this question different from issue #1966?

this issue "timeout" option work on rtsp but not work in rtmp.

skill7899 avatar May 26 '23 03:05 skill7899