On-Board Video - Some Memorex 7-in-1 Camcorder Results

Discussion in 'Rocketry Electronics and Software' started by bguffer, Jan 25, 2009.

Help Support The Rocketry Forum by donating:

  1. Apr 27, 2010 #31

    bguffer

    bguffer

    bguffer

    Well-Known Member

    Joined:
    Jan 20, 2009
    Messages:
    378
    Likes Received:
    3
    Below are notes i recorded, so i would remember how i recovered the files. Substeps (letters) could be substituted with other approaches.

    =-=-=-=-=-=-=-=-=

    I opened a good video saved by camera, with a hex editor, and inspected file. I saw RIFF at the beginning of header. Saw AVI Index Entries in footer. Noticed AVI Index Entries appeared to point to frames which were written sequentially to the file.

    Reviewed the following file format documentation:
    http://en.wikipedia.org/wiki/Audio_Video_Interleave
    http://msdn.microsoft.com/en-us/library/ms779636(VS.85).aspx

    Luckily, the camera seems to write video files in contiguous manner, no jumping around clusters. Maybe all video cameras are like this, i don't know. Suspect the firmware on the camera is just being cheap. Possibly happened, because i had done a memory card format prior to recording, and memory was not fragmented.
    If not written in contiguous manner, would have to run throught FAT linked list, piecing movie together into a file. Maybe an entire alternative to the below approach would be to determine where in the FAT table to write a end of file marker.

    Not sure what happens with key frames.

    Step i took to recover video:
    1) Write protect memory card.
    2) Make an imagefile of the memory card
    2a) Boot Linux Live cd.
    2b) Open a terminal.
    2c) sudo -i (to run as root i think)
    2d) fdisk -l to determine where the memory card is at
    2e) Open file browser, and browse to directoy on your hard drive.
    2f) Type 'cd ', then drag and drop the folder from the file browser into the browser, hit <Enter> (run terminal from a directory on the hard drive).
    2g) dd if=/dev/mmcblk1p1 of=memory_card.img bs=1024 (/dev/mmcblk1p1 was identified when doing the fdisk -l command).
    2h) Shut down computer, eject Linux Live cd.
    2i) Boot Windows.

    3) Extract video data from imagefile
    3a) Start HxD (http://download.cnet.com/HxD-Hex-Editor/3000-2352_4-10891068.html).
    3b) Select Extras->Open Disk Image.
    3c) Select the memory_card.img file saved to hard drive.
    3d) Search for RIFF (case sensitive search) (if you only have 1 RIFF you know you have the right file) I think will have to be last RIFF, since you did not save anything after the write fail, and we assume contiguous sector/cluster writes.
    3e) Delete all data prior to RIFF.
    3f) Locate where trailing 0's begin.
    3g) Delete trailing 0's. (Note it is unlikely you will see any of the trailing AVI Index Entries, since it is assummed they are maintained in ram until the video is ready to be finalized by the camcorder. Since the camcorder was interrupted while recording, the camcorder will likely never have any chance to write out any of the AVI Index Entries).

    VLC should now play the video (fast forward will kinda work, but skip will not).

    4) Fix the video file so that the trailing AVI Index Entries are appended to the file. I believe this step is what will allow players to be able to skip ahead correctly.
    4a) Run DivFix++ (http://divfixpp.sourceforge.net/usage.php), Power Director would not read a rescued video file, until after i ran DivFix++ on it.

    Notes:
    I suspect it is smart to do a format prior to recording the on board video. If long format is required to have trailing zero's, do the long format.
    Prior to all these steps i selecting the memory card from Windows Explorer, and then selecting Properties, displayed a dialog which stated that 1.2 gigs of my memory card were in use, but no files showed up on the memory card.
     
  2. Apr 28, 2010 #32

    billspad

    billspad

    billspad

    Well-Known Member

    Joined:
    Jan 18, 2009
    Messages:
    2,625
    Likes Received:
    1


    Thanks. I suspect my building skills might have an edge over my file manipulating skills and that the rocket will get rebuilt and flown first but I'll probably give it a try.
     

Share This Page