首页 > 解决方案 > 输出流中的非单调 DTS 0:1

问题描述

我正在使用 ffmpeg 在网络上获取视频文件。我得到了现场声音,但我得到的视频太晚了。我在接收端使用的代码是:

 ffmpeg -i rtsp://10.0.0.1:8554/test1.sdp -acodec copy -vcodec copy /home/sana/lab/mrp/test1.avi

我在发送方使用的代码是:

cvlc -vvv /home/sana/lab/video-server1/1.avi --sout '#transcode{vcodec=h264,vb=3000,scale=Auto,acodec=mp3,ab=128,channels=2,samplerate=8000}:rtp{dst=10.0.0.2,port=1234,sdp=rtsp://10.0.0.1:8554/test1.sdp}'

ffmpeg 命令输出中的错误(在接收器上)是:

 [avi @ 0x521ba80] Non-monotonous DTS in output stream 0:1; previous: 196, current: 162; changing to 197. This may result in incorrect timestamps in the output file

vlc 命令输入中的错误(在发送方)是:

    [0x7f6070000f58] x264 encoder warning: invalid DTS: PTS is less than DTS

    [0x7f608c0009b8] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 532 ms)
    [0x7f608c0009b8] main input error: ES_OUT_RESET_PCR called
    .
    .
    [mpeg4 @ 0x7f60700075a0] header damaged
    [0x7f6070000b08] avcodec generic warning: cannot decode one frame (4105 bytes)
    [mpeg4 @ 0x7f60700075a0] header damaged
    [0x7f6070000b08] avcodec generic warning: cannot decode one frame (4078 bytes

)

这实际上意味着什么,我能做些什么来防止它发生?

ffmpeg 版本是 4.0-static,vlc 版本是 VLC 媒体播放器 2.1.6 Rincewind(修订版 2.1.6-0-gea01d28),ubuntu 版本是 14.04。

标签: ffmpegvlc

解决方案


推荐阅读