我正在使用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。