Submitted by jeff on
I recent used gtk-recordmydesktop to record a short video to explain to one of our clients how to do something complicated in the Drupal CMS. ("A picture's worth a 1000 words...", and all that.)
Unfortunately when I viewed it, I saw that the video and audio were out of sync. About 4 seconds - just enough to be really annoying and make it impossible to follow along.
The file I recorded is "out.ogg" and "ffmpeg -i out.ogg" shows that it's "off"
Input #0, ogg, from 'out.ogg':
Duration: 00:04:47.3, start: 4.266667, bitrate: 725 kb/s
Stream #0.0: Video: theora, yuv420p, 960x576, 15.00 fps(r)
Stream #0.1: Audio: vorbis, 16000 Hz, mono, 99 kb/s
I have no idea what that "start: 4.266667" means or how I got it, but that's pretty much exactly how far behind the audio is from the video all the way through.
So I was looking at going back and deleting everything I had done, recording the video again, and hoping that it would be in sync this time, when I decided that I should google this on the off-chance that someone already knew how to fix it. Sure enough, google turned up this fabulous page. Thank you Howard Pritchett. I owe you one!
It turns out ffmpeg has a switch for doing exactly this: "-itsoffset". Here's the full command to fix my file (and turn it into a flash movie).
ffmpeg -i out.ogg -itsoffset 4.267 -i out.ogg -map 1:0 -map 0:1 -ar 22050 video.flv
A couple of things to notice.
ffmpeg -i out.ogg -itsoffset 4.267 -i out.ogg -map 1:0 -map 0:1 -ar 22050 video.flv
First we have to specify the same input file twice; we're going to use one "copy" for the audio and one for video. We have to list it twice here because we're asking ffmpeg to delay only one part of the entire file, the video stream. We want the audio stream to run normally. The "-itsoffset" switch applies to the input which come AFTER it. So "-itsoffset 4.267" tells ffmpeg to "delay" processing the second input file by 4.267 seconds.
Then we need to tell ffmpeg how to recombine these streams - audio and video - back into one file. That's the "-map" switch.
Remember what our "ffmpeg -i out.ogg" command showed us about the streams in the file:
Stream #0.0: Video: theora, yuv420p, 960x576, 15.00 fps(r)
Stream #0.1: Audio: vorbis, 16000 Hz, mono, 99 kb/s
That's the video and audio streams in this file. If I list the same file twice, you'll see we get a second input:
$ffmpeg -i out.ogg -i out.ogg
Input #0, ogg, from 'out.ogg':
Stream #0.0: Video: theora, yuv420p, 960x576, 15.00 fps(r)
Stream #0.1: Audio: vorbis, 16000 Hz, mono, 99 kb/s
...
Input #1, ogg, from 'out.ogg':
Stream #1.0: Video: theora, yuv420p, 960x576, 15.00 fps(r)
Stream #1.1: Audio: vorbis, 16000 Hz, mono, 99 kb/s
The stream numbering system is INPUT_FILE.STREAM. Ffmpeg starts numbering from 0, so the first stream in the first input file (0.0) is the video, and the second stream in the first input file (0.1) is the audio. The second input file has the same two streams in the same order, of course, but they are listed as 1.0 and 1.1 since they come from the second input file.
So we want ffmpeg to take the first input file as the audio, and the second as the video, since we need to delay the video and we've applied the delay to the second input file. The "-map" switches should be listed in the order you want the streams to appear in the output file. Since I know that a flash movie has two streams, video first, then audio, (which you can see using "ffmpeg -i movie.flv"), the first map switch specifies the video, and the second specifies the audio.
ffmpeg -i out.ogg -itsoffset 4.267 -i out.ogg -map 1:0 -map 0:1 -ar 22050 video.flv
Here "-map 1:0" tells ffmpeg to use the second input file (1) and take its first stream (0) as the video source. Since that's the input that follows the "-itsoffset" switch, that's the stream that will be delayed. Then "-map 0.1" tells it to use the second stream from the first input as the audio. Since there's no offset applied to the first input file, it will be processed normally. (Finally we change the audio sample rate to something suitable for a flash movie and output a file called "video.flv". Ffmpeg will see the ".flv" and apply the proper codecs for the audio and video to make a ".flv" file.)
Sure enough, it works beautifully. The video and audio are now in sync, and I have a nice flash movie to upload to our website where I can direct the client to watch it.
Check out the full web page at http://howto-pages.org/ffmpeg/ for all sorts of other wonderful things that you can do with ffmpeg.
Comments
Anonymous replied on Permalink
Good time offset explanation.
Good time offset explanation. I struggled to figure out what was necessary for a two pass encoding. I finally realized that I was sending the output to /dev/null in the first pass so I only needed one '-map' in that argument string.
Anonymous replied on Permalink
Time offset with `ffmpeg -async 1`: an other (new?) way:
This is a good explanation of the double input and map options of ffmpeg. Specially for different input streams.
The major problem for most users will be finding the needed offset. The 'clap-board' is removed from most videos so the offset will be hard to find, it needs some experiments.
Fortunately, ffmpeg is on its way: It now has the option '-async' which tries to keep the audio and video in sync. The special case '-async 1' only does the sync once: at the beginning of the stream. No need to use the input twice, no need to calculate the offset. Specially handsome while converting video streams like dvb-recordings and such.
jeff replied on Permalink
-async 1 is great
You're absolutely right. "-async 1" is usually all you need to fix these sorts of issues, as I have since discovered.
When I had this issue, however, I was running Ubuntu Hardy (I think) and unfortunately there was a bug in the version of ffmpeg included with that distro which caused a segfault when you used "-async 1". So I still ended up using "-itsoffset" when I needed to fix these sorts of problems.
Anonymous replied on Permalink
Hi. here my file (example)
Hi. here my file (example) https://www.wuala.com/Telesilleo_Pra...y=1JGwka230Fbj I have a file WAV (= WMA) I reencode it in a AC3 file, ok. + video VC-1 I use: 1) mkvmergegui (> MKV) or 2) Tsmuxergui (> M2TS or AVCHD). ok the output is playable but not in sync. I set the audio delay (+1000ms) => at the beginning of the video it is in sync, but near the end not perfectly in sync. how to do to get the full video in sync? I am wrong with this process? now... I have installed ffmpeg from here http://ffmpeg.zeranoe.com/builds/win32/ ... -static.7z I add your code ffmpeg -i "SmthAudio.wav" -i "SmthVideo.vc1" -vcodec copy -acodec copy "output.mkv" here the log: Code: c:\ffmpeg\bin>ffmpeg -i "SmthAudio.wav" -i "SmthVideo.vc1" -vcodec copy -acodec copy "output.mkv" ffmpeg version N-31774-g6c4e9ca, Copyright (c) 2000-2011 the FFmpeg developers built on Aug 6 2011 22:22:11 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable- runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm -- enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl e-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 51. 11. 1 / 51. 11. 1 libavcodec 53. 9. 1 / 53. 9. 1 libavformat 53. 6. 0 / 53. 6. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 28. 0 / 2. 28. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 [wav @ 00319FC0] max_analyze_duration 5000000 reached at 5120000 [wav @ 00319FC0] Estimating duration from bitrate, this may be inaccurate Input #0, wav, from 'SmthAudio.wav': Duration: 00:04:23.85, bitrate: 192 kb/s Stream #0.0: Audio: wmav2, 48000 Hz, 2 channels, s16, 192 kb/s [vc1 @ 00312B20] max_analyze_duration 5000000 reached at 5000000 [vc1 @ 00312B20] Estimating duration from bitrate, this may be inaccurate Input #1, vc1, from 'SmthVideo.vc1': Duration: N/A, bitrate: N/A Stream #1.0: Video: vc1 (Advanced), yuv420p, 720x404, 25 fps, 25 tbr, 1200k tbn, 25 tbc Output #0, matroska, to 'output.mkv': Metadata: encoder : Lavf53.6.0 Stream #0.0: Video: WVC1 / 0x31435657, yuv420p, 720x404, q=2-31, 1k tbn, 120 0k tbc Stream #0.1: Audio: wmav2, 48000 Hz, 2 channels, 192 kb/s Stream mapping: Stream #1.0 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop, [?] for help frame= 3492 fps= 0 q=-1.0 size= 30338kB time=00:02:19.60 bitrate=1780.2kbits/ frame= 5523 fps=5517 q=-1.0 size= 48104kB time=00:03:40.84 bitrate=1784.4kbits frame= 6600 fps=4269 q=-1.0 Lsize= 57640kB time=00:04:23.85 bitrate=1789.6kbit s/s video:51403kB audio:6184kB global headers:0kB muxing overhead 0.092362% c:\ffmpeg\bin> here the effects: https://www.wuala.com/Kaibelian_Doch...y=ME6WNIQDqtWB bad playback with VLC, better with MPC-HC but the async is still here (overhead? video:51403kB audio:6184kB) and the bitrate is halfed (700 instead of 1400Kbps).....see please the source on my first post. I'd be very gratefull if you may want suggest how to resolve this issue (for example a code that may force the sync...no idea). thanks a lot! best regards PS: I used -async 41000 => I go muxing overhead 1%, I tried 48000 too...
Anonymous replied on Permalink
Hi. here my file
Hi.
here my file (example)
https://www.wuala.com/Telesilleo_PraxilleoII/Video/?key=1JGwka230Fbj
I have a file WAV (= WMA) I reencode it in a AC3 file, ok.
+
video VC-1
I use:
1) mkvmergegui (> MKV)
or
2) Tsmuxergui (> M2TS or AVCHD).
ok the output is playable but not in sync.
I set the audio delay (+1000ms) => at the beginning of the video it is in sync, but near the end not perfectly in sync.
how to do to get the full video in sync?
I am wrong with this process?
then,,,,
I have installed ffmpeg from here
http://ffmpeg.zeranoe.com/builds/win32/ ... -static.7z
I add your code
ffmpeg -i "SmthAudio.wav" -i "SmthVideo.vc1" -vcodec copy -acodec copy "output.mkv"
here the log:
Code:
c:\ffmpeg\bin>ffmpeg -i "SmthAudio.wav" -i "SmthVideo.vc1" -vcodec copy -acodec
copy "output.mkv"
ffmpeg version N-31774-g6c4e9ca, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 6 2011 22:22:11 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 9. 1 / 53. 9. 1
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 28. 0 / 2. 28. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[wav @ 00319FC0] max_analyze_duration 5000000 reached at 5120000
[wav @ 00319FC0] Estimating duration from bitrate, this may be inaccurate
Input #0, wav, from 'SmthAudio.wav':
Duration: 00:04:23.85, bitrate: 192 kb/s
Stream #0.0: Audio: wmav2, 48000 Hz, 2 channels, s16, 192 kb/s
[vc1 @ 00312B20] max_analyze_duration 5000000 reached at 5000000
[vc1 @ 00312B20] Estimating duration from bitrate, this may be inaccurate
Input #1, vc1, from 'SmthVideo.vc1':
Duration: N/A, bitrate: N/A
Stream #1.0: Video: vc1 (Advanced), yuv420p, 720x404, 25 fps, 25 tbr, 1200k
tbn, 25 tbc
Output #0, matroska, to 'output.mkv':
Metadata:
encoder : Lavf53.6.0
Stream #0.0: Video: WVC1 / 0x31435657, yuv420p, 720x404, q=2-31, 1k tbn, 120
0k tbc
Stream #0.1: Audio: wmav2, 48000 Hz, 2 channels, 192 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop, [?] for help
frame= 3492 fps= 0 q=-1.0 size= 30338kB time=00:02:19.60 bitrate=1780.2kbits/
frame= 5523 fps=5517 q=-1.0 size= 48104kB time=00:03:40.84 bitrate=1784.4kbits
frame= 6600 fps=4269 q=-1.0 Lsize= 57640kB time=00:04:23.85 bitrate=1789.6kbit
s/s
video:51403kB audio:6184kB global headers:0kB muxing overhead 0.092362%
c:\ffmpeg\bin>
here the effects:
https://www.wuala.com/Kaibelian_Dochmiac/Video/?key=ME6WNIQDqtWB
bad playback with VLC, better with MPC-HC
but the async is still here (overhead? video:51403kB audio:6184kB)
and the bitrate is halfed (700 instead of 1400Kbps).....see please the source on my first post.
I'd be very gratefull if you may want suggest how to resolve this issue (for example a code that may force the sync...no idea). thanks a lot!
best regards
at the moment it seems that I should use TSMuxer and set the audio delay manually: better sync and the bitrate as the source...
I did not know that this process was so hard.
then,,,,,
if I use this code I go:
c:\ffmpeg\bin>ffmpeg -i SmthAudio.wav -acodec ac3 -ac2 -ab 192k -f ac3 SmthAudio
.ac3 -async 1
ffmpeg version N-31774-g6c4e9ca, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 6 2011 22:22:11 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 9. 1 / 53. 9. 1
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 28. 0 / 2. 28. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[wav @ 0033A000] max_analyze_duration 5000000 reached at 5120000
[wav @ 0033A000] Estimating duration from bitrate, this may be inaccurate
Input #0, wav, from 'SmthAudio.wav':
Duration: 00:04:23.85, bitrate: 192 kb/s
Stream #0.0: Audio: wmav2, 48000 Hz, 2 channels, s16, 192 kb/s
Unrecognized option 'ac2'
ffmpeg: failed to set value '-ab' for option 'ac2'
no output.
3) then I used ICoolsoft: wav > ac3. ok.
4) here the output still async (overhead?):
c:\ffmpeg\bin>ffmpeg -i smthaudio.ac3 -itsoffset 1.120 -i smthvideo.vc1 outpitof
fset.mkv
ffmpeg version N-31774-g6c4e9ca, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 6 2011 22:22:11 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 9. 1 / 53. 9. 1
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 28. 0 / 2. 28. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[ac3 @ 01D49F80] max_analyze_duration 5000000 reached at 5024000
[ac3 @ 01D49F80] Estimating duration from bitrate, this may be inaccurate
Input #0, ac3, from 'smthaudio.ac3':
Duration: 00:04:24.03, start: 0.000000, bitrate: 192 kb/s
Stream #0.0: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[vc1 @ 031B3E60] max_analyze_duration 5000000 reached at 5000000
[vc1 @ 031B3E60] Estimating duration from bitrate, this may be inaccurate
Input #1, vc1, from 'smthvideo.vc1':
Duration: N/A, bitrate: N/A
Stream #1.0: Video: vc1 (Advanced), yuv420p, 720x404, 25 fps, 25 tbr, 1200k
tbn, 25 tbc
[buffer @ 042BEF60] w:720 h:404 pixfmt:yuv420p tb:1/1000000 sar:0/0 sws_param:
[mpeg4 @ 03168AE0] removing common factors from framerate
Output #0, matroska, to 'outpitoffset.mkv':
Metadata:
encoder : Lavf53.6.0
Stream #0.0: Video: mpeg4, yuv420p, 720x404 [SAR 1:1 DAR 180:101], q=2-31, 2
00 kb/s, 1k tbn, 25 tbc
Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop, [?] for help
frame= 95 fps= 0 q=15.2 size= 237kB time=00:00:04.92 bitrate= 394.4kbits/
frame= 183 fps=182 q=27.4 size= 423kB time=00:00:08.44 bitrate= 410.2kbits/
frame= 270 fps=179 q=31.0 size= 611kB time=00:00:11.92 bitrate= 419.9kbits/
frame= 357 fps=178 q=31.0 size= 784kB time=00:00:15.44 bitrate= 416.2kbits/
frame= 454 fps=181 q=31.0 size= 999kB time=00:00:19.29 bitrate= 424.0kbits/
frame= 546 fps=181 q=31.0 size= 1204kB time=00:00:22.96 bitrate= 429.4kbits/
frame= 632 fps=180 q=31.0 size= 1364kB time=00:00:26.40 bitrate= 423.2kbits/
frame= 727 fps=181 q=31.0 size= 1553kB time=00:00:30.24 bitrate= 420.7kbits/
frame= 822 fps=182 q=31.0 size= 1733kB time=00:00:34.00 bitrate= 417.4kbits/
frame= 914 fps=182 q=31.0 size= 1942kB time=00:00:37.68 bitrate= 422.2kbits/
frame= 1010 fps=183 q=31.0 size= 2150kB time=00:00:41.52 bitrate= 424.2kbits/
frame= 1104 fps=183 q=31.0 size= 2316kB time=00:00:45.31 bitrate= 418.8kbits/
frame= 1195 fps=183 q=31.0 size= 2521kB time=00:00:48.96 bitrate= 421.7kbits/
frame= 1286 fps=183 q=31.0 size= 2704kB time=00:00:52.56 bitrate= 421.4kbits/
frame= 1389 fps=184 q=31.0 size= 2889kB time=00:00:56.68 bitrate= 417.5kbits/
frame= 1480 fps=184 q=31.0 size= 3105kB time=00:01:00.33 bitrate= 421.5kbits/
frame= 1578 fps=185 q=31.0 size= 3306kB time=00:01:04.24 bitrate= 421.5kbits/
frame= 1676 fps=186 q=31.0 size= 3500kB time=00:01:08.16 bitrate= 420.6kbits/
frame= 1776 fps=186 q=31.0 size= 3701kB time=00:01:12.20 bitrate= 419.9kbits/
frame= 1878 fps=187 q=31.0 size= 3925kB time=00:01:16.24 bitrate= 421.7kbits/
frame= 1976 fps=188 q=31.0 size= 4128kB time=00:01:20.16 bitrate= 421.9kbits/
frame= 2075 fps=188 q=31.0 size= 4327kB time=00:01:24.12 bitrate= 421.4kbits/
frame= 2175 fps=189 q=31.0 size= 4558kB time=00:01:28.12 bitrate= 423.7kbits/
frame= 2275 fps=189 q=31.0 size= 4739kB time=00:01:32.16 bitrate= 421.2kbits/
frame= 2357 fps=188 q=31.0 size= 4954kB time=00:01:35.42 bitrate= 425.3kbits/
frame= 2438 fps=187 q=31.0 size= 5212kB time=00:01:38.64 bitrate= 432.8kbits/
frame= 2526 fps=186 q=31.0 size= 5453kB time=00:01:42.16 bitrate= 437.2kbits/
frame= 2614 fps=186 q=31.0 size= 5730kB time=00:01:45.69 bitrate= 444.1kbits/
frame= 2702 fps=186 q=31.0 size= 5976kB time=00:01:49.20 bitrate= 448.3kbits/
frame= 2789 fps=185 q=31.0 size= 6262kB time=00:01:52.70 bitrate= 455.1kbits/
frame= 2873 fps=185 q=31.0 size= 6528kB time=00:01:56.06 bitrate= 460.8kbits/
frame= 2961 fps=184 q=24.8 size= 6763kB time=00:01:59.56 bitrate= 463.4kbits/
frame= 3048 fps=184 q=31.0 size= 7055kB time=00:02:03.07 bitrate= 469.6kbits/
frame= 3137 fps=184 q=31.0 size= 7310kB time=00:02:06.62 bitrate= 472.9kbits/
frame= 3226 fps=184 q=31.0 size= 7567kB time=00:02:10.17 bitrate= 476.2kbits/
frame= 3316 fps=183 q=31.0 size= 7800kB time=00:02:13.77 bitrate= 477.6kbits/
frame= 3410 fps=184 q=31.0 size= 8070kB time=00:02:17.52 bitrate= 480.7kbits/
frame= 3513 fps=184 q=31.0 size= 8245kB time=00:02:21.64 bitrate= 476.8kbits/
frame= 3613 fps=185 q=31.0 size= 8470kB time=00:02:25.65 bitrate= 476.4kbits/
frame= 3725 fps=186 q=31.0 size= 8608kB time=00:02:30.14 bitrate= 469.7kbits/
frame= 3835 fps=186 q=31.0 size= 8775kB time=00:02:34.56 bitrate= 465.1kbits/
frame= 3946 fps=187 q=31.0 size= 8951kB time=00:02:38.97 bitrate= 461.2kbits/
frame= 4052 fps=188 q=31.0 size= 9080kB time=00:02:43.20 bitrate= 455.8kbits/
frame= 4162 fps=188 q=31.0 size= 9240kB time=00:02:47.61 bitrate= 451.6kbits/
frame= 4269 fps=189 q=31.0 size= 9402kB time=00:02:51.88 bitrate= 448.1kbits/
frame= 4369 fps=189 q=31.0 size= 9567kB time=00:02:55.89 bitrate= 445.6kbits/
frame= 4473 fps=190 q=31.0 size= 9727kB time=00:03:00.04 bitrate= 442.6kbits/
frame= 4576 fps=190 q=31.0 size= 9912kB time=00:03:04.17 bitrate= 440.9kbits/
frame= 4671 fps=190 q=31.0 size= 10085kB time=00:03:07.96 bitrate= 439.5kbits/
frame= 4775 fps=190 q=31.0 size= 10265kB time=00:03:12.12 bitrate= 437.7kbits/
frame= 4876 fps=191 q=31.0 size= 10441kB time=00:03:16.17 bitrate= 436.0kbits/
frame= 4968 fps=190 q=31.0 size= 10596kB time=00:03:19.87 bitrate= 434.3kbits/
frame= 5057 fps=190 q=24.8 size= 10770kB time=00:03:23.42 bitrate= 433.7kbits/
frame= 5155 fps=190 q=31.0 size= 10920kB time=00:03:27.36 bitrate= 431.4kbits/
frame= 5261 fps=191 q=31.0 size= 11062kB time=00:03:31.58 bitrate= 428.3kbits/
frame= 5360 fps=191 q=31.0 size= 11250kB time=00:03:35.52 bitrate= 427.6kbits/
frame= 5459 fps=191 q=31.0 size= 11424kB time=00:03:39.48 bitrate= 426.4kbits/
frame= 5557 fps=191 q=31.0 size= 11593kB time=00:03:43.41 bitrate= 425.1kbits/
frame= 5650 fps=191 q=31.0 size= 11780kB time=00:03:47.13 bitrate= 424.9kbits/
frame= 5750 fps=191 q=31.0 size= 11941kB time=00:03:51.12 bitrate= 423.3kbits/
frame= 5856 fps=191 q=31.0 size= 12104kB time=00:03:55.39 bitrate= 421.2kbits/
frame= 5949 fps=191 q=31.0 size= 12298kB time=00:03:59.08 bitrate= 421.4kbits/
frame= 6046 fps=191 q=31.0 size= 12438kB time=00:04:02.97 bitrate= 419.3kbits/
frame= 6151 fps=191 q=31.0 size= 12606kB time=00:04:07.20 bitrate= 417.7kbits/
frame= 6248 fps=191 q=31.0 size= 12840kB time=00:04:11.04 bitrate= 419.0kbits/
frame= 6346 fps=192 q=31.0 size= 13035kB time=00:04:14.97 bitrate= 418.8kbits/
frame= 6437 fps=191 q=24.8 size= 13299kB time=00:04:18.62 bitrate= 421.3kbits/
frame= 6533 fps=191 q=24.8 size= 13522kB time=00:04:22.46 bitrate= 422.1kbits/
frame= 6600 fps=191 q=31.0 Lsize= 13672kB time=00:04:24.04 bitrate= 424.2kbits
/s
video:11469kB audio:2063kB global headers:0kB muxing overhead 1.031504%
c:\ffmpeg\bin>
perhaps I was wrong with itoffset?...
Anonymous replied on Permalink
fixing audio in screencasts
Here's how I solved the issues
meta64.com/?id=13404