building bmdtools for Intensity Pro

Do you have questions about Desktop Video, Converters, Routers and Monitoring?
  • Author
  • Message
Offline

billschu

  • Posts: 5
  • Joined: Sun Jul 07, 2013 7:48 pm

building bmdtools for Intensity Pro

PostThu Jul 11, 2013 2:46 am

tried with Mint13-32 bit and Mint15-64 bit - both have libav-tools 8.6

Decklink sdk 9.7.1 samples build fine on 32bit, only signal generator failed on 64 bit

make for bmdtools returns same errors on 32 or 64 bit as follows

~/installs/BlackmagicDeckLinkSDK971/Linux/Samples/bmdtools $ make
g++ -o bmdcapture bmdcapture.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread `pkg-config --libs libavformat libswscale`
bmdcapture.cpp:194:61: error: use of enum âAVCodecIDâ without previous declaration
bmdcapture.cpp: In function âAVStream* add_audio_stream(AVFormatContext*, int)â:
bmdcapture.cpp:207:21: error: invalid conversion from âintâ to âCodecIDâ [-fpermissive]
bmdcapture.cpp: At global scope:
bmdcapture.cpp:234:61: error: use of enum âAVCodecIDâ without previous declaration
bmdcapture.cpp: In function âAVStream* add_video_stream(AVFormatContext*, int)â:
bmdcapture.cpp:247:21: error: invalid conversion from âintâ to âCodecIDâ [-fpermissive]
bmdcapture.cpp:264:21: error: âAV_CODEC_ID_V210â was not declared in this scope
bmdcapture.cpp: In function âint main(int, char**)â:
bmdcapture.cpp:869:51: error: âAV_CODEC_ID_RAWVIDEOâ was not declared in this scope
bmdcapture.cpp:869:74: error: âAV_CODEC_ID_V210â was not declared in this scope
bmdcapture.cpp:870:59: error: âAV_CODEC_ID_PCM_S16LEâ was not declared in this scope
bmdcapture.cpp:870:83: error: âAV_CODEC_ID_PCM_S32LEâ was not declared in this scope
make: *** [bmdcapture] Error 1

any help greatly appreciated on above as well as advice if libav-tools 8.6 is recent enough or if I should go to 8.8

TIA

Cheers,
Offline

Christoph Willing

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

Re: building bmdtools for Intensity Pro

PostFri Jul 12, 2013 8:41 pm

The problem is in the changing ffmpeg/libav API. These changes worked for me (can't figure out how to attach it, so take care with line breaks):

--- ../bmdtools/bmdcapture.cpp 2013-05-22 10:55:04.592483585 +1000
+++ bmdcapture.cpp 2013-07-12 20:04:27.170691592 +1000
@@ -191,7 +191,7 @@
AVStream *audio_st, *video_st;
BMDTimeValue frameRateDuration, frameRateScale;

-static AVStream *add_audio_stream(AVFormatContext *oc, enum AVCodecID codec_id)
+static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
{
AVCodecContext *c;
AVCodec *codec;
@@ -231,7 +231,7 @@
return st;
}

-static AVStream *add_video_stream(AVFormatContext *oc, enum AVCodecID codec_id)
+static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
{
AVCodecContext *c;
AVCodec *codec;
@@ -261,7 +261,7 @@
c->time_base.num = frameRateDuration;
c->pix_fmt = pix_fmt;

- if (codec_id == AV_CODEC_ID_V210)
+ if (codec_id == CODEC_ID_V210)
c->bits_per_raw_sample = 10;
// some formats want stream headers to be separate
if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
@@ -843,8 +843,8 @@

snprintf(oc->filename, sizeof(oc->filename), "%s", g_videoOutputFile);

- fmt->video_codec = (pix == bmdFormat8BitYUV ? AV_CODEC_ID_RAWVIDEO : AV_CODEC_ID_V210);
- fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S32LE);
+ fmt->video_codec = (pix == bmdFormat8BitYUV ? CODEC_ID_RAWVIDEO : CODEC_ID_V210);
+ fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? CODEC_ID_PCM_S16LE : CODEC_ID_PCM_S32LE);

video_st = add_video_stream(oc, fmt->video_codec);
audio_st = add_audio_stream(oc, fmt->audio_codec);
Offline

billschu

  • Posts: 5
  • Joined: Sun Jul 07, 2013 7:48 pm

Re: building bmdtools for Intensity Pro

PostThu Jul 18, 2013 1:57 am

awesome, thanks so much to cwilling

bmdplay doesn't build but changing av_get_exact_bits_per_sample to av_get_bits_per_sample "fixes" that - I don't use bmdplay and am no expert so no clue it that's the right fix but it does let it build - probably another ffmpeg vs libav issue

compressing from the command line is now working outstanding and all sync issues disappeared

Return to Post Production

Who is online

Users browsing this forum: No registered users and 28 guests