ffmpeg trimming video
Posted
by
Dori
on Super User
See other posts from Super User
or by Dori
Published on 2011-06-28T14:01:55Z
Indexed on
2012/11/26
5:08 UTC
Read the original article
Hit count: 440
ffmpeg
I am having a problem using ffmpeg which is driving me a little mad, so I hope someone can help me out.
I have a 13 MPEG-4 .mp4 video of which I am attempting to trim the first two seconds off using ffmpeg and display in an Android app.
From the numerous tuts online i am excecuting the following on the command line
ffmpeg -i untrimmed_video.mp4 -vcodec copy -ss 2 trimmed_video.mp4
with no luck as it outputs a video of 4-seconds length (i have no idea where its getting 4 from), if i change this to 3 i still get a 4 second video, if i set it to 10 i get unplayable output.
if i move the -ss arg to
ffmpeg -vcodec copy -i untrimmed_video.mp4 -ss 2 trimmed_video.mp4
i get output the same length as the input, same as if i move to the end.
I have tried lots of variations as orders and nothing seems to work, is this a bug, am i doing something wrong?!
please help!!!
© Super User or respective owner