Super User is a question and answer site for computer enthusiasts and power users. 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'm pretty sure I installed all necessary packages... here's my attempt at slicing out the first 14 mins of my video.

meder@meder-desktop:/media/12dbbb01-4f96-433d-96a0-9b6c88598a51$ sudo ffmpeg -i HDV_0178.MP4 -ss 00:00:00 -t 00:14:32 out.mp4 -acodec copy
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar  4 2010 12:35:30, gcc: 4.4.3

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 59.94 (60000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'HDV_0178.MP4':
  Duration: 00:17:51.85, start: 0.000000, bitrate: 12134 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 1280x720, 59.94 tbr, 90k tbn, 180k tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16
File 'out.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'out.mp4':
    Stream #0.0(eng): Video: mpeg4, yuv420p, 1280x720, q=2-31, 200 kb/s, 90k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: 0x0000, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1

Do I need to recompile ffmpeg or is there a way I can grab the necessary audio codec?

share|improve this question
up vote 3 down vote accepted

put -acodec copy before out.mp4. citing the manpage of ffmpeg:

 As a general rule, options are applied to the next specified file. For
 example, if you give the -b 64 option, it sets the video bitrate of the
 next file. Format option may be needed for raw input files.
share|improve this answer
    
hm, my actual goal was to output in its original format and that command in my question made it an mpeg4. so now I'm specifying -vcodec copy but it keeps copying the entire video and not just the first 14 mins. tried various combos and it only copies the entire thing? sudo ffmpeg -ss 00:00:00 -t 00:14:32 -i HDV_0178.MP4 -vcodec copy -acodec copy -ss 00:00:00 -t 00:14:32 out.mp4. Am I doing something stupidly wrong? – meder omuraliev Dec 5 '10 at 21:53
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .