2

I'm thinking of extracting the "best" parts of my home video files. Why? Because my videos has a lot uninteresting footage that I don't need wasting disk space.

I thought I'd use -ss and -t to specify the part I want, and -codec copy. Example:

ffmpeg -i iphone4sFullVideo.mov -ss 00:00:10 -t 10 -codec copy iphone4sGoodPart.mp4

I have of course tested this and know this creates a new file with a length of 10 seconds that plays in vlc.

With doing this I think I am getting no loss in quality, and being able to use the mp4-video in a GUI video editor (like Adobe Premiere Elements) later. I was planning to do this with my video files from different phones and camcorders. I got .mts, .mov and .mp4.

My question is kind of advice seeking. Is what I'm thinking of stupid? Will my files be ok after copying a part to an mp4 container?

1 Answers1

1

I was hoping somebody with more expertise than I, could reply, but sadly I may be your best option at the moment!

Checking an old note, no the command you've done is not wise. Because the codecs are different for different container formats.

Use mediainfo to check the container and video and audio codec in the output file. You want (of) these for mp4.

MPEG4 
   Video codecs   x264, xvid, libavcodec, divx
   Audio codecs  aac,mp3

apparently x264 is a good one for video.

-vcodec libx264

these should be useful for acodec

-acodec libmp3lame   or  -acodec libfaac

ffmpeg documentation says- Regarding -codec copy, (and no doubt this applies to -acodec copy or -c:a copy, or -vcodec copy or -c:v copy)

"Since there is no decoding or encoding, it is very fast and there is no quality loss. However, it might not work in some cases because of many factors. Applying filters is obviously also impossible, since filters work on uncompressed data."

So you need to specify the correct video and audio codecs.

you can check them with mediainfo.exe from mediaarena.net very easy for a techie to use e.g. C:\>mediainfo a.mp4

barlop
  • 25,198