[FFmpeg-user] How to reassemble raw packet data back into a new MP4 file?

Vincent Deconinck vdeconinck at gmail.com
Sat Sep 21 19:09:06 EEST 2024


>
> In that case, what are some video editor software does with the videos?
> They can cut some frames from the original video and create a new MP4 file.
> Are these software just decode and uncompress everything, then remove some
> frames, then re-encode and re-compress the remaining video?
>

That clearly is a XY problem - https://en.wikipedia.org/wiki/XY_problem :-)
Of course ffmpeg can trim without reencoding. Basically using "-c copy"
does the trick but you might want to read more documentation to specify
e.g. which tracks will end-up in the output file.
And you can use -t (or -to) to drop the end of the file.

Vincent


More information about the ffmpeg-user mailing list