- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 rtsp 从 CCTV DVR 服务器(6 个 channel )复制视频。如何优化我的 ffmpeg 命令?
下面是配置:
ffmpeg 版本:ffmpeg-4.1.4-win64-static
CPU : Intel Core i7-8650U @1.9 GHz 2.11 GHz
内存:16 GB
当我尝试从 3 个 channel 下载时,视频似乎下载得很好,但是当我同时使用 >=4 个 channel 时,来自 channel 1 的视频几乎在大约 5 秒后被截断,并且输出文件从 channel 2 到 4 小得多, channel 5 视频输出没有问题。
例如这是根据 channel 的输出文件大小。
Channel 1 : 1.7 MB (truncated)
Channel 2 : 27.5 MB (approx 5 secs video loss in the beginning)
Channel 3 : 28.5 MB (approx 3-4 secs loss)
channel 4 : 29.5 MB (approx 2 secs loss)
Channel 5 : 30 MB (no issues found)
ffmpeg -rtsp_transport tcp -thread_queue_size 1024 -i rtsp://<input url 1> -thread_queue_size 1024 -i rtsp://<input url 2> -thread_queue_size 1024 -i rtsp://<input url 3> -thread_queue_size 1024 -i rtsp://<input url 4> -thread_queue_size 1024 -i rtsp://<input url 5> -map 0 -vcodec copy -t 60 -y outputfile1.mp4 -map 1 -vcodec copy -t 60 -y outputfile2.mp4 -map 2 -vcodec copy -t 60 -y outputfile3.mp4 -map 3 -vcodec copy -t 60 -y outputfile4.mp4 -map 4 -vcodec copy -t 60 -y outputfile5.mp4
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190716
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, rtsp, from 'rtsp://<input url 1':
Metadata:
title : -
Duration: N/A, start: 0.080000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6fffc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27c74f400] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27c721f40] max delay reached. need to consume packet
[rtsp @ 000001f27c721f40] RTP: missed 15 packets
[h264 @ 000001f27d627ac0] error while decoding MB 71 49, bytestream -6
[h264 @ 000001f27d627ac0] concealing 2258 DC, 2258 AC, 2258 MV errors in P frame
[h264 @ 000001f27d627ac0] Increasing reorder buffer to 1
Input #1, rtsp, from 'rtsp://<input url 2':
Metadata:
title : -
Duration: N/A, start: 0.040000, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6ffc40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27d2dc180] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27d2db700] max delay reached. need to consume packet
[rtsp @ 000001f27d2db700] RTP: missed 15 packets
[h264 @ 000001f27d2dbd00] concealing 7337 DC, 7337 AC, 7337 MV errors in P frame
[h264 @ 000001f27d2dbd00] Increasing reorder buffer to 1
Input #2, rtsp, from '<input url 3':
Metadata:
title : -
Duration: N/A, start: 0.080000, bitrate: N/A
Stream #2:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6ffd00] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27d302bc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
[rtsp @ 000001f27cfe9200] RTP: missed 44 packets
[h264 @ 000001f27cfe6c40] error while decoding MB 41 24, bytestream -8
[h264 @ 000001f27cfe6c40] concealing 5288 DC, 5288 AC, 5288 MV errors in P frame
[h264 @ 000001f27cfe6c40] Increasing reorder buffer to 1
Input #3, rtsp, from '<input url 4':
Metadata:
title : -
Duration: N/A, start: 0.080000, bitrate: N/A
Stream #3:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27cfe0940] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27dd1bec0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 107 packets
[h264 @ 000001f27dc05040] concealing 1340 DC, 1340 AC, 1340 MV errors in P frame
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 28 packets
[h264 @ 000001f27dc05040] Increasing reorder buffer to 1
[h264 @ 000001f27dc05040] concealing 6961 DC, 6961 AC, 6961 MV errors in P frame
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 53 packets
[h264 @ 000001f27dc05040] error while decoding MB 16 40, bytestream -18
[h264 @ 000001f27dc05040] concealing 3393 DC, 3393 AC, 3393 MV errors in I frame
Input #4, rtsp, from 'rtsp://<input url 5':
Metadata:
title : -
Duration: N/A, start: 0.120000, bitrate: N/A
Stream #4:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
Output #0, mp4, to 'outputfile1.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #1, mp4, to 'outputfile2.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #1:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #2, mp4, to 'outputfile3.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #2:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #3, mp4, to 'outputfile4.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #3:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #4, mp4, to 'outputfile5.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #4:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #1:0 (copy)
Stream #2:0 -> #2:0 (copy)
Stream #3:0 -> #3:0 (copy)
Stream #4:0 -> #4:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 000001f27dd0d8c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dd09040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dd09040] pts has no value
[mp4 @ 000001f27dc054c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dc054c0] pts has no value
[mp4 @ 000001f27ddf86c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27ddf86c0] pts has no value
[mp4 @ 000001f27c743b00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27c743b00] pts has no value
[mp4 @ 000001f27dd0d8c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[rtsp @ 000001f27d2db700] max delay reached. need to consume packet
[rtsp @ 000001f27d2db700] RTP: missed 1644 packets
[rtsp @ 000001f27c721f40] max delay reached. need to consume packet
[rtsp @ 000001f27c721f40] RTP: missed 2461 packets
[rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
[rtsp @ 000001f27cfe9200] RTP: missed 733 packets
frame= 46 fps=0.8 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 1790kB time=00:00:59.99 bitrate= 244.4kbits/s speed=1.04x
video:119011kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
最佳答案
请设置 RTP 数据包的套接字缓冲区大小。
buffer_size=size Set the UDP maximum socket buffer size in bytes. This is used to set either the receive or send buffer size, depending on what the socket is used for. Default is 64KB. See also fifo_size.
RTP: missed 2461 packets
关于ffmpeg - 多输入多输出 ffmpeg 命令中的截断视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57246310/
我想做的是让 JTextPane 在 JPanel 中占用尽可能多的空间。对于我使用的 UpdateInfoPanel: public class UpdateInfoPanel extends JP
我在 JPanel 中有一个 JTextArea,我想将其与 JScrollPane 一起使用。我正在使用 GridBagLayout。当我运行它时,框架似乎为 JScrollPane 腾出了空间,但
我想在 xcode 中实现以下功能。 我有一个 View Controller 。在这个 UIViewController 中,我有一个 UITabBar。它们下面是一个 UIView。将 UITab
有谁知道Firebird 2.5有没有类似于SQL中“STUFF”函数的功能? 我有一个包含父用户记录的表,另一个表包含与父相关的子用户记录。我希望能够提取用户拥有的“ROLES”的逗号分隔字符串,而
我想使用 JSON 作为 mirth channel 的输入和输出,例如详细信息保存在数据库中或创建 HL7 消息。 简而言之,输入为 JSON 解析它并输出为任何格式。 最佳答案 var objec
通常我会使用 R 并执行 merge.by,但这个文件似乎太大了,部门中的任何一台计算机都无法处理它! (任何从事遗传学工作的人的附加信息)本质上,插补似乎删除了 snp ID 的 rs 数字,我只剩
我有一个以前可能被问过的问题,但我很难找到正确的描述。我希望有人能帮助我。 在下面的代码中,我设置了varprice,我想添加javascript变量accu_id以通过rails在我的数据库中查找记
我有一个简单的 SVG 文件,在 Firefox 中可以正常查看 - 它的一些包装文本使用 foreignObject 包含一些 HTML - 文本包装在 div 中:
所以我正在为学校编写一个 Ruby 程序,如果某个值是 1 或 3,则将 bool 值更改为 true,如果是 0 或 2,则更改为 false。由于我有 Java 背景,所以我认为这段代码应该有效:
我做了什么: 我在这些账户之间创建了 VPC 对等连接 互联网网关也连接到每个 VPC 还配置了路由表(以允许来自双方的流量) 情况1: 当这两个 VPC 在同一个账户中时,我成功测试了从另一个 La
我有一个名为 contacts 的表: user_id contact_id 10294 10295 10294 10293 10293 10294 102
我正在使用 Magento 中的新模板。为避免重复代码,我想为每个产品预览使用相同的子模板。 特别是我做了这样一个展示: $products = Mage::getModel('catalog/pro
“for”是否总是检查协议(protocol)中定义的每个函数中第一个参数的类型? 编辑(改写): 当协议(protocol)方法只有一个参数时,根据该单个参数的类型(直接或任意)找到实现。当协议(p
我想从我的 PHP 代码中调用 JavaScript 函数。我通过使用以下方法实现了这一点: echo ' drawChart($id); '; 这工作正常,但我想从我的 PHP 代码中获取数据,我使
这个问题已经有答案了: Event binding on dynamically created elements? (23 个回答) 已关闭 5 年前。 我有一个动态表单,我想在其中附加一些其他 h
我正在尝试找到一种解决方案,以在 componentDidMount 中的映射项上使用 setState。 我正在使用 GraphQL连同 Gatsby返回许多 data 项目,但要求在特定的 pat
我在 ScrollView 中有一个 View 。只要用户按住该 View ,我想每 80 毫秒调用一次方法。这是我已经实现的: final Runnable vibrate = new Runnab
我用 jni 开发了一个 android 应用程序。我在 GetStringUTFChars 的 dvmDecodeIndirectRef 中得到了一个 dvmabort。我只中止了一次。 为什么会这
当我到达我的 Activity 时,我调用 FragmentPagerAdapter 来处理我的不同选项卡。在我的一个选项卡中,我想显示一个 RecyclerView,但他从未出现过,有了断点,我看到
当我按下 Activity 中的按钮时,会弹出一个 DialogFragment。在对话框 fragment 中,有一个看起来像普通 ListView 的 RecyclerView。 我想要的行为是当
我是一名优秀的程序员,十分优秀!