gpt4 book ai didi

FFMPEG: [flv @ 0xbeee10] 输出流中的非单调 DTS

转载 作者:行者123 更新时间:2023-12-01 05:28:35 26 4
gpt4 key购买 nike

我正在使用 FFMPEG 获取我的 IP 摄像机的 RTSP 流并将其作为 RTMP 发送到我的流媒体服务器。当我运行命令时,出现以下错误中的 5 个,然后流确实开始了。但是,如果我让它过夜,它将停止流式传输并在终端中填满此错误。

[flv @ 0x191ba0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -202; changing to 0. This may result in incorrect timestamps in the output file.

我的 FFMPEG 命令有问题吗?

ffmpeg -rtsp_transport tcp -i rtsp://redact@192.168.10.112:redact_port/live0.264 -acodec copy -vcodec copy -f flv rtmp://127.0.0.1/live/ipcam
ffmpeg version N-87747-g123f6dc Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --enable-shared --enable-gpl --prefix=/usr --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-version3 --disable-mmx
libavutil 55. 77.101 / 55. 77.101
libavcodec 57.106.104 / 57.106.104
libavformat 57. 82.102 / 57. 82.102
libavdevice 57. 9.101 / 57. 9.101
libavfilter 6.106.101 / 6.106.101
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://redact@192.168.10.112:redact_port/live0.264':
Metadata:
title : Session Streamed by LIBZRTSP
comment : live0.264
Duration: N/A, start: 0.242000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720, 25 fps, 24.83 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, flv, to 'rtmp://127.0.0.1/live/ipcam':
Metadata:
title : Session Streamed by LIBZRTSP
comment : live0.264
encoder : Lavf57.82.102
Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720, q=2-31, 25 fps, 24.83 tbr, 1k tbn, 90k tbc
Stream #0:1: Audio: pcm_mulaw ([8][0][0][0] / 0x0008), 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -202; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -162; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -121; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -81; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -41; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0xbeee10] Non-monotonous DTS in output stream 0:0; previous: 0, current: -1; changing to 0. This may result in incorrect timestamps in the output file.
frame=321421 fps= 25 q=-1.0 size= 1190616kB time=03:36:01.31 bitrate= 752.5kbits/s speed= 1x

最佳答案

我在输入流中使用了 -use_wallclock_as_timestamps 1-r 15(15 是 FPS)。我还在所有输出流上添加了 -r 15

最大的罪魁祸首是我使用的相机。我有一个最大比特率而不是变量。我禁用了动态 GOP 和动态 fps。我也继续升级到 FFMPEG 4,它于 4 月 20 日发布(在您的原始帖子之后)。我将 Ubuntu 17.10 与 Axis M3027、Axis M3037、Axis M3048-P 相机一起使用。下周我将测试 Hanwha 12MP 鱼眼相机。我的输入源是通过 RTSP 的 h264。我正在输出 HLS 并录制到 MP4。

我的相机设置最终被...

  • 每秒帧数:15
  • 最大比特率:11000(不可变!)
  • 优先级:帧率(而不是图像质量)
  • 动态 GOP:关闭
  • P 帧:45 (FPS * 3)

基本上我让流尽可能稳定。尽可能多地消除变量并尽可能少地修改 ffmpeg 选项。我花了一整天的时间来处理 fflags。在我的例子中,我正在复制 vcodec 和 acodec。

关于FFMPEG: [flv @ 0xbeee10] 输出流中的非单调 DTS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46796992/

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