linux + ffmpeg compile

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

MerinoCabrera.Ezequiel

  • Posts: 2
  • Joined: Fri May 22, 2015 10:01 am

linux + ffmpeg compile

PostFri May 22, 2015 10:44 am

Hi,
Im using a decklink duo on a machine with a CentOS release 6.6 (Final) on x86_64 architecture.
The Driver installations its easy.

'dmks stastus' shows me:
blackmagic-io, 10.4a17, 2.6.32-504.16.2.el6.x86_64, x86_64: installed
blackmagic, 10.4a17, 2.6.32-504.16.2.el6.x86_64, x86_64: installed
blackmagic-io, 10.4a17, 2.6.32-504.el6.x86_64, x86_64: installed-weak from 2.6.32-504.16.2.el6.x86_64
blackmagic, 10.4a17, 2.6.32-504.el6.x86_64, x86_64: installed-weak from 2.6.32-504.16.2.el6.x86_64

Looks fine.

I downloaded the SDK, its needed to compile with FFMPEG to be added on the Devices List.
Using that code on the ./configure, all ready to compile.
Code: Select all
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/usr/src/ffmpeg/BMDL_SDK/SDK/Linux/include/ --extra-ldflags=-L/usr/src/ffmpeg/BMDL_SDK/SDK/Linux/include/

Then, when I made the Make, the problems starts:
a lot of "is valid for C/ObjC but not for C++" (special with '-std=c99' and '-W...' options)
libavdevice/decklink_common.cpp: In function ‘int ff_decklink_list_devices(AVFormatContext*)’

finally, when do it a ffmpeg -devices (ffmpeg -list_devices true -f dshow -i dummy its deprecated) just have the output port:
ffmpeg version git-2015-05-22-e91fbfd Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/usr/src/ffmpeg/BMDL_SDK/SDK/Linux/include/ --extra-ldflags=-L/usr/src/ffmpeg/BMDL_SDK/SDK/Linux/include/
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 39.101 / 56. 39.101
libavformat 56. 33.101 / 56. 33.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Devices:
D. = Demuxing supported
.E = Muxing supported
--
DE decklink Blackmagic DeckLink output
D dv1394 DV1394 A/V grab
DE fbdev Linux framebuffer
D lavfi Libavfilter virtual input device
DE oss OSS (Open Sound System) playback
E v4l2 Video4Linux2 output device
D video4linux2,v4l2 Video4Linux2 device grab
D x11grab X11 screen capture, using XCB

Did anyone knows what to make a good compilation?
Offline

Christoph Willing

  • Posts: 25
  • Joined: Fri Jul 12, 2013 10:11 am
  • Location: Brisbane, Australia

Re: linux + ffmpeg compile

PostTue May 26, 2015 6:42 am

I had the same problem when doing a static compile, which seems to be the default for ffmpeg. After adding "--enable-shared --disable-static" to the configuration, the resulting ffmpeg works as expected:

ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-decklink --extra-cflags=-I/usr/include/decklink --extra-ldflags=-ldl --extra-libs=-ldl --enable-shared --disable-static
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
Devices:
D. = Demuxing supported
.E = Muxing supported
--
DE alsa ALSA audio output
DE decklink Blackmagic DeckLink output
D dv1394 DV1394 A/V grab
DE fbdev Linux framebuffer
D jack JACK Audio Connection Kit
D lavfi Libavfilter virtual input device
DE oss OSS (Open Sound System) playback
E sdl SDL output device
E v4l2 Video4Linux2 output device
D video4linux2,v4l2 Video4Linux2 device grab
D x11grab X11 screen capture, using XCB
E xv XV (XVideo) output device
Offline

MerinoCabrera.Ezequiel

  • Posts: 2
  • Joined: Fri May 22, 2015 10:01 am

Re: linux + ffmpeg compile

PostTue Jun 02, 2015 2:02 pm

Its good to know Im not the only one.

¿Has anyone know a option to resolve that problem?

Thanks
Offline

Christoph Willing

  • Posts: 25
  • Joined: Fri Jul 12, 2013 10:11 am
  • Location: Brisbane, Australia

Re: linux + ffmpeg compile

PostWed Jun 03, 2015 6:25 am

As above, an option to resolve the problem appears to be configuring with shared libs instead of static i.e.
./configure --enable-decklink --extra-cflags=-I/usr/include/decklink --extra-ldflags=-ldl --extra-libs=-ldl --enable-shared --disable-static
make

It works here. Of course, that is the simplest incantation just as demonstration; add other options as desired.

chris
Offline

Christoph Willing

  • Posts: 25
  • Joined: Fri Jul 12, 2013 10:11 am
  • Location: Brisbane, Australia

Re: linux + ffmpeg compile

PostWed Jun 03, 2015 6:56 am

Actually I wonder if the static vs shared is really significant? Looking more carefully, I see you have "DE decklink Blackmagic DeckLink output" which is the same as mine. I'm able to both capture to a file and then output (not at same time) that file to Intensity Pro device. I can also play the captured file directly to computer screen with ffplay.

Have you tried using the ffmpeg you built? I suspect it will work even though only output is mentioned by 'ffmpeg -devices'. There are usage examples at https://www.ffmpeg.org/ffmpeg-devices.html for both input (Section 3) and output (Section 4).

chris

Return to Software Developers

Who is online

Users browsing this forum: Shrinivas Ramani and 17 guests