[FFmpeg-user] how to fix audio/video sync issues

Rick C. rickcorteza at gmail.com
Fri Jul 8 02:23:33 CEST 2011


Hi again,

I wasn't able to figure out why I was having sync issues here (see below) but my question is what can we do to fix sync issues?  Is using -async the right way?  Any input would be great as I'm not sure what can be done when sync issue arise...

rc


ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers
 built on Jun 25 2011 14:41:44 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    51.  9. 1 / 51.  9. 1
 libavcodec   53.  7. 0 / 53.  7. 0
 libavformat  53.  4. 0 / 53.  4. 0
 libavdevice  53.  1. 1 / 53.  1. 1
 libavfilter   2. 23. 0 /  2. 23. 0
 libswscale    2.  0. 0 /  2.  0. 0
 libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 0 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/mahalko/Desktop/original video.mov':
 Metadata:
   major_brand     : qt  
   minor_version   : 537199360
   compatible_brands: qt  
   creation_time   : 2011-06-29 17:05:08
 Duration: 00:00:58.99, start: 0.132500, bitrate: 21812 kb/s
   Stream #0.0(eng): Video: h264 (Constrained Baseline), yuvj420p, 1280x720, 20279 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
   Metadata:
     creation_time   : 2011-06-29 17:05:08
   Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
   Metadata:
     creation_time   : 2011-06-29 17:05:08
Incompatible pixel format 'yuvj420p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x101300ea0] w:1280 h:720 pixfmt:yuvj420p tb:1/1000000 sar:0/1 sws_param:
[scale @ 0x1013034c0] w:1280 h:720 fmt:yuvj420p -> w:640 h:360 fmt:yuv420p flags:0x4
Output #0, ipod, to '/Users/mahalko/Desktop/original video.m4v':
 Metadata:
   major_brand     : qt  
   minor_version   : 537199360
   compatible_brands: qt  
   creation_time   : 2011-06-29 17:05:08
   encoder         : Lavf53.4.0
   Stream #0.0(eng): Video: mpeg4 (hq), yuv420p, 640x360, q=2-31, 1500 kb/s, 30k tbn, 29.97 tbc
   Metadata:
     creation_time   : 2011-06-29 17:05:08
   Stream #0.1(eng): Audio: aac, 48000 Hz, 2 channels, s16, 192 kb/s
   Metadata:
     creation_time   : 2011-06-29 17:05:08
Stream mapping:
 Stream #0.0 -> #0.0
 Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame=   29 fps=  0 q=2.2 size=     232kB time=00:00:00.96 bitrate=1965.2kbits/s    
frame=   58 fps= 58 q=3.5 size=     486kB time=00:00:01.93 bitrate=2056.0kbits/s    
frame=   85 fps= 56 q=2.7 size=     692kB time=00:00:02.83 bitrate=1998.9kbits/s    
frame=  110 fps= 55 q=3.5 size=     863kB time=00:00:03.67 bitrate=1926.4kbits/s    
frame=  137 fps= 54 q=3.5 size=    1053kB time=00:00:04.57 bitrate=1887.8kbits/s    
frame=  162 fps= 54 q=4.3 size=    1245kB time=00:00:05.40 bitrate=1886.3kbits/s    
frame=  191 fps= 54 q=3.3 size=    1418kB time=00:00:06.37 bitrate=1822.6kbits/s    
frame=  221 fps= 55 q=2.9 size=    1609kB time=00:00:07.37 bitrate=1787.1kbits/s    
frame=  250 fps= 55 q=3.4 size=    1805kB time=00:00:08.34 bitrate=1772.2kbits/s    
frame=  279 fps= 55 q=2.9 size=    1996kB time=00:00:09.30 bitrate=1756.7kbits/s    
frame=  308 fps= 55 q=2.6 size=    2175kB time=00:00:10.27 bitrate=1733.5kbits/s    
frame=  337 fps= 55 q=1.8 size=    2381kB time=00:00:11.24 bitrate=1734.7kbits/s    
frame=  366 fps= 55 q=2.4 size=    2575kB time=00:00:12.21 bitrate=1727.2kbits/s    
frame=  395 fps= 56 q=2.4 size=    2770kB time=00:00:13.17 bitrate=1721.5kbits/s    
frame=  425 fps= 56 q=2.6 size=    2976kB time=00:00:14.18 bitrate=1719.0kbits/s    
frame=  455 fps= 56 q=2.4 size=    3177kB time=00:00:15.18 bitrate=1714.2kbits/s    
frame=  475 fps= 55 q=2.4 size=    3304kB time=00:00:15.84 bitrate=1707.6kbits/s    
frame=  502 fps= 55 q=2.5 size=    3487kB time=00:00:16.75 bitrate=1705.6kbits/s    
frame=  530 fps= 55 q=2.5 size=    3691kB time=00:00:17.68 bitrate=1709.7kbits/s    
frame=  559 fps= 55 q=2.8 size=    3890kB time=00:00:18.65 bitrate=1708.3kbits/s    
frame=  587 fps= 55 q=2.9 size=    4091kB time=00:00:19.58 bitrate=1710.9kbits/s    
frame=  615 fps= 55 q=2.5 size=    4298kB time=00:00:20.52 bitrate=1716.0kbits/s    
frame=  643 fps= 55 q=2.7 size=    4492kB time=00:00:21.45 bitrate=1715.1kbits/s    
frame=  671 fps= 55 q=2.7 size=    4687kB time=00:00:22.38 bitrate=1714.9kbits/s    
frame=  700 fps= 55 q=2.9 size=    4904kB time=00:00:23.35 bitrate=1720.2kbits/s    
frame=  727 fps= 55 q=2.6 size=    5082kB time=00:00:24.25 bitrate=1716.1kbits/s    
frame=  754 fps= 55 q=2.5 size=    5254kB time=00:00:25.15 bitrate=1710.9kbits/s    
frame=  775 fps= 54 q=2.3 size=    5397kB time=00:00:25.85 bitrate=1709.7kbits/s    
frame=  803 fps= 54 q=2.6 size=    5592kB time=00:00:26.79 bitrate=1709.6kbits/s    
frame=  831 fps= 54 q=3.3 size=    5813kB time=00:00:27.72 bitrate=1717.4kbits/s    
frame=  859 fps= 54 q=2.9 size=    5993kB time=00:00:28.66 bitrate=1713.0kbits/s    
frame=  888 fps= 55 q=3.9 size=    6203kB time=00:00:29.62 bitrate=1715.1kbits/s    
frame=  918 fps= 55 q=3.5 size=    6406kB time=00:00:30.63 bitrate=1713.4kbits/s    
frame=  944 fps= 55 q=3.9 size=    6624kB time=00:00:31.49 bitrate=1722.7kbits/s    
frame=  973 fps= 55 q=2.4 size=    6809kB time=00:00:32.46 bitrate=1718.1kbits/s    
frame= 1003 fps= 55 q=2.8 size=    6991kB time=00:00:33.46 bitrate=1711.3kbits/s    
frame= 1033 fps= 55 q=2.0 size=    7194kB time=00:00:34.46 bitrate=1709.9kbits/s    
frame= 1063 fps= 55 q=2.5 size=    7374kB time=00:00:35.46 bitrate=1703.2kbits/s    
frame= 1091 fps= 55 q=2.3 size=    7553kB time=00:00:36.40 bitrate=1699.8kbits/s    
frame= 1120 fps= 55 q=2.5 size=    7762kB time=00:00:37.37 bitrate=1701.6kbits/s    
frame= 1149 fps= 55 q=2.5 size=    7954kB time=00:00:38.33 bitrate=1699.6kbits/s    
frame= 1177 fps= 55 q=1.9 size=    8156kB time=00:00:39.27 bitrate=1701.3kbits/s    
frame= 1205 fps= 55 q=2.4 size=    8338kB time=00:00:40.20 bitrate=1698.8kbits/s    
frame= 1233 fps= 55 q=2.5 size=    8528kB time=00:00:41.14 bitrate=1698.1kbits/s    
frame= 1262 fps= 55 q=2.5 size=    8736kB time=00:00:42.10 bitrate=1699.5kbits/s    
frame= 1291 fps= 55 q=2.4 size=    8926kB time=00:00:43.07 bitrate=1697.4kbits/s    
frame= 1320 fps= 55 q=2.2 size=    9114kB time=00:00:44.04 bitrate=1695.1kbits/s    
frame= 1349 fps= 55 q=2.4 size=    9319kB time=00:00:45.01 bitrate=1696.0kbits/s    
frame= 1377 fps= 55 q=2.5 size=    9509kB time=00:00:45.94 bitrate=1695.3kbits/s    
frame= 1405 fps= 55 q=1.7 size=    9718kB time=00:00:46.88 bitrate=1698.2kbits/s    
frame= 1434 fps= 55 q=3.6 size=    9931kB time=00:00:47.84 bitrate=1700.4kbits/s    
frame= 1463 fps= 55 q=2.7 size=   10127kB time=00:00:48.81 bitrate=1699.4kbits/s    
frame= 1492 fps= 55 q=2.4 size=   10327kB time=00:00:49.78 bitrate=1699.4kbits/s    
frame= 1521 fps= 55 q=2.5 size=   10519kB time=00:00:50.75 bitrate=1697.9kbits/s    
frame= 1550 fps= 55 q=2.7 size=   10722kB time=00:00:51.71 bitrate=1698.3kbits/s    
frame= 1578 fps= 55 q=2.8 size=   10914kB time=00:00:52.65 bitrate=1698.1kbits/s    
frame= 1608 fps= 56 q=2.5 size=   11113kB time=00:00:53.65 bitrate=1696.7kbits/s    
frame= 1638 fps= 56 q=2.3 size=   11315kB time=00:00:54.65 bitrate=1696.0kbits/s    
frame= 1663 fps= 55 q=2.4 size=   11484kB time=00:00:55.48 bitrate=1695.4kbits/s    
frame= 1693 fps= 55 q=2.1 size=   11694kB time=00:00:56.48 bitrate=1695.9kbits/s    
frame= 1723 fps= 55 q=2.3 size=   11896kB time=00:00:57.49 bitrate=1695.1kbits/s    
frame= 1753 fps= 55 q=1.8 size=   12114kB time=00:00:58.49 bitrate=1696.6kbits/s    
frame= 1768 fps= 55 q=2.5 Lsize=   12240kB time=00:00:58.83 bitrate=1704.1kbits/s    
video:10891kB audio:1311kB global headers:0kB muxing overhead 0.304151%


More information about the ffmpeg-user mailing list