Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create an audio clip from a video file using the command line, since this is in a terminal text-only Ubuntu 11.04 server system. I would like to select the starting and finishing time for the clip from the video file, something like:

create_clip video.file -from 00:10:00 -to 01:20:10 -o clip.file

Any suggestions?

share|improve this question
up vote 4 down vote accepted

See my blog post about that:

$ ffmpeg -i youtubemusicvideo.flv -vn -acodec libvorbis result.ogg

Selecting the start time can be done with option -ss hh:m:ss, and the length of the resulting clip can be configured -aframes 1234. Have a look at the ffmpeg man page for more details.

share|improve this answer
thanks, how can I define clips with start-end inside the file? – 719016 Jul 15 '11 at 10:56
If you're happy with Vorbis as the output format, you can use mp3splt afterwards to split the .ogg file at the appropriate points. – TooManyKooks Jul 15 '11 at 11:01
mp3splt result.ogg 00.10 01.20 works perfectly, thx – 719016 Jul 15 '11 at 11:44

Your Answer


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.