[FFmpeg-user] ffmpeg Decklink output on Windows
Anusha Balan
Anusha.Balan at intusurg.com
Thu Mar 13 23:07:23 CET 2014
Hello everyone!
I apologize for the long mail. I am currently working on an application to use ffmpeg to create live stream a stereo input (frame packed side to side), stream over UDP, receive and display on the other end on a 3D TV.
I have 2 Questions:
a) I have managed to do all parts of the above in Linux (including outputing to 3D TV which took the longest) compiling ffmpeg with the required --extra-cflags and --extra-ldflags using DecklinkAPI.h. But when I tried to do a passthrough from Decklink Mini Recorder card using bmdcapture and output to Decklink 4K Extreme, I kept getting a segmentation fault till I ignored the audio using -an flag. Clearly there is a formatting setting that I am not inputting right.
====================== ffmpeg Std Output ===================================
$./bmdcapture -C0 -m11 -V4 -v -F nut -f pipe:1 | ffmpeg -i - -vsync 1 -c:v rawvideo -pix_fmt uyvy422 -c:a pcm_s16le -s 1920x1080 -r 30000/1001 -ar 48000 -f decklink 'DeckLink 4K Extreme'
ffmpeg version git-2014-03-11-50a3c82 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 11 2014 16:20:28 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/usr/local --bindir=/usr/local/bin --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfdk-aac --enable-libmp3lame --enable-decklink --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --extra-libs=-ldl --enable-gpl --enable-libass --enable-x11grab --enable-shared --prefix=/usr/local --extra-cflags=-I/home/isidvl1/Downloads/Blackmagic_DeckLink_SDK_9.7.7/Linux/include
libavutil 52. 66.101 / 52. 66.101
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 34.100 / 55. 34.100
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, nut, from 'pipe:':
Metadata:
encoder : Lavf55.34.100
Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, 29.97 tbr, 60k tbn, 60k tbc
Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 48000 Hz, stereo, s16, 1536 kb/s
Output #0, decklink, to 'DeckLink 4K Extreme':
Metadata:
encoder : Lavf55.34.100
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> rawvideo)
Stream #0:1 -> #0:1 (pcm_s16le -> pcm_s16le)
[decklink @ 0x224cbe0] Encoder did not produce proper pts, making some up.
Segmentation fault (core dumped)
=========================================================================
b) I need the same to work on windows owing to an other overlay application previously built on MSVC. I was able to cross compile modifying the cross_compile_ffmpeg.sh from https://github.com/rdp/ffmpeg-windows-build-helpers in Ubuntu 12.04 LTS.
MSVC Express 2010 was used to compile the DecklinkAPI.idl to generate DecklinkAPI.h and DecklinkAPI_i.c and added them to the flags in the script. But after compilation (using Ubuntu 12.04), when I used the executables on Windows 7, I still am not able to detect the precense of the card. Are there more .idl files that need to be compiled using MIDL and added to the flags?
====================== ffmpeg Std Output ===================================
C:\Project>ffmpeg -i Wildlife.wmv -f decklink -list_devices 1 dummy
ffmpeg version N-61344-g8b02dfd Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 13 2014 11:26:52 with gcc 4.8.2 (GCC)
configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/isidvl1/ffmpeg-windows-build-helpers/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --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 --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --prefix=/home/isidvl1/ffmpeg-windows-build-helpers/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-static --disable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfdk-aac --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --enable-decklink --enable-libtheora --enable-libvorbis --enable-libvpx --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-I/home/isidvl1/Downloads/Blackmagic_DeckLink_SDK_9.7.7/Win/cc --extra-cflags=-I/home/isidvl1/Downloads/Blackmagic_DeckLink_SDK_9.7.7/Win/include --extra-ldflags=-L/home/isidvl1/Downloads/Blackmagic_DeckLink_SDK_9.7.7/Win/cc --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-libx264 --enable-libx265 --extra-cflags= --extra-cflags= --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-runtime-cpudetect
libavutil 52. 66.101 / 52. 66.101
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 34.101 / 55. 34.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from 'Wildlife.wmv':
Metadata:
SfOriginalFPS : 299700
WMFSDKVersion : 11.0.6001.7000
WMFSDKNeeded : 0.0.0.0000
comment : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
title : Wildlife in HD
copyright : © 2008 Microsoft Corporation
IsVBR : 0
DeviceConformanceTemplate: AP at L3
Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 192 kb/s
Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 tbr, 1k tbn, 1k tbc
[decklink @ 00000000029e10a0] Blackmagic DeckLink devices:
=========================================================================
Appreciate any help on this!
Thank you!
Anusha
More information about the ffmpeg-user
mailing list