美文网首页
ffmpeg定时存储华为摄像头视频流

ffmpeg定时存储华为摄像头视频流

作者: 一只飞 | 来源:发表于2021-07-09 10:30 被阅读0次

    1、正常MP4
    sudo ffmpeg -i "rtsp://..." -c copy -f segment -strftime 1 -segment_time 20 %Y/%m/%d/%H-%M-%S.mp4

    Could not find tag for codec pcm_mulaw in stream #1, codec not currently supported in container
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    

    问题:
    https://stackoverflow.com/questions/47495713/could-not-find-tag-for-codec-pcm-alaw-in-stream-1-codec-not-currently-supporte
    2、改为存储mkv
    sudo ffmpeg -i "rtsp://..." -c copy -f segment -strftime 1 -segment_time 20 %Y/%m/%d/%H-%M-%S.mkv
    出现视频时间累加问题:
    https://stackoverflow.com/questions/58909322/ffmpeg-copy-live-stream-limit-to-60s-file

    解决参考:https://ffmpeg.org/ffmpeg-formats.html

    image.png

    sudo ffmpeg -i "rtsp://..." -c copy -f segment -reset_timestamps 1 -strftime 1 -segment_time 20 %Y/%m/%d/%H-%M-%S.mkv

    相关文章

      网友评论

          本文标题:ffmpeg定时存储华为摄像头视频流

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