[FFmpeg-user] understanding copy flag

Rick C. rickcorteza at gmail.com
Tue May 17 02:36:01 CEST 2011

On May 17, 2011, at 12:09 AM, Mike Scheutzow wrote:

> Rick C. wrote:
>> Hello,
>> I was making a few tests using the following syntax:
>> ffmpeg -i original.avi -acodec copy -vcodec copy output.avi
>> To my surprise the results were not very good (mainly just the audio side I believe).  Am I wrong in thinking this should work as a passthrough?  I tried the same with .mp4 and .mpg and the results were what I expected.  I didn't notice anything significant from the output log so I didn't post anything.  Any advice would be great.  Thanks!
> If you want our help, you need to be more descriptive about the problem you have. "not very good" is too vague. Did you hear clicks? Is lip-sync bad?
> Also, show us the *complete* output from 'ffmpeg -i original.avi'.

Thanks for all the replies.  Ultimately I would like to use it in a more practical way such as if original.avi had mp3 sound if I decided to convert it to output.mp4 I could use -acodec copy for example.  In my original tests I just went from same container to same container since I thought it would just copy over (and it does), but the audio issues keep popping up in .avi container for me.  And to describe the issue there is mostly no sound but it cuts in from time to time in short 1 second bursts.  I couldn't say if it's actually in sync?  Here is the full output of a test I just did on a video:

Last login: Mon May 16 12:25:54 on ttys000
mahalkos-MacBook:~ mahalko$ /Users/mahalko/Desktop/ffmpeg -i /Users/mahalko/Desktop/original.avi -acodec copy -vcodec copy /Users/mahalko/Desktop/output.avi
FFmpeg version git-N-28698-g621f4c9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Mar 30 2011 13:29:37 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86_64 --enable-runtime-cpudetect
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.116. 0 / 52.116. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
Input #0, avi, from '/Users/mahalko/Desktop/original.avi':
    artist          : the Black Eyed Peas
    date            : 2011
    title           : Just Can't Get Enough
    encoder         : Lavf52.103.0
  Duration: 00:03:55.94, start: 0.000000, bitrate: 2147 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 720x406 [PAR 1:1 DAR 360:203], 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 192 kb/s
Output #0, avi, to '/Users/mahalko/Desktop/output.avi':
    IART            : the Black Eyed Peas
    ICRD            : 2011
    INAM            : Just Can't Get Enough
    ISFT            : Lavf52.104.0
    Stream #0.0: Video: mpeg4, yuv420p, 720x406 [PAR 1:1 DAR 360:203], q=2-31, 29.97 tbn, 29.97 tbc
    Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press ctrl-c to stop encoding
frame= 2606 fps=2284 q=-1.0 size=   29154kB time=108.65 bitrate=2198.2kbits/s   frame= 3655 fps=2164 q=-1.0 size=   40965kB time=152.42 bitrate=2201.7kbits/s   frame= 4794 fps=2107 q=-1.0 size=   53747kB time=199.92 bitrate=2202.4kbits/s   frame= 5657 fps=2150 q=-1.0 Lsize=   61854kB time=235.90 bitrate=2147.9kbits/s    
video:55915kB audio:5530kB global headers:0kB muxing overhead 0.665017%
mahalkos-MacBook:~ mahalko$


More information about the ffmpeg-user mailing list