Decklink capture problems - out of sync

Steam recording with RTMPDump or FFmpeg.
Post Reply
nesburf
Posts: 2
Joined: Mon May 20, 2019 4:00 pm

Decklink capture problems - out of sync

Post by nesburf » Mon May 20, 2019 4:10 pm

I have a BM Ultrastudio Pro USB3 device. I'm looking to capture SDI video into the XDCAM EX format. The original source is a Betacam SX deck DNW-A75 --> SDI out into a Harris X50, unconverted to 1080i and SDI out into the BM Ultrastudio.

I am using this command to record video from the device

Code: Select all

ffmpeg -y -format_code Hi59 -draw_bars false -f decklink -i "UltraStudio Pro" -pix_fmt yuv420p -vcodec mpeg2video -flags +ildct+ilme -top 1 -dc 10 -qmin 1 -lmin "1*QP2LAMBDA" -vtag xdv3 -b:v 35000k -minrate 35000k -maxrate 35000k -bufsize 36408333 -g 15 -bf 2 -acodec pcm_s16le -ar 48000 -filter_complex "[0:a]channelsplit[l][r]" -map 0:v -map "[l]" -map "[r]" -f mxf -y "output.MXF"
It creates a fully usable file however the audio and video is out of sync. The audio is ahead by about 10-15 frames. When I capture within Premiere or Media Express the audio is fine. The problem with those programs is that I cannot capture to the codec I want.

Here is the ffmpeg output. Any ideas?

Code: Select all

ffmpeg version N-93855-g21832b93d5 Copyright (c) 2000-2019 the FFmpeg developers

  built with gcc 8.3.0 (Rev2, Built by MSYS2 project)
  configuration:  --disable-autodetect --enable-amf --enable-bzlib --enable-cuda
 --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --e
nable-nvenc --enable-zlib --enable-sdl2 --disable-debug --enable-ffnvcodec --ena
ble-nvdec --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvp
x --enable-libx264 --enable-libx265 --enable-libdav1d --enable-fontconfig --enab
le-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmy
sofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enabl
e-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --e
nable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl -
-enable-avisynth --enable-libxvid --enable-libaom --enable-libopenmpt --enable-v
ersion3 --enable-chromaprint --enable-decklink --enable-frei0r --enable-libbs2b
--enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libflite --enable
-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar
 --enable-libmodplug --enable-libopenh264 --enable-librtmp --enable-librubberban
d --enable-libssh --enable-libtesseract --enable-libxavs --enable-libzmq --enabl
e-libzvbi --enable-opencl --enable-opengl --enable-libvmaf --enable-libcodec2 --
enable-libsrt --enable-ladspa --enable-openssl --extra-cflags=-fopenmp --extra-l
ibs=-lgomp --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cfla
gs=-DLIBSSH_STATIC --extra-ldflags='-Wl,--allow-multiple-definition' --extra-cfl
ags=-DCACA_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCHROMAPRINT_N
ODLL --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-libs=-lpsapi --ex
tra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cfl
ags=-DKVZ_STATIC_LIB --enable-nonfree
  libavutil      56. 27.100 / 56. 27.100
  libavcodec     58. 52.101 / 58. 52.101
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 51.100 /  7. 51.100
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[decklink @ 0000000000a8da80] Found Decklink mode 1920 x 1080 with rate 29.97(i)

[decklink @ 0000000000a8da80] Frame received (#1) - No input signal detected - F
rames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'UltraStudio Pro':
  Duration: N/A, start: 0.000000, bitrate: 995869 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422(top first), 1920x1
080, 994333 kb/s, 29.97 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 (pcm_s16le) -> channelsplit (graph 0)
  Stream #0:1 -> #0:0 (rawvideo (native) -> mpeg2video (native))
  channelsplit:FL (graph 0) -> Stream #0:1 (pcm_s16le)
  channelsplit:FR (graph 0) -> Stream #0:2 (pcm_s16le)
Press [q] to stop, [?] for help
[mpeg2video @ 0000000000aab200] Warning vbv_delay will be set to 0xFFFF (=VBR) a
s the specified vbv buffer is too large for the given bitrate!
[decklink @ 0000000000a8da80] Frame received (#10) - Input returned - Frames dro
pped 2
Output #0, mxf, to 'output.MXF':
  Metadata:
    encoder         : Lavf58.27.103
    Stream #0:0: Video: mpeg2video (Main) (xdv3 / 0x33766478), yuv420p(top coded
 first (swapped)), 1920x1080, q=1-31, 35000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tb
c
    Metadata:
      encoder         : Lavc58.52.101 mpeg2video
    Side data:
      cpb: bitrate max/min/avg: 35000000/35000000/35000000 buffer size: 36408333
 vbv_delay: -1
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 1 channels (FL), s16, 768 kb/s
    Metadata:
      encoder         : Lavc58.52.101 pcm_s16le
    Stream #0:2: Audio: pcm_s16le, 48000 Hz, 1 channels (FR), s16, 768 kb/s
    Metadata:
      encoder         : Lavc58.52.101 pcm_s16le
frame=   16 fps=0.0 q=0.8 size=      85kB time=00:00:00.43 bitrate=1608.1kbits/s
frame=   31 fps= 31 q=0.8 size=    2050kB time=00:00:00.93 bitrate=17976.5kbits/
frame=   47 fps= 31 q=1.3 size=    4308kB time=00:00:01.46 bitrate=24036.1kbits/
frame=   62 fps= 30 q=1.3 size=    6715kB time=00:00:01.96 bitrate=27943.5kbits/
frame=   77 fps= 30 q=1.3 size=    8973kB time=00:00:02.46 bitrate=29769.1kbits/
frame=   92 fps= 30 q=1.3 size=   11230kB time=00:00:02.96 bitrate=30978.0kbits/
frame=  108 fps= 30 q=1.3 size=   13638kB time=00:00:03.50 bitrate=31888.0kbits/

nesburf
Posts: 2
Joined: Mon May 20, 2019 4:00 pm

Re: Decklink capture problems - out of sync

Post by nesburf » Sat May 25, 2019 6:54 pm

nobody knows?

Post Reply
'