我正在运行ffmpeg以从另一个网站(其我的网站)中重新播放hls / m3u8。
我有一天会有更多的访问者,然后ffmpeg每3-6分钟停止一次idont知道为什么停止,正如我在日志错误中看到的那样:连接超时,在这种情况下我该怎么办
/ root / bin / ffmpeg -i http://example.com/1.m3u8 -c复制-bufsize 600k -hls_flags delete_segments -y /var/www/html/1.m3u8
[hls,applehttp @ 0x365f740] Opening 'http://example.com/13152.ts' for reading
[hls,applehttp @ 0x365f740] Failed to open segment of playlist 0
[hls,applehttp @ 0x365f740] Opening 'http://example.com/13153.ts' for reading
frame= 6500 fps= 20 q=-1.0 size=N/A time=00:05:06.29 bitrate=N/A speed=0.962x [hls @ 0x3689540] Opening '/var/www/html/tv1/test46.ts' for writing
[hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
[hls,applehttp @ 0x365f740] Opening 'http://example.com/13154.ts' for reading
frame= 6750 fps= 21 q=-1.0 size=N/A time=00:05:21.17 bitrate=N/A speed=0.979x [hls @ 0x3689540] Opening '/var/www/html/tv1/test47.ts' for writing
[hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
[hls,applehttp @ 0x365f740] Opening 'http://example.com/13155.ts' for reading
[hls @ 0x3689540] Opening '/var/www/html/tv1/test48.ts' for writingeed=0.97x
[hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
[hls,applehttp @ 0x365f740] Opening 'http://example.com/13156.ts' for reading
frame= 7089 fps= 21 q=-1.0 size=N/A time=00:05:34.74 bitrate=N/A speed=0.986x [hls @ 0x3689540] Opening '/var/www/html/tv1/test49.ts' for writing
[hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
[hls,applehttp @ 0x365f740] Failed to reload playlist 0trate=N/A speed= 1x
frame= 7339 fps= 21 q=-1.0 size=N/A time=00:05:44.73 bitrate=N/A speed=0.985x [hls,applehttp @ 0x365f740] Opening 'http://example.com/13157.ts' for reading
http://example.com/1.m3u8: Connection timed out
[hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
frame= 7339 fps= 21 q=-1.0 Lsize=N/A time=00:05:44.73 bitrate=N/A speed=0.964x
video:7793kB audio:4586kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[root@T2 www]#
/ root / bin / ffmpeg -v跟踪-re -err_detect积极的-user_agent服务器 -i http://example.com/1.m3u8 -c复制-bufsize 1600k -hls_flags delete_segments -y /var/www/html/1.m3u8
Last message repeated 2 times
[mpegts @ 0x3715660] pid=101 pes_code=0x1c0
[mpegts @ 0x3770560] nal 9
Last message repeated 2 times
[mpegts @ 0x3715660] pid=100 pes_code=0x1e0:02:20.88 bitrate=N/A speed= 1x
[mpegts @ 0x3770560] nal 9
[mpegts @ 0x3715660] pid=100 pes_code=0x1e0
Last message repeated 2 times
[mpegts @ 0x3715660] pid=101 pes_code=0x1c0
[mpegts @ 0x3770560] nal 9
Last message repeated 2 times
[mpegts @ 0x3715660] pid=100 pes_code=0x1e0
[mpegts @ 0x3770560] nal 9
[mpegts @ 0x3715660] pid=100 pes_code=0x1e0
Last message repeated 1 times
[mpegts @ 0x3715660] pid=101 pes_code=0x1c0
[mpegts @ 0x3770560] nal 9
Last message repeated 1 times
[AVIOContext @ 0x3773300] Statistics: 806144 bytes read, 0 seeks
[hls,applehttp @ 0x370e760] Opening 'http://example.com/1.m3u8' for reading
[hls,applehttp @ 0x370e760] Failed to reload playlist 0
[mpegts @ 0x3770560] nal 9
Last message repeated 1 times
[hls,applehttp @ 0x370e760] Opening 'http://example.com/1.m3u8' for reading
[hls,applehttp @ 0x370e760] Failed to reload playlist 0
No more output streams to write to, finishing.
[AVIOContext @ 0x37752e0] Statistics: 0 seeks, 4 writeouts
[hls muxer @ 0x3738fe0] deleting old segment test6.ts
[hls @ 0x37755c0] Opening '/var/www/html/1.m3u8.tmp' for writing
[file @ 0x3773480] Setting default whitelist 'file,crypto'
[hls muxer @ 0x3738fe0] EXT-X-MEDIA-SEQUENCE:16
[AVIOContext @ 0x3773300] Statistics: 0 seeks, 1 writeouts
frame= 3532 fps= 23 q=-1.0 Lsize=N/A time=00:02:21.24 bitrate=N/A speed=0.932x
video:5169kB audio:2207kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (http://example.com/1.m3u8):
Input stream #0:0 (video): 3532 packets read (5293095 bytes);
Input stream #0:1 (audio): 5886 packets read (2260224 bytes);
Total: 9418 packets (7553319 bytes) demuxed
Output file #0 (/var/www/html/1.m3u8):
Output stream #0:0 (video): 3532 packets muxed (5293095 bytes);
Output stream #0:1 (audio): 5886 packets muxed (2260224 bytes);
Total: 9418 packets (7553319 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x371a900] Statistics: 236 bytes read, 0 seeks
[root@T2 www]#