Solved! re-write certain part of .mp4 file using ffmpeg

Dec 24, 2018
3
0
10
Hello There,
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 (mins:sec) 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.

Appreciate your help.
 
Solution
Any current video editor can do this.

Video A
1 minute slice of Video B

Split Video A at the point where you want the 1 minute slice to begin.
Trim the needed time from it
Add in the Video B 1 minute time slice.
Render.

No matter what tool you use, at some point there is going to be a "temporary". Whether it be in RAM, or actually writing a file.

TerryLaze

Commendable
May 9, 2016
116
0
1,710
No you will have to cut this one minute out of the existing file,no need to re code so it should only take as long as it takes to copy this amount of data,and then join the new minute to this new file.

You could do this with a linux command that is available on windows and is called DD
but you should be aware that messing this up will break your video(and possibly your whole system if you mess up big enough) and it is super easy to mess this up.
https://unix.stackexchange.com/questions/146922/is-dd-able-to-overwrite-parts-of-a-file
 
Dec 24, 2018
3
0
10


Thanks. But now a days backups are so common with snapshot and everything around. I am fine with experimenting. In regular files, we use to program to "seek " to specific position in file (In this case seek is time based), then read one minute full file in buffer and come back to this file to overwrite at above position and close the file. Something should be possible. Thanks again for your time.


 

USAFRet

Illustrious
Moderator
Any current video editor can do this.

Video A
1 minute slice of Video B

Split Video A at the point where you want the 1 minute slice to begin.
Trim the needed time from it
Add in the Video B 1 minute time slice.
Render.

No matter what tool you use, at some point there is going to be a "temporary". Whether it be in RAM, or actually writing a file.
 
Solution
Dec 24, 2018
3
0
10


Thanks. Yes in RAM it should be fine.. I mean writing GBs of file for a need to rewrite less then 100mb doesn't seem logical.
Please can you advise doing this using command line?
 

USAFRet

Illustrious
Moderator


Commandline? I'd have to do a lot of investigation and experimentation.

Personally, I'd just use a video editor like Hitfilm Express.
https://fxhome.com/express
Free and easy.
 

TRENDING THREADS