[libav-bugs] [Bug 723] New: Unsynchronised x11grab and sound

bugzilla at libav.org bugzilla at libav.org
Sun Aug 3 20:31:01 CEST 2014


http://bugzilla.libav.org/show_bug.cgi?id=723

           Summary: Unsynchronised x11grab and sound
           Product: Libav
           Version: 9
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: crecc23 at interia.pl


I am trying to make a screencast containing video and audio. Unfortunately
audio is not synchronised with video.
I am using the following command:
  avconv -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -f
x11grab -s 1366x768 -r 10 -i :0+0,0 -vcodec libx264 -preset ultrafast
~/"Videos/Screencast from `date +%F\ %T`.mp4"
Every time when I play sound on http://css-tricks.com/examples/SoundOnHover/
page or play some system sound in Linux Mint Cinnamon (like when i increase the
sound level) the audio is more and more unsynchronised: sounds are played after
video events.
OS: Linux Mint Cinnamon 17 64-bit

Can be related to: http://bugzilla.libav.org/show_bug.cgi?id=568

---------------------------
avconv -v 9 -loglevel 99 -i
avconv version 9.14-6:9.14-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav
developers
  built on Jul 15 2014 13:57:40 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --arch=amd64 --enable-pthreads --enable-runtime-cpudetect
--extra-version='6:9.14-0ubuntu0.14.04.1' --libdir=/usr/lib/x86_64-linux-gnu
--prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype
--enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame
--enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi
--enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl
--enable-swscale --enable-libcdio --enable-x11grab --enable-libx264
--enable-libxvid --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared
--disable-static
  avcodec     configuration: --arch=amd64 --enable-pthreads
--enable-runtime-cpudetect --extra-version='6:9.14-0ubuntu0.14.04.1'
--libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib
--enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls
--enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis
--enable-libvpx --enable-zlib --enable-gpl --enable-swscale --enable-libcdio
--enable-x11grab --enable-libx264 --enable-libxvid
--shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
--enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb
--enable-version3 --enable-libvo-aacenc --enable-version3
--enable-libvo-amrwbenc --enable-version3
  libavutil     52.  3. 0 / 52.  3. 0
  libavcodec    54. 35. 0 / 54. 35. 0
  libavformat   54. 20. 4 / 54. 20. 4
  libavdevice   53.  2. 0 / 53.  2. 0
  libavfilter    3.  3. 0 /  3.  3. 0
  libavresample  1.  0. 1 /  1.  0. 1
  libswscale     2.  1. 1 /  2.  1. 1
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging
level) with argument '99'.
Reading option '-i' ...Missing argument for option 'i'.
Error splitting the argument list: Invalid argument

---------------------------------
avconv -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -f
x11grab -s 1366x768 -r 10 -i :0+0,0 -vcodec libx264 -preset ultrafast
~/"Videos/Screencast from `date +%F\ %T`.mp4"
avconv version 9.14-6:9.14-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav
developers
  built on Jul 15 2014 13:57:40 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
[pulse @ 0x1dcdac0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, pulse, from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor':
  Duration: N/A, start: 0.000786, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[x11grab @ 0x1dce360] device: :0+0,0 -> display: :0 x: 0 y: 0 width: 1366
height: 768
[x11grab @ 0x1dce360] shared memory extension  found
[x11grab @ 0x1dce360] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0+0,0':
  Duration: N/A, start: 1407088336.156359, bitrate: 335708 kb/s
    Stream #1.0: Video: rawvideo, bgra, 1366x768, 335708 kb/s, 1000k tbn, 10
tbc
[libx264 @ 0x1de8420] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x1de8420] profile Constrained Baseline, level 3.2
[libx264 @ 0x1de8420] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0
me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1
chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0
decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0
keyint=250 keyint_min=10 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=0
Output #0, mp4, to '/home/darek/Videos/Screencast from 2014-08-03
19:52:16.mp4':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #0.0: Video: libx264, yuv420p, 1366x768, q=-1--1, 10 tbn, 10 tbc
    Stream #0.1: Audio: libvo_aacenc, 48000 Hz, stereo, s16, 200 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo -> libx264)
  Stream #0:0 -> #0:1 (pcm_s16le -> libvo_aacenc)
Press ctrl-c to stop encoding
^Cframe=  627 fps= 10 q=32766.0 Lsize=    6962kB time=62.70 bitrate=
909.6kbits/s    
video:5395kB audio:1531kB global headers:0kB muxing overhead 0.517466%
[libx264 @ 0x1de8420] frame I:3     Avg QP:15.00  size:165881
[libx264 @ 0x1de8420] frame P:624   Avg QP:12.50  size:  8059
[libx264 @ 0x1de8420] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x1de8420] mb P  I16..4:  4.5%  0.0%  0.0%  P16..4:  7.0%  0.0% 
0.0%  0.0%  0.0%    skip:88.5%
[libx264 @ 0x1de8420] coded y,uvDC,uvAC intra: 21.7% 20.5% 19.2% inter: 2.6%
4.8% 3.5%
[libx264 @ 0x1de8420] i16 v,h,dc,p: 63% 35%  1%  1%
[libx264 @ 0x1de8420] i8c dc,h,v,p: 62% 28% 10%  1%
[libx264 @ 0x1de8420] kb/s:705.15
Received signal 2: terminating.

-- 
Configure bugmail: http://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list