Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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? –  213441265152351 Jul 15 '11 at 10:56
1  
If you're happy with Vorbis as the output format, you can use mp3splt afterwards to split the .ogg file at the appropriate points. –  OrbWeaver Jul 15 '11 at 11:01
    
mp3splt result.ogg 00.10 01.20 works perfectly, thx –  213441265152351 Jul 15 '11 at 11:44
add comment

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.