Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If just need to crop Audio/Video from a longer track, what can I use? I tried OpenShot, but I find the export video slow, perhaps its compling all the "layers" into a new movie? Perhaps I just need a simple "crop" tool for audio/video will surfice?

share|improve this question
What sort of video formats are you dealing with? Are you looking for a GUI or a CLI solution? – fossfreedom Aug 6 '11 at 11:21
Formats will be probably mp4, flv, mp3. GUI or CLI will be fine. – Jiew Meng Aug 6 '11 at 13:06

3 Answers

up vote 6 down vote accepted

Avidemux (From PPA) - http://avidemux.sourceforge.net/

OpenShot (From PPA) - https://launchpad.net/openshot/1.3/1.3.1 / http://www.openshot.org/ppa/

Pitivi (From PPA) - http://www.pitivi.org/?go=download

I was going to mention commands like ffmpeg or avconv (The new one) which can OBVIOUSLY split files into groups. For example:

FFMPEG (Deprecated in 12.04+)

ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 01:00:00 -t 00:30:00 output3.avi

Or

ffmpeg -ss 0 -t 100 -i source.m4v -vcodec copy -acodec copy part1.m4v
ffmpeg -ss 100 -t 100 -i source.m4v -vcodec copy -acodec copy part2.m4v
ffmpeg -ss 200 -t 100 -i source.m4v -vcodec copy -acodec copy part3.m4v
ffmpeg -ss 300 -t 100 -i source.m4v -vcodec copy -acodec copy part4.m4v

avconv -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 01:00:00 -t 00:30:00 output3.avi

Or

AVCONV

avconv -ss 0 -t 100 -i source.m4v -vcodec copy -acodec copy part1.m4v
avconv -ss 100 -t 100 -i source.m4v -vcodec copy -acodec copy part2.m4v
avconv -ss 200 -t 100 -i source.m4v -vcodec copy -acodec copy part3.m4v
avconv -ss 300 -t 100 -i source.m4v -vcodec copy -acodec copy part4.m4v

Or do some script like here: http://icephoenix.us/notes-for-myself/auto-splitting-video-file-in-equal-chunks-with-ffmpeg-and-python/

share|improve this answer
1  
Beware: According to the man page [ linux.die.net/man/1/ffmpeg ] this results in unnatural, overlapping cuts. For instance, the second command starts at 00:30:00 but goes on for an hour; i.e., up to 01:30:00, so the third command, which starts at 01:00:00, will yield an overlapping cut. It may be the goal, but it wouldn't be very natural. – eze Sep 24 '12 at 22:12
I can vouch for what ezequiel mentions. When doing the tests with ffmpeg or avconv the overlapping effect appears if using the times as mentioned above. I will update to a more accurate effect although I should mention that the first second will also overlap. I will fix both and add avconv to the group. Thanks ezequiel. – Luis Alvarado Sep 25 '12 at 3:00

I'm using ffmpeg CLI interface for that. It's very easy and fast:

  • to cut video:

    ffmpeg -i InputFile -vcodec copy -acodec copy -ss 00:00:00 -t 00:01:32 OutPutFile

  • to cut audio:

    ffmpeg -i InputFile -vn -acodec copy -ss 00:00:00 -t 00:01:32 OutPutFile

In both of these -ss is a start point, while -t - is a duration of the piece.

You can calculate duration e.g. using LibreOffice Calc or python's dateutil package.

share|improve this answer

you can use winff (GUI for ffmpeg) also

share|improve this answer
Can you provide more information about how to obtain and use winff? – Eliah Kagan Sep 8 '12 at 1:43
sudo apt-get install winff – vellvisher Mar 4 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.