VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. The problem: I downloaded a half of mp4 file (30%, 50%, 90%) and want to see the contents - but VLC can't play "broken" (not finalized) mp4 video file/
    The question: Could anyone point me to some docs for how to finalize mp4 programmicaly? I need to understand the algorithm to create a program.
    Any help/theory/tips/info is appreciated
    Quote Quote  
  2. Problem is that mp4 files some times have their headers at the end of the file, so without knowing the specifics of the formats inside adding new headers will be tricky.

    ----
    so the general idea would probably be:
    a. extract raw streams from mp4 structure as far as it exists
    b. guess formats&co
    b. write new mp4 header
    Last edited by Selur; 1st Aug 2014 at 08:53.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. If i have another mp4 file recorded by the same camera correctly is there a way to clone the header for the broken file or get the required information somehow? For me it's a very important recording of a 3h event i gave, so there is no other option to recover it than save this file...
    Thanks!
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    The problem with MP4 videos is the way they are packaged. All 'ATOMS' are predicated on the following atoms and their byte count. If you use atomicparsley to examine an MP4 you will see below in a tree like packaging. Notice below how the 'moov' atom ends at the bytes at the end and others are subject to the intermediate atoms.

    There is a software (NOT free) that you can restore a part to see if it works that has been referenced here for MP4. It is at the site
    http://grauonline.de/cms2/. Not selling just an option that has been mentioned before.

    C:\Users\Bud\Desktop>atomicparsley C:\Users\Bud\Desktop\[dp]Manjandani-1_2.mp4 -T
    Atom ftyp @ 0 of size: 32, ends @ 32
    Atom free @ 32 of size: 8, ends @ 40
    Atom mdat @ 40 of size: 2492549, ends @ 2492589
    Atom moov @ 2492589 of size: 33405, ends @ 2525994
    Atom mvhd @ 2492597 of size: 108, ends @ 2492705
    Atom trak @ 2492705 of size: 18320, ends @ 2511025
    Atom tkhd @ 2492713 of size: 92, ends @ 2492805
    Atom edts @ 2492805 of size: 36, ends @ 2492841
    Atom elst @ 2492813 of size: 28, ends @ 2492841
    Atom mdia @ 2492841 of size: 18184, ends @ 2511025
    Atom mdhd @ 2492849 of size: 32, ends @ 2492881
    Atom hdlr @ 2492881 of size: 45, ends @ 2492926
    Atom minf @ 2492926 of size: 18099, ends @ 2511025
    Atom vmhd @ 2492934 of size: 20, ends @ 2492954
    Atom dinf @ 2492954 of size: 36, ends @ 2492990
    Atom dref @ 2492962 of size: 28, ends @ 2492990
    Atom stbl @ 2492990 of size: 18035, ends @ 2511025
    Atom stsd @ 2492998 of size: 171, ends @ 2493169
    Atom avc1 @ 2493014 of size: 155, ends @ 2493169
    Atom avcC @ 2493100 of size: 53, ends @ 2493153
    Atom pasp @ 2493153 of size: 16, ends @ 2493169
    ~
    Atom stts @ 2493169 of size: 24, ends @ 2493193
    Atom stss @ 2493193 of size: 60, ends @ 2493253
    Atom ctts @ 2493253 of size: 8824, ends @ 2502077
    Atom stsc @ 2502077 of size: 40, ends @ 2502117
    Atom stsz @ 2502117 of size: 4460, ends @ 2506577
    Atom stco @ 2506577 of size: 4448, ends @ 2511025
    Atom trak @ 2511025 of size: 14872, ends @ 2525897
    Atom tkhd @ 2511033 of size: 92, ends @ 2511125
    Atom edts @ 2511125 of size: 36, ends @ 2511161
    Atom elst @ 2511133 of size: 28, ends @ 2511161
    Atom mdia @ 2511161 of size: 14736, ends @ 2525897
    Atom mdhd @ 2511169 of size: 32, ends @ 2511201
    Atom hdlr @ 2511201 of size: 45, ends @ 2511246
    Atom minf @ 2511246 of size: 14651, ends @ 2525897
    Atom smhd @ 2511254 of size: 16, ends @ 2511270
    Atom dinf @ 2511270 of size: 36, ends @ 2511306
    Atom dref @ 2511278 of size: 28, ends @ 2511306
    Atom stbl @ 2511306 of size: 14591, ends @ 2525897
    Atom stsd @ 2511314 of size: 103, ends @ 2511417
    Atom mp4a @ 2511330 of size: 87, ends @ 2511417
    Atom esds @ 2511366 of size: 51, ends @ 2511417
    Atom stts @ 2511417 of size: 24, ends @ 2511441
    Atom stsc @ 2511441 of size: 1216, ends @ 2512657
    Atom stsz @ 2512657 of size: 8792, ends @ 2521449
    Atom stco @ 2521449 of size: 4448, ends @ 2525897
    Atom udta @ 2525897 of size: 97, ends @ 2525994
    Atom meta @ 2525905 of size: 89, ends @ 2525994
    Atom hdlr @ 2525917 of size: 33, ends @ 2525950
    Atom ilst @ 2525950 of size: 44, ends @ 2525994
    Atom ctoo @ 2525958 of size: 36, ends @ 2525994
    Atom data @ 2525966 of size: 28, ends @ 2525994

    ~ denotes an unknown atom
    ------------------------------------------------------
    Total size: 2525994 bytes; 51 atoms total. AtomicParsley version: 0.9.0 (utf16)
    Media data: 2492549 bytes; 33445 bytes all other atoms (1.324% atom overhead).
    Total free atom space: 8 bytes; 0.000% waste.
    Quote Quote  
  5. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    a - this really isn't a reply to the original post. you should have started your own thread.

    b - if this is one of those i deleted the video and then used recovery software posts, the answer is the same as always. no it's not likely the recovered video is fixable.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!