Dohiker Trail Cam Produces Broken AVI (but there’s foxes!)

FoxCam not fully operational

Over the last few weeks a family of foxes has been visiting my garden.

Awwww. Ahhhh. They are very cute, but I’m not terribly keen on them making it their permanent home.

A friend kindly lent me their Dohiker trail camera. You can see example output above (or here if embeds are disabled). I was interested to see what exactly they were doing in the garden- I’ve seen them running around and playing with one another, but was curious to see more.

Unfortunately of the ~90 videos recorded overnight only a handful seem to have recorded properly. The one above has 20 seconds of video and audio, which matches what I set the camera to. Some are like that, others are much shorter- as short as ~2s in one case. The vast majority have no video at all, though they still have audio.

Attempting to play the broken videos in VLC gives repeated “dqt: 0 quant value” errors in the mjepg decoder. The top hit for that type of error points to an ffmpeg-cvslog entry, and a reverseengineering post about a YPC99 endoscope camera.

ffmpeg isn’t keen on it either:

ffprobe /tmp/sd/DCIM/100MEDIA/IMAG0060.AVI
[avi @ 0x55ef3140a440] non-interleaved AVI
[mjpeg @ 0x55ef3140c100] dqt: 0 quant value
    Last message repeated 83 times
[avi @ 0x55ef3140a440] decoding for stream 0 failed
[avi @ 0x55ef3140a440] Could not find codec parameters for stream 0
(Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 1280x720, 11023 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, avi, from '/tmp/sd/DCIM/100MEDIA/IMAG0060.AVI':
  Duration: 00:00:02.97, start: 0.000000, bitrate: 11208 kb/s
  Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D),
none(bt470bg/unknown/unknown), 1280x720, 11023 kb/s, 30.28 fps, 30.28 tbr, 30.28 tbn, 30.28 tbc
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 11025 Hz, 1 channels, s16, 176 kb/s
ffmpeg -i /tmp/sd/DCIM/100MEDIA/IMAG0060.AVI -c h264 -c:a aac -crf 21 /tmp/trailcam.mkv
[avi @ 0x5595e2eb6d40] non-interleaved AVI
[mjpeg @ 0x5595e2eb8980] dqt: 0 quant value
    Last message repeated 83 times
[avi @ 0x5595e2eb6d40] decoding for stream 0 failed
[avi @ 0x5595e2eb6d40] Could not find codec parameters for stream 0
(Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown),1280x720, 11023 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from '/tmp/sd/DCIM/100MEDIA/IMAG0060.AVI':
  Duration: 00:00:02.97, start: 0.000000, bitrate: 11208 kb/s
  Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D),
none(bt470bg/unknown/unknown), 1280x720, 11023 kb/s, 30.28 fps, 30.28 tbr, 30.28 tbn, 30.28 tbc
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 11025 Hz, mono, s16, 176 kb/s
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 1, only the last option '-c:a aac' will be used.
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[mjpeg @ 0x5595e2ebda40] dqt: 0 quant value
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x5595e2ef9240] Too many bits 6408.707483 > 6144 per frame
requested, clamping to max
[mjpeg @ 0x5595e2ebda40] dqt: 0 quant value
Error while decoding stream #0:0: Invalid data found when processing input
(... repeated ...)
Error while decoding stream #0:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
[aac @ 0x5595e2ef9240] Qavg: 662.734
[aac @ 0x5595e2ef9240] 2 frames left in the queue on closing
Conversion failed!

Strangely, the video files at the start and end of the overnight session seem alright, and there’s a couple in the middle which have a few seconds of video; but otherwise most are unusable.

I’ve posted on the ffmpeg-user mailing list wondering if there’s any chance of recovery, but I suspect they were produced broken for some reason.

One thought on “Dohiker Trail Cam Produces Broken AVI (but there’s foxes!)”

Tell us what's on your mind