How to get fragment of mp4 file? How to properly concatenate mp4 files?

James jam at tigger.ws
Wed Aug 23 11:13:44 UTC 2023



> On 23 Aug 2023, at 5:57 pm, Антон Шаров via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> Hi.
>  
> 	• Given some mp4 file, I need to retrive fragment from it. Say I’m interested  of a fragment on k second of a video file, I need to retrieve video fragment  from k-2 second to k+2 second, namely few seconds before interested event, few second after interested event. What is the best approach (pipeline) to do that?
> 	• What is the correct way to concatenate mp4 files, is it simple stream concatenation — append one file to another or there could be corner cases?

ffmpeg is your friend.
Stackoverflow has lots of examples. (google)
James 



More information about the gstreamer-devel mailing list