美文网首页
海康威视网络摄像头直播-nginx+ffmpeg+flv直播报错

海康威视网络摄像头直播-nginx+ffmpeg+flv直播报错

作者: 50506_CH | 来源:发表于2023-01-29 15:13 被阅读0次

简易直播启动后异常报错:-错误信息

ffmpeg -thread_queue_size 512 -rtsp_transport tcp -re -i "rtsp://admin:a123456789@192.168.8.74/h264/ch1/main/av_stream" -vcodec copy -acodec copy -f flv -flvflags no_duration_filesize "rtmp://192.168.8.92:1935/hls/local"

网络摄像头H.264 视频输入源

ffmpeg -thread_queue_size 512 -rtsp_transport tcp -re -i "rtsp://admin:a123456789@192.168.8.74/h265/ch1/main/av_stream" -vcodec copy -acodec copy -f flv -flvflags no_duration_filesize "rtmp://192.168.8.92:1935/hls/local"

ffmpeg version 3.4.12 Copyright (c) 2000-2022 the FFmpeg developers

  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)

  configuration: --prefix=/usr/local/ffmpeg

  libavutil      55. 78.100 / 55. 78.100

  libavcodec    57.107.100 / 57.107.100

  libavformat    57. 83.100 / 57. 83.100

  libavdevice    57. 10.100 / 57. 10.100

  libavfilter    6.107.100 /  6.107.100

  libswscale      4.  8.100 /  4.  8.100

  libswresample  2.  9.100 /  2.  9.100

Input #0, rtsp, from 'rtsp://admin:a123456789@192.168.8.74/h265/ch1/main/av_stream':

  Metadata:

    title          : Media Presentation

  Duration: N/A, start: 0.240000, bitrate: N/A

    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc

Output #0, flv, to 'rtmp://192.168.8.92:1935/hls/local':

  Metadata:

    title          : Media Presentation

    encoder        : Lavf57.83.100

    Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 1280x720, q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

Press [q] to stop, [?] for help

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

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

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

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

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

[rtsp @ 0x561a87b1f7e0] Undefined type (31)time=00:08:42.91 bitrate=3847.3kbits/s speed=  1x

[NULL @ 0x561a87b234e0] missing picture in access unit with size 1432829.8kbits/s speed=  1x

[NULL @ 0x561a87b234e0] SEI type 6 size 1912 truncated at 1192trate=3797.4kbits/s speed=  1x

frame=12818 fps= 24 q=-1.0 Lsize=  251080kB time=00:09:03.83 bitrate=3782.2kbits/s speed=0.998x

video:250830kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.099918%

出现以上提示后,ffmpeg命令行异常终止

尝试调整了网络摄像头-码率上限,调整前为4096kbps,调整后为1024kbps

启用ffmpeg命令,长时间观察后没有报错。

相关文章

网友评论

      本文标题:海康威视网络摄像头直播-nginx+ffmpeg+flv直播报错

      本文链接:https://www.haomeiwen.com/subject/monyhdtx.html