I have a large (~3GB) video file and I would like to trim just a few seconds at the beginning (~3s).
What would be the fastest way to do this without having to process all the video file?
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It only takes a minute to sign up.
Sign up to join this communityI have a large (~3GB) video file and I would like to trim just a few seconds at the beginning (~3s).
What would be the fastest way to do this without having to process all the video file?
Try this:
Libav can do that as well, but it is not clear what you mean by 'process'. With avconv you can remux without reencoding, so you will still read the whole file and write it again, but will use only minimal processor power to split and then recombine the streams.
The format of the command can be along the lines of:
avconv -ss 3 -i in.mkv -c:a copy -c:v copy out.mkv
The results will depend on codec, since you cannot really copy all the codecs at any arbitrary point. IIRC libav will start at the next possible point in such cases, but that maybe a full second later (or perhaps even more, even though i didn't run into such things).
If you require an "in-place edit", and cannot afford even the harddrive load that will happen due to you reading and writing large files, then you should really provide much more information about the format (as much information as you have, but at least: container, streams, codecs for each stream).
You could try using a tool like VirtualDUB, but your options will depend on the type of file that you are working with. Some files don't support arbitrary adjustment without atleast some amount of re-encoding.