gpt4 book ai didi

ffmpeg - ffprobe 无法将超时参数转换为 m3u8 中的 ts url

转载 作者:行者123 更新时间:2023-12-04 22:55:35 32 4
gpt4 key购买 nike

我使用 ffprobe 检查我的 m3u8 文件,我在本地安装 nginx,将一个 m3u8 文件放在 html 文件夹中,内容是:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:4
#EXTINF:1.928
http://127.0.0.1:8888/test.ts
#EXT-X-ENDLIST

然后使用'nc -l 8888'打开一个端口等待ffprobe连接,但不会响应任何东西。

我使用这个命令来运行 ffprobe:

./ffprobe2.6 -timeout 20000000 -analyzeduration 2147483647 -probesize 2147483647 │dragon@dragon-virtual-machine ~/Desktop $ nc -l 8888
-v error http://localhost/test.m3u8

最后,这条命令在 20 秒后无法退出,使用 gdb 并查找堆栈:
#0  0x0000000001647cd8 in poll ()
#1 0x000000000050f227 in ff_network_wait_fd (fd=4, write=0) at libavformat/network.c:78
#2 0x000000000050f2a1 in ff_network_wait_fd_timeout (fd=4, write=0, timeout=0, int_cb=0x2897c10) at libavformat/network.c:90
#3 0x00000000005851b9 in tcp_read (h=0x2897be0, buf=0x28962d0 "GET /test.ts HTTP/1.1\r\nUser-Agent: Lavf/56.40.101\r\nAccept: */*\r\nConnection: close\r\nHost: 127.0.0.1:8888\r\nIcy-MetaData: 1\r\n\r\n\r\n", size=4096)
at libavformat/tcp.c:194
#4 0x0000000000441456 in retry_transfer_wrapper (h=0x2897be0, buf=0x28962d0 "GET /test.ts HTTP/1.1\r\nUser-Agent: Lavf/56.40.101\r\nAccept: */*\r\nConnection: close\r\nHost: 127.0.0.1:8888\r\nIcy-MetaData: 1\r\n\r\n\r\n",
size=4096, size_min=1, transfer_func=0x585169 <tcp_read>) at libavformat/avio.c:333
#5 0x0000000000441578 in ffurl_read (h=0x2897be0, buf=0x28962d0 "GET /test.ts HTTP/1.1\r\nUser-Agent: Lavf/56.40.101\r\nAccept: */*\r\nConnection: close\r\nHost: 127.0.0.1:8888\r\nIcy-MetaData: 1\r\n\r\n\r\n", size=4096)
at libavformat/avio.c:364
#6 0x0000000000487cf4 in http_getc (s=0x28962c0) at libavformat/http.c:524
#7 0x0000000000487d89 in http_get_line (s=0x28962c0, line=0x7ffc23e235f0 "", line_size=4096) at libavformat/http.c:544
#8 0x0000000000489342 in http_read_header (h=0x2896220, new_location=0x7ffc23e25744) at libavformat/http.c:957
#9 0x000000000048a075 in http_connect (h=0x2896220, path=0x7ffc23e25750 "/test.ts", local_path=0x7ffc23e25750 "/test.ts", hoststr=0x7ffc23e27b50 "127.0.0.1:8888", auth=0x7ffc23e27f50 "", proxyauth=0x7ffc23e28350 "",
new_location=0x7ffc23e25744) at libavformat/http.c:1134
#10 0x0000000000486e9f in http_open_cnx_internal (h=0x2896220, options=0x7ffc23e28cc0) at libavformat/http.c:218
#11 0x0000000000486f48 in http_open_cnx (h=0x2896220, options=0x7ffc23e28cc0) at libavformat/http.c:238
#12 0x0000000000487ba4 in http_open (h=0x2896220, uri=0x2896268 "http://127.0.0.1:8888/test.ts", flags=1, options=0x7ffc23e28cc0) at libavformat/http.c:494
#13 0x0000000000440e92 in ffurl_connect (uc=0x2896220, options=0x7ffc23e28cc0) at libavformat/avio.c:208
#14 0x00000000004413ab in ffurl_open (puc=0x2893d28, filename=0x2895050 "http://127.0.0.1:8888/test.ts", flags=1, int_cb=0x2890810, options=0x7ffc23e28cc0) at libavformat/avio.c:310
#15 0x000000000047e93d in open_url (c=0x2892aa0, uc=0x2893d28, url=0x2895050 "http://127.0.0.1:8888/test.ts", opts=0x28929e0) at libavformat/hls.c:649
#16 0x0000000000480355 in open_input (c=0x2892aa0, pls=0x2892c60, seg=0x2895080) at libavformat/hls.c:1118
#17 0x0000000000480d69 in read_data (opaque=0x2892c60, buf=0x28a2ac0 "", buf_size=32768) at libavformat/hls.c:1323
#18 0x000000000044323a in fill_buffer (s=0x2893c60) at libavformat/aviobuf.c:482
#19 0x00000000004435c7 in avio_read (s=0x2893c60, buf=0x28959f0 "8\002\006\002", size=2048) at libavformat/aviobuf.c:569
#20 0x0000000000470e68 in av_probe_input_buffer2 (pb=0x2893c60, fmt=0x7ffc23e29f90, filename=0x2895050 "http://127.0.0.1:8888/test.ts", logctx=0x0, offset=0, max_probe_size=1048576) at libavformat/format.c:288
#21 0x0000000000471051 in av_probe_input_buffer (pb=0x2893c60, fmt=0x7ffc23e29f90, filename=0x2895050 "http://127.0.0.1:8888/test.ts", logctx=0x0, offset=0, max_probe_size=0) at libavformat/format.c:342
#22 0x0000000000481ac8 in hls_read_header (s=0x2890360) at libavformat/hls.c:1625
#23 0x000000000058ee13 in avformat_open_input (ps=0x7ffc23e2a0a0, filename=0x7ffc23e2a644 "http://localhost/test.m3u8", fmt=0x0, options=0x26ae150) at libavformat/utils.c:473
#24 0x00000000004122b0 in open_input_file (fmt_ctx_ptr=0x7ffc23e2a108, filename=0x7ffc23e2a644 "http://localhost/test.m3u8") at ffprobe.c:2478
#25 0x000000000041269c in probe_file (wctx=0x288d940, filename=0x7ffc23e2a644 "http://localhost/test.m3u8") at ffprobe.c:2562
#26 0x0000000000414878 in main (argc=10, argv=0x7ffc23e2a278) at ffprobe.c:3247

我们可以在 func 中看到 timeout=0
ff_network_wait_fd_timeout (fd=4, write=0, timeout=0, int_cb=0x2897c10) at libavformat/network.c:90

谁能帮忙

最佳答案

文档的那部分已经过时了。 http 协议(protocol)不再具有该选项。您可以使用 -rw_timeout 20M ,适用于所有协议(protocol)。

关于ffmpeg - ffprobe 无法将超时参数转换为 m3u8 中的 ts url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47938483/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com