[FFmpeg-user] Delayed sound in screencast

Artur Łącki alacki93 at gmail.com
Wed Aug 21 13:17:10 CEST 2013


W dniu 21.08.2013 12:10, Carl Eugen Hoyos pisze:
> Artur Łącki <alacki93 <at> gmail.com> writes:
>
>> I'm trying do screencast with ffmpeg but I've problem 
>> with delayed sound (audio is 1-2 seconds after video). 
>> I've tried different tricks with -async, -vsync, 
>> -threads etc, but it didn't helped.
> Please post your command line together with the complete, 
> uncut console output here on the mailing list, external 
> resources tend to disappear but the information may still 
> be relevant after years.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
OK. Here is full log from console.

artur at laptop:~/Wideo> ffmpeg -f pulse -ac 2 -i default -f x11grab -r 30
-s 1366x768 -i :0.0 -vcodec libx264 -acodec libvorbis -y test.mkv
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 17 2013 07:01:31 with gcc 4.7 (SUSE Linux)
  configuration: --shlibdir=/usr/lib64 --prefix=/usr
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared
--disable-static --enable-debug --disable-stripping
--extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC
-I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3
--enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx
--enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264
--enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-postproc --enable-libdc1394
--enable-librtmp --enable-libfreetype --enable-avresample
--enable-libtwolame --enable-libvo-aacenc
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
  Duration: N/A, start: 0.019300, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[x11grab @ 0x1a69760] device: :0.0 -> display: :0.0 x: 0 y: 0 width:
1366 height: 768
[x11grab @ 0x1a69760] shared memory extension found
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1377024472.739504, bitrate: 1007124 kb/s
    Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1366x768,
1007124 kb/s, 30 tbr, 1000k tbn, 30 tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x1a87fc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1a87fc0] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
[libx264 @ 0x1a87fc0] 264 - core 135 - H.264/MPEG-4 AVC codec - Copyleft
2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3
deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf55.12.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p,
1366x768, q=-1--1, 1k tbn, 30 tbc
    Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000
Hz, stereo, fltp
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo -> libx264)
  Stream #0:0 -> #0:1 (pcm_s16le -> libvorbis)
Press [q] to stop, [?] for help
[swscaler @ 0x1a4a880] Warning: data is not aligned! This can lead to a
speedloss
frame= 1505 fps= 27 q=-1.0 Lsize=    2288kB time=00:00:50.10 bitrate=
374.2kbits/s   
video:2116kB audio:141kB subtitle:0 global headers:4kB muxing overhead
1.207635%
[libx264 @ 0x1a87fc0] frame I:7     Avg QP:18.82  size: 88676
[libx264 @ 0x1a87fc0] frame P:423   Avg QP:21.29  size:  3028
[libx264 @ 0x1a87fc0] frame B:1075  Avg QP:32.81  size:   246
[libx264 @ 0x1a87fc0] consecutive B-frames:  4.3%  0.9%  1.2% 93.6%
[libx264 @ 0x1a87fc0] mb I  I16..4: 29.8% 39.1% 31.1%
[libx264 @ 0x1a87fc0] mb P  I16..4:  1.2%  1.2%  0.7%  P16..4:  1.7% 
0.6%  0.3%  0.0%  0.0%    skip:94.2%
[libx264 @ 0x1a87fc0] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8:  1.7% 
0.1%  0.0%  direct: 0.1%  skip:98.0%  L0:46.6% L1:49.8% BI: 3.6%
[libx264 @ 0x1a87fc0] 8x8 transform intra:41.0% inter:60.7%
[libx264 @ 0x1a87fc0] coded y,u,v intra: 23.0% 6.6% 6.3% inter: 0.3%
0.1% 0.1%
[libx264 @ 0x1a87fc0] i16 v,h,dc,p: 36% 60%  1%  3%
[libx264 @ 0x1a87fc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 11% 43%  1% 
1%  1%  1%  2%  2%
[libx264 @ 0x1a87fc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 32% 14%  3% 
3%  4%  5%  3%  4%
[libx264 @ 0x1a87fc0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1a87fc0] ref P L0: 65.3%  8.8% 18.4%  7.6%
[libx264 @ 0x1a87fc0] ref B L0: 77.0% 20.4%  2.6%
[libx264 @ 0x1a87fc0] ref B L1: 95.6%  4.4%
[libx264 @ 0x1a87fc0] kb/s:345.41



More information about the ffmpeg-user mailing list