[FFmpeg-user] Possible cause of corrupted data from network camera?

Jonathan Viney jonathan.viney at gmail.com
Mon Aug 10 05:27:26 CEST 2015


(Apologies for the previous partial message).

Hi,

I'm capturing 1080p video from an Axis M3006-V camera and have had
intermittent issues with what looks like data loss or corruption.

I am wondering if anyone on this list can tell me if this is more
likely due to camera or network problems.

The capture command is:

ffmpeg -rtsp_transport tcp -stimeout 10000000 -i
rtsp://10.9.9.1:554/axis-media/media.amp -c copy -bsf:v dump_extra -y
out.ts

Here is the output of ffprobe around a corrupted piece of video:

packet|codec_type=video|stream_index=0|pts=257891|pts_time=2.865456|dts=257891|dts_time=2.865456|duration=2998|duration_time=0.033311|convergence_duration=N/A|convergence_duration_time=N/A|size=41088|pos=3748400|flags=_
packet|codec_type=video|stream_index=0|pts=260889|pts_time=2.898767|dts=260889|dts_time=2.898767|duration=2998|duration_time=0.033311|convergence_duration=N/A|convergence_duration_time=N/A|size=41589|pos=3789488|flags=_
packet|codec_type=video|stream_index=0|pts=263887|pts_time=2.932078|dts=263887|dts_time=2.932078|duration=3000|duration_time=0.033333|convergence_duration=N/A|convergence_duration_time=N/A|size=41464|pos=3831077|flags=_
packet|codec_type=video|stream_index=0|pts=266887|pts_time=2.965411|dts=266887|dts_time=2.965411|duration=2998|duration_time=0.033311|convergence_duration=N/A|convergence_duration_time=N/A|size=247168|pos=3872541|flags=K
packet|codec_type=video|stream_index=0|pts=269885|pts_time=2.998722|dts=269885|dts_time=2.998722|duration=11996|duration_time=0.133289|convergence_duration=N/A|convergence_duration_time=N/A|size=22618|pos=4119709|flags=_
packet|codec_type=video|stream_index=0|pts=281881|pts_time=3.132011|dts=281881|dts_time=3.132011|duration=1|duration_time=0.000011|convergence_duration=N/A|convergence_duration_time=N/A|size=52050|pos=4142327|flags=K
packet|codec_type=video|stream_index=0|pts=281882|pts_time=3.132022|dts=281882|dts_time=3.132022|duration=1|duration_time=0.000011|convergence_duration=N/A|convergence_duration_time=N/A|size=43429|pos=4194377|flags=_
packet|codec_type=video|stream_index=0|pts=281883|pts_time=3.132033|dts=281883|dts_time=3.132033|duration=1|duration_time=0.000011|convergence_duration=N/A|convergence_duration_time=N/A|size=44193|pos=4237806|flags=_
packet|codec_type=video|stream_index=0|pts=281884|pts_time=3.132044|dts=281884|dts_time=3.132044|duration=2994|duration_time=0.033267|convergence_duration=N/A|convergence_duration_time=N/A|size=43883|pos=4281999|flags=_
packet|codec_type=video|stream_index=0|pts=284878|pts_time=3.165311|dts=284878|dts_time=3.165311|duration=2999|duration_time=0.033322|convergence_duration=N/A|convergence_duration_time=N/A|size=43643|pos=4325882|flags=_
packet|codec_type=video|stream_index=0|pts=287877|pts_time=3.198633|dts=287877|dts_time=3.198633|duration=3000|duration_time=0.033333|convergence_duration=N/A|convergence_duration_time=N/A|size=43588|pos=4369525|flags=_
packet|codec_type=video|stream_index=0|pts=290877|pts_time=3.231967|dts=290877|dts_time=3.231967|duration=2999|duration_time=0.033322|convergence_duration=N/A|convergence_duration_time=N/A|size=43355|pos=4413113|flags=_

You can see the packets with dts 281881, 281882, and 281883 have a
dts_time that is essentially the same. The duration_time is also tiny.
281881 is also marked as a keyframe, but it's size is much less than a
normal keyframe (50kb vs 250kb)

The FFmpeg version is somewhat out of date, I've just updated to 2.7.2:

ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 11 2015 17:53:45 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg
--enable-avresample --disable-debug --enable-nonfree --enable-gpl
--enable-version3 --enable-libpulse --enable-libopencore-amrnb
--enable-libopencore-amrwb --disable-decoder=amrnb
--disable-decoder=amrwb --enable-libx264 --enable-libx265
--enable-libfdk-aac --enable-libvorbis --enable-libmp3lame
--enable-libopus --enable-libvpx --enable-libspeex --enable-libass
--enable-avisynth --enable-libsoxr --enable-libxvid
--enable-libvo-aacenc --enable-libvidstab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile
options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'


Is anyone is able to shed some light on the possible cause of the data
loss or corruption?

Thanks in advance,
-Jonathan.


More information about the ffmpeg-user mailing list