Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.