VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi there,
    Happy holidays and happy new year.

    How do i update existing .mp4 file using ffmpeg (or any other tool for that matter)

    I want to overwrite one minute of video from 30:09 (minsec) to 31:09 using another video of one minute.

    Is there any ways to achieve WITHOUT creating a new temporary file? Basically would like to update existing file directly to save time that it takes in creating new file and overwriting the original file.

    Thanks for your help.
    - Max.
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Any programming language with file handling capabilities will let you write into a range of bytes. Or you can use a byte editor such as HxD. The bigger problem is that your replacement must be exactly the same length in bytes, not time, because the MP4 structure is full of length references. And you have to figure out exactly where to put it, respecting such things as GOPs and timestamps.
    Quote Quote  
  3. Originally Posted by JVRaines View Post
    Any programming language with file handling capabilities will let you write into a range of bytes. Or you can use a byte editor such as HxD. The bigger problem is that your replacement must be exactly the same length in bytes, not time, because the MP4 structure is full of length references. And you have to figure out exactly where to put it, respecting such things as GOPs and timestamps.
    See why is there a need to recalculate anything? All that is needed is to put new video (ONLY) bits EXACTLY at same point where other VIDEO ONLY bits exist to avoid affecting the structure. There is no need of changing any of these header footers anywhere because we are not changing length, and we are not changing any of the quality or any such parameter which would otherwise require header/footer change. No?
    Quote Quote  
  4. Originally Posted by mxav1111 View Post
    See why is there a need to recalculate anything? All that is needed is to put new video (ONLY) bits EXACTLY at same point where other VIDEO ONLY bits exist to avoid affecting the structure. There is no need of changing any of these header footers anywhere because we are not changing length, and we are not changing any of the quality or any such parameter which would otherwise require header/footer change. No?
    Because the references might extend beyond the region you indicated. e.g. If you wanted 1min section , there might be some references before and after, so you'd actually have to include a larger segment before and after, up to the previous and next IDR frame(s) . It's a lot more difficult than it seems, and in-place editing is a lot more difficult than using temporary files. Good luck
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!