bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.51k stars 1.58k forks source link

ffmepgframerecorder start timeout #1967

Open ggslayer opened 1 year ago

ggslayer commented 1 year ago

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!

saudet commented 1 year ago

How is this question different from issue #1966?

ggslayer commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

/**

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

skill7899 commented 1 year ago

How is this question different from issue #1966?

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