[FFmpeg-user] Audio delayed with DeckLink

PSPunch shima at pspunch.com
Thu Oct 13 16:00:15 EEST 2016


Hi,

On Win7 x64, Capturing SDI from DeckLink Duo 2.

When encoding with FFmpeg, audio seems to be about 100ms later than  
video. Is there a known solution to this, or is there a way to delay  
video by roughly 100ms?

Below is the command & output when using NVENC and streaming UDP, but  
delayed audio is present also when using libx264 or outputting to FLV file.

Also there is no such sync issues when capturing the same SDI input  
using Blackmagic Media Express.


---------------------------------------------------
ffmpeg -f decklink -i "DeckLink Duo (3)@9" -vcodec nvenc -b:v 2M  
-pix_fmt yuv420p -acodec aac -b:a 128k -bsf:v h264_mp4toannexb -f mpegts  
udp://127.0.0.1:30003?pkt_size=1316


ffmpeg version N-79037-g370cecc Copyright (c) 2000-2016 the FFmpeg  
developers
   built with gcc 5.3.0 (GCC)
   configuration: --arch=x86_64 --target-os=mingw32  
--cross-prefix=/home/david/opt/ffmpeg-cross-compile/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-  
--pkg-config=pkg-config --disable-w32threads --enable-gpl  
--enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo  
--enable-libbluray --enable-iconv --enable-libtwolame  
--extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca  
--enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng  
--enable-libvidstab --enable-libx265 --enable-decklink  
--extra-libs=-loleaut32 --enable-libx264 --enable-libxvid  
--enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp  
--enable-libvorbis --enable-libtheora --enable-libspeex  
--enable-libopenjpeg --enable-gnutls --enable-libgsm  
--enable-libfreetype --enable-libopus --enable-frei0r  
--enable-filter=frei0r --enable-bzlib --enable-libxavs  
--enable-libopencore-amrnb --enable-libopencore-amrwb  
--enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx  
--enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme  
--enable-dxva2 --enable-libdcadec --enable-avisynth --enable-gray  
--enable-libopenh264 --extra-libs=-lpsapi --extra-cflags=  
--enable-static --disable-shared  
--prefix=/home/david/opt/ffmpeg-cross-compile/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32  
--enable-nonfree --enable-libfdk-aac --disable-libfaac --enable-nvenc  
--enable-runtime-cpudetect
   libavutil      55. 19.100 / 55. 19.100
   libavcodec     57. 28.103 / 57. 28.103
   libavformat    57. 28.101 / 57. 28.101
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 39.102 /  6. 39.102
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
[decklink @ 0000000000603420] Found Decklink mode 1920 x 1080 with rate  
29.97(i)
[decklink @ 0000000000603420] Frame received (#1) - No input signal  
detected - Frames dropped 1
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Duo (3)@9':
   Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
     Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
     Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422,  
1920x1080, -5 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
Output #0, mpegts, to 'udp://127.0.0.1:30003?pkt_size=1316':
   Metadata:
     encoder         : Lavf57.28.101
     Stream #0:0: Video: h264 (nvenc) (Main), yuv420p, 1920x1080,  
q=-1--1, 2000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc
     Metadata:
       encoder         : Lavc57.28.103 nvenc
     Side data:
       cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000  
vbv_delay: -1
     Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
     Metadata:
       encoder         : Lavc57.28.103 aac
Stream mapping:
   Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (nvenc))
   Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))

-- 
David Shimamoto


More information about the ffmpeg-user mailing list