Uncategorized

Cutting bits from avi-file with ffmpeg/mencoder

I wanted to cut out two bits from an avi-file and then join them to
get one small file from a large file. I thought using ffmpeg would be
easy for this, but it turns out it might have a but with avi/wmv so I
ended up using mencoder instead.

The original try I did with ffmpeg was:
ffmpeg –ss 00:05:52 -t 00:00:11 -i bigfile.avi small_clip.avi
It looks like it wants to do what I want, since it makes a file where
the first 11 seconds are the ones I want, but then the sound
disappears and all of the rest of bigfile.avi is there (the video at
least).

I could not find any solution for this on the interwebs, so I ended up
trying mencoder which worked:
mencoder -oac copy -ovc copy -ss 00:05:52 -endPos 00:00:11 bigfile.avi
-o small_clip.avi
¨
I repeated the above for all the clips from bigfile.avi and then put
them together:
mencoder -oac copy -ovs copy -idx -o joined_clip.avi small_clip1.avi
small_clip2.avi and so on

Leave a Reply

Your email address will not be published. Required fields are marked *