Is it possible to use ffmpeg to trim off X seconds from the beginning of a video with an unspecified length?
Posted
by
marcelebrate
on Super User
See other posts from Super User
or by marcelebrate
Published on 2011-03-15T20:42:58Z
Indexed on
2011/03/16
0:12 UTC
Read the original article
Hit count: 182
I need to trim the just the first 1 or 2 seconds off of a series of FLV recordings of varying, unspecified lengths. I've found plenty of resources for extracting a specified duration from a video (e.g. 30 second clips), but none for continuing to the end of a video.
Both of these attempts just yield a copied version of the video, sans desired trimming:
ffmpeg -ss 2 -vcodec copy -acodec copy -i input.flv output.flv
ffmpeg -ss 2 -t 120 -vcodec copy -acodec copy -i input.flv output.flv
The thought on the second one was: perhaps if I specified a length beyond what was possible, it'd just go to the end. No dice.
I know it's not an issue with codecs or using seconds instead of timecode since the following worked a charm:
ffmpeg -ss 2 -t 5 -vcodec copy -acodec copy -i input.flv output.flv
Any other ideas? I'm open to using other (Windows-based) command line tools, however am strongly favoring ffmpeg since I'm already using it for thumbnail creation and am familiar with it.
If it helps, my videos will all be under 2 minutes.
© Super User or respective owner