Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
I understand your m3u8 patch, and have already enabled the relevant option.       av_dict_set(&options, "m3u8_hold_counters", "0", 0); I think it has indeed helped to get rid of one place where I block, but there appear to be several., The stack that it's being blocked on now is DNS-related. I wo

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,18:16,Steven Liu 写道: > > > >> 在 2019年11月18日,17:58,Tom Gaudasiński 写道: >> > hls can hold to option after the patch: > > rw_timeout > -rw_timeout ED Timeout for IO operations (in > microseconds) (from 0 to I64_MAX) (default 0) > This can be used when y

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,17:58,Tom Gaudasiński 写道: > hls can hold to option after the patch: rw_timeout -rw_timeout ED Timeout for IO operations (in microseconds) (from 0 to I64_MAX) (default 0) This can be used when you downloading segment or m3u8 file, the http response too

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
So I have applied Steven's m3u8 patch, and have installed an AVIOInterruptCB, but I'm still getting blocked here: #0  0x7791d729 in __GI___poll (fds=fds@entry=0x7fffcf663118, nfds=nfds@entry=1, timeout=4999,     timeout@entry=)     at ../sysdeps/unix/sysv/linux/poll.c:29 #1  0x74

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
Okay, I will try it. Thank you. On 18/11/19 8:43 pm, Steven Liu wrote: > >> 在 2019年11月18日,17:32,Tom Gaudasiński 写道: >> >> How do I append “#EXT-X-ENDLIST” to the end of the m3u8 using the API? >> The URL I get ffmpeg to open is the m3u8 file, so I somehow need to do >> it in memory, I presume? >>

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,17:32,Tom Gaudasiński 写道: > > How do I append “#EXT-X-ENDLIST” to the end of the m3u8 using the API? > The URL I get ffmpeg to open is the m3u8 file, so I somehow need to do > it in memory, I presume? > Hello Tom, Can you try this patch please: https://patchwor

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
How do I append “#EXT-X-ENDLIST” to the end of the m3u8 using the API? The URL I get ffmpeg to open is the m3u8 file, so I somehow need to do it in memory, I presume? On 18/11/19 8:00 pm, Steven Liu wrote: > >> 在 2019年11月18日,16:44,Tom Gaudasiński 写道: >> >> That would probably work in the one ca

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,16:44,Tom Gaudasiński 写道: > > That would probably work in the one case where it's looking at the next > entry in the list. It's actually blocking on a read, so I need some way > to interrupt it. I will try AVIOInterruptCB and see how I go. AVIOInterruptCB maybe ok if that is bl

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
That would probably work in the one case where it's looking at the next entry in the list. It's actually blocking on a read, so I need some way to interrupt it. I will try AVIOInterruptCB and see how I go. On 18/11/19 7:36 pm, Steven Liu wrote: > >> 在 2019年11月18日,16:11,Tom Gaudasiński 写道: >> >>

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
Interesting. I will try this (AVIOInterruptCB) out and reply here soon. On 18/11/19 7:37 pm, zhilizhao wrote: > >> On Nov 18, 2019, at 4:11 PM, Tom Gaudasiński >> wrote: >> >> I essentially have a thread that I need to have exit immediately. I >> thought tweaking timeouts would be one way to g

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread zhilizhao
> On Nov 18, 2019, at 4:11 PM, Tom Gaudasiński > wrote: > > I essentially have a thread that I need to have exit immediately. I > thought tweaking timeouts would be one way to get this done, but I'm > starting to think that's a bad approach. > > So, let me, maybe, rephrase the question: Is t

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,16:11,Tom Gaudasiński 写道: > > I essentially have a thread that I need to have exit immediately. I > thought tweaking timeouts would be one way to get this done, but I'm > starting to think that's a bad approach. > > So, let me, maybe, rephrase the question: Is there a way I ca

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Tom Gaudasiński
I essentially have a thread that I need to have exit immediately.  I thought tweaking timeouts would be one way to get this done, but I'm starting to think that's a bad approach. So, let me, maybe, rephrase the question: Is there a way I can tell ffmpeg to terminate? Like, closing its sockets, or

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-18 Thread Steven Liu
> 在 2019年11月18日,15:37,Tom Gaudasiński 写道: > > That seems to change the call-stack a bit, but it still gets stuck on > something in hls.c. > > I'm looking into what it is. I've also tried connect_timeout. > > I really just need to terminate the av_read_frame call, so that it > returns immediat

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-17 Thread Tom Gaudasiński
That seems to change the call-stack a bit, but it still gets stuck on something in hls.c. I'm looking into what it is. I've also tried connect_timeout. I really just need to terminate the av_read_frame call, so that it returns immediately when I need it to, but av_read_frame appears to reconnect

Re: [FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

2019-11-17 Thread Steven Liu
> 在 2019年11月18日,14:56,Tom Gaudasiński 写道: > > I'm trying to set a read timeout for a http/https stream through the > API. Currently I'm passing... > > av_dict_set(&options, "timeout", "10", 0); > > ... to avformat_open_input(). > > This appears to not work once the connection has b