Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

When I run this ffmpeg -i video.mp4 -codec copy video.avi I get a broken audio: a crackling like a stuck LP. The input-audio is aac

When I re-encode the audio like this ffmpeg -i video.mp4 -codec:v:0 copy video.avi the audio in the out-file works.

What could be the reason for the problems, when copying the audio?

share|improve this question
ffmpeg is a bit counter-intuitive with it's args. I think that you should have the -codec copy before the -i ... in general, parameters relating to a file must appear before the -i file, but does it mean copy from or copy to... -codec copy should apply to both streams, but if it doesn't work by moving the args, try encoding options for each stream -acodec copy -vcodec copy, or just -acodec copy on its own and see if that works... Mabe there is something wrong with that particular stream(?)... Try it on another similar video and see if you get the same issue recurring ... – Peter.O Jun 12 '12 at 8:25
Copying only the audio works: ffmpeg -i video.mp4 -acodec copy sound.aac – sid_com Jun 21 '12 at 13:15
Have you tried ffmpeg -i video.mp4 -acodec copy -vcodec copy video.avi, as @Peter.O suggested? – Residuum Jun 21 '12 at 15:11
AAC and AVI don't mix well -- it's a unsupported combination – sendmoreinfo May 7 '13 at 18:10

Your Answer


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

Browse other questions tagged or ask your own question.