Archive for June 5th, 2015

Extract-copying A Video Clip

The magic incantation to extract a few seconds of video from a longer clip and set the output file to use the same codecs:

avconv -ss 00:00:01 -i /mnt/video/2015-05-30/08420001.AVI -codec copy -t 5 08420001-clip.avi

The parameter order matters: the -ss must come before the -i input file name and the -t must come after it. Otherwise, avconv will copy the entire file before extracting the clip, which can be tedious.

The Fly6 camera produced a video file containing ten minutes of variations on this theme:

Fly6 - 0842001.AVI - Video compression failure

Fly6 – 0842001.AVI – Video compression failure

The top of the image looked pretty good, but then the decompression stalls and smears a single, slowly degenerating, line down the rest of the frame. The other files from that trip looked just fine.

As it turned out, extracting a few seconds with avconv or binary-copying the first few megabytes with dd produced playable copies: the original file tripped vlc’s decompression, but the source data was in the file and the copies worked.

Soooo, I could recover the video. Not that it was particularly important, but knowing how might matter some day.

Video is weird.

The Cycliq tech support folks recommend regularly formatting the MicroSD card using the Official SD Association Program (Windows-only, of course), not erasing any video files, and generally letting the camera handle the card. This whole affair seems remarkably fragile.