Hi, ich möchte gern mit der Webcam aufnehmen ohne den Sound vom Mikrofon, sondern nur mit dem internen Sound(Youtube-Clips).
Mit diesem Code klappt zwar die Aufnahme aber es ist nicht synchron.
xeon@linux:~$ ffmpeg -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -vcodec h264 -f v4l2 -i /dev/video0 -y out.mkv ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 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: 1477155969.061072, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s Input #1, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 26336.457241, bitrate: N/A Stream #1:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 1600x896 [SAR 1:1 DAR 25:14], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc No pixel format specified, yuvj420p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. [libx264 @ 0xc006e0] using SAR=1/1 [libx264 @ 0xc006e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 [libx264 @ 0xc006e0] profile High, level 4.0 [libx264 @ 0xc006e0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=-2 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 'out.mkv': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1600x896 [SAR 1:1 DAR 25:14], q=-1--1, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc56.60.100 libx264 Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp Metadata: encoder : Lavc56.60.100 libvorbis Stream mapping: Stream #1:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:0 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis)) Press [q] to stop, [?] for help Past duration 0.680000 too large [output stream 0:1 @ 0xbcd0a0] 100 buffers queued in output stream 0:1, something may be wrong. [pulse @ 0xb48520] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [libvorbis @ 0xc01640] Queue input is backward in time00.26 bitrate=5034.5kbits/s dup=0 drop=5 [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 332, current: 254; changing to 332. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 332, current: 276; changing to 332. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 332, current: 297; changing to 332. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 332, current: 318; changing to 332. This may result in incorrect timestamps in the output file. [video4linux2,v4l2 @ 0xb51840] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [libvorbis @ 0xc01640] Queue input is backward in time [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 574, current: 488; changing to 574. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 574, current: 509; changing to 574. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 574, current: 530; changing to 574. This may result in incorrect timestamps in the output file. [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 574, current: 552; changing to 574. This may result in incorrect timestamps in the output file. [libvorbis @ 0xc01640] Queue input is backward in time00.68 bitrate=3836.4kbits/s dup=0 drop=5 [matroska @ 0xbffc20] Non-monotonous DTS in output stream 0:1; previous: 744, current: 710; changing to 744. This may result in incorrect timestamps in the output file. frame= 91 fps= 14 q=-1.0 Lsize= 1219kB time=00:00:03.66 bitrate=2723.0kbits/s dup=0 drop=5 video:1213kB audio:0kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.487947% [libx264 @ 0xc006e0] frame I:1 Avg QP:23.17 size: 27460 [libx264 @ 0xc006e0] frame P:45 Avg QP:21.46 size: 19044 [libx264 @ 0xc006e0] frame B:45 Avg QP:22.82 size: 7923 [libx264 @ 0xc006e0] consecutive B-frames: 34.1% 0.0% 0.0% 65.9% [libx264 @ 0xc006e0] mb I I16..4: 34.6% 57.6% 7.8% [libx264 @ 0xc006e0] mb P I16..4: 4.9% 4.7% 0.2% P16..4: 56.9% 6.6% 4.1% 0.0% 0.0% skip:22.5% [libx264 @ 0xc006e0] mb B I16..4: 0.5% 0.4% 0.0% B16..8: 44.0% 1.1% 0.1% direct: 9.3% skip:44.7% L0:49.8% L1:48.7% BI: 1.5% [libx264 @ 0xc006e0] 8x8 transform intra:49.2% inter:80.9% [libx264 @ 0xc006e0] coded y,uvDC,uvAC intra: 18.7% 66.4% 26.5% inter: 7.8% 37.1% 9.1% [libx264 @ 0xc006e0] i16 v,h,dc,p: 35% 27% 17% 21% [libx264 @ 0xc006e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 18% 43% 2% 2% 2% 2% 2% 2% [libx264 @ 0xc006e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 17% 18% 5% 6% 6% 4% 4% 2% [libx264 @ 0xc006e0] i8c dc,h,v,p: 58% 18% 21% 3% [libx264 @ 0xc006e0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0xc006e0] ref P L0: 72.8% 5.3% 16.3% 5.6% [libx264 @ 0xc006e0] ref B L0: 88.7% 9.0% 2.3% [libx264 @ 0xc006e0] ref B L1: 95.7% 4.3% [libx264 @ 0xc006e0] kb/s:2659.21 Exiting normally, received signal 2. xeon@linux:~$
Ich habe es auch schon mit -async & -vsync probiert. Hat aber nicht funktioniert.
Kann mir jemand einen Tipp geben?
Gruß Conny