Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed Build Instructions missing #52

Open
AlexandreLicinio opened this issue Apr 15, 2015 · 39 comments
Open

Detailed Build Instructions missing #52

AlexandreLicinio opened this issue Apr 15, 2015 · 39 comments

Comments

@AlexandreLicinio
Copy link

AlexandreLicinio commented Apr 15, 2015

Hi all,

I don't know why but i can't install bmdtools correctly.
It says something is missing, apparently libavutil/time.h and i don't know how to fix it. I tried with an ubuntu and a debian but sill the same damn shit. I have ffmpeg, ffmbc, libav.
I just noticed that ffmbc use timer.h instead time.h

If somebody could help me.
Thanks a lot

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11211371-detailed-build-instructions-missing?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).
@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

You probably are missing the dev package.

You can use this repository to get the latest libav.

@AlexandreLicinio
Copy link
Author

Thanks, i did "sudo add-apt-repository ppa:motumedia/libav-daily" then "sudo apt-get update".
I still have the same error. Did i miss something ? did something wrong when adding ppa ?

Sorry for disturbing you.
Thanks,

@AlexandreLicinio
Copy link
Author

I think i did something wrong, i tried to install manually Libav-toos_12 libavcodec-dev_12 and libavutil-dev_12 and when i did make in bmdtools i have :

bmdcapture.cpp:192:61: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream add_audio_stream(AVFormatContext *oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream
add_audio_stream(AVFormatContext_, int)’:
bmdcapture.cpp:198:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:205:19: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp: At global scope:
bmdcapture.cpp:232:61: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream *add_video_stream(AVFormatContext *oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream_ add_video_stream(AVFormatContext_, int)’:
bmdcapture.cpp:238:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:245:19: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp:262:21: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
if (codec_id == AV_CODEC_ID_V210 || codec_id == AV_CODEC_ID_R210)
^
bmdcapture.cpp:262:53: error: ‘AV_CODEC_ID_R210’ was not declared in this scope
if (codec_id == AV_CODEC_ID_V210 || codec_id == AV_CODEC_ID_R210)
^
bmdcapture.cpp:264:21: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
if (codec_id == AV_CODEC_ID_RAWVIDEO)
^
bmdcapture.cpp: At global scope:
bmdcapture.cpp:287:60: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream *add_data_stream(AVFormatContext oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream_ add_data_stream(AVFormatContext_, int)’:
bmdcapture.cpp:293:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:300:17: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp: In function ‘int main(int, char_
)’:
bmdcapture.cpp:706:27: error: ‘AV_PIX_FMT_UYVY422’ was not declared in this scope
pix_fmt = AV_PIX_FMT_UYVY422;
^
bmdcapture.cpp:710:27: error: ‘AV_PIX_FMT_YUV422P10’ was not declared in this scope
pix_fmt = AV_PIX_FMT_YUV422P10;
^
bmdcapture.cpp:715:31: error: ‘AV_PIX_FMT_RGB48’ was not declared in this scope
pix_fmt = AV_PIX_FMT_RGB48;
^
bmdcapture.cpp:760:64: error: ‘av_dict_parse_string’ was not declared in this scope
if (av_dict_parse_string(&opts, optarg, "=", ":", 0) < 0) {
^
bmdcapture.cpp:931:28: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_RAWVIDEO;
^
bmdcapture.cpp:934:28: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_V210;
^
bmdcapture.cpp:937:28: error: ‘AV_CODEC_ID_R210’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_R210;
^
bmdcapture.cpp:941:59: error: ‘AV_CODEC_ID_PCM_S16LE’ was not declared in this scope
fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S32LE);
^
bmdcapture.cpp:941:83: error: ‘AV_CODEC_ID_PCM_S32LE’ was not declared in this scope
fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S32LE);
^
bmdcapture.cpp:947:39: error: ‘AV_CODEC_ID_TEXT’ was not declared in this scope
data_st = add_data_stream(oc, AV_CODEC_ID_TEXT);
^

this is not fun !! but i keep smile :)

If someone can help me :)

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

libavformat-dev missing =)

@AlexandreLicinio
Copy link
Author

i did but still the same error...
do i have to purge something or remove something ?

Thanks lu-zero, i well appreciate your help

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

can you please paste the full error?

@AlexandreLicinio
Copy link
Author

With pleasure :

horus-ekla@horusekla-ProLiant-DL320e-Gen8-v2:~/Downloads/sdk/SDK/Linux/Samples/bmdtools-master$ make
g++ -o bmdcapture bmdcapture.cpp modes.cpp ../../include/DeckLinkAPIDispatch.cpp pkg-config --cflags libavcodec libavformat libswscale libavutil -D__STDC_CONSTANT_MACROS -Wno-multichar -I ../../include -fno-rtti -g pkg-config --libs libavcodec libavformat libswscale libavutil -lm -ldl -lpthread
bmdcapture.cpp:192:61: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream add_audio_stream(AVFormatContext *oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream
add_audio_stream(AVFormatContext_, int)’:
bmdcapture.cpp:198:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:205:19: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp: At global scope:
bmdcapture.cpp:232:61: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream *add_video_stream(AVFormatContext *oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream_ add_video_stream(AVFormatContext_, int)’:
bmdcapture.cpp:238:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:245:19: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp:262:21: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
if (codec_id == AV_CODEC_ID_V210 || codec_id == AV_CODEC_ID_R210)
^
bmdcapture.cpp:262:53: error: ‘AV_CODEC_ID_R210’ was not declared in this scope
if (codec_id == AV_CODEC_ID_V210 || codec_id == AV_CODEC_ID_R210)
^
bmdcapture.cpp:264:21: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
if (codec_id == AV_CODEC_ID_RAWVIDEO)
^
bmdcapture.cpp: At global scope:
bmdcapture.cpp:287:60: error: use of enum ‘AVCodecID’ without previous declaration
static AVStream *add_data_stream(AVFormatContext *oc, enum AVCodecID codec_id)
^
bmdcapture.cpp: In function ‘AVStream_ add_data_stream(AVFormatContext_, int)’:
bmdcapture.cpp:293:38: error: ‘avformat_new_stream’ was not declared in this scope
st = avformat_new_stream(oc, NULL);
^
bmdcapture.cpp:300:17: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
c->codec_id = codec_id;
^
bmdcapture.cpp: In function ‘int main(int, char__)’:
bmdcapture.cpp:706:27: error: ‘AV_PIX_FMT_UYVY422’ was not declared in this scope
pix_fmt = AV_PIX_FMT_UYVY422;
^
bmdcapture.cpp:710:27: error: ‘AV_PIX_FMT_YUV422P10’ was not declared in this scope
pix_fmt = AV_PIX_FMT_YUV422P10;
^
bmdcapture.cpp:715:31: error: ‘AV_PIX_FMT_RGB48’ was not declared in this scope
pix_fmt = AV_PIX_FMT_RGB48;
^
bmdcapture.cpp:760:64: error: ‘av_dict_parse_string’ was not declared in this scope
if (av_dict_parse_string(&opts, optarg, "=", ":", 0) < 0) {
^
bmdcapture.cpp:931:28: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_RAWVIDEO;
^
bmdcapture.cpp:934:28: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_V210;
^
bmdcapture.cpp:937:28: error: ‘AV_CODEC_ID_R210’ was not declared in this scope
fmt->video_codec = AV_CODEC_ID_R210;
^
bmdcapture.cpp:941:59: error: ‘AV_CODEC_ID_PCM_S16LE’ was not declared in this scope
fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S32LE);
^
bmdcapture.cpp:941:83: error: ‘AV_CODEC_ID_PCM_S32LE’ was not declared in this scope
fmt->audio_codec = (sample_fmt == AV_SAMPLE_FMT_S16 ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S32LE);
^
bmdcapture.cpp:947:39: error: ‘AV_CODEC_ID_TEXT’ was not declared in this scope
data_st = add_data_stream(oc, AV_CODEC_ID_TEXT);
^
make: *_* [bmdcapture] Error 1

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

Check that avformat exists

ls /usr/include/libavformat/avformat.h

head /usr/include/libavformat/avformat.h

@AlexandreLicinio
Copy link
Author

I have this :

horus-ekla@horusekla-ProLiant-DL320e-Gen8-v2:~/Downloads/sdk/SDK/Linux/Samples/bmdtools-master$ ls /usr/include/libavformat/avformat.h
/usr/include/libavformat/avformat.h

horus-ekla@horusekla-ProLiant-DL320e-Gen8-v2:~/Downloads/sdk/SDK/Linux/Samples/bmdtools-master$ head /usr/include/libavformat/avformat.h
/*

  • copyright (c) 2001 Fabrice Bellard
    *
  • This file is part of Libav.
    *
  • Libav is free software; you can redistribute it and/or
  • modify it under the terms of the GNU Lesser General Public
  • License as published by the Free Software Foundation; either
  • version 2.1 of the License, or (at your option) any later version.

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

pkg-config --libs libavcodec libavformat libswscale libavutil

@AlexandreLicinio
Copy link
Author

it says :

-pthread -L/usr/local/lib -lavformat -lavcodec -lva -lasound -lSDL -lx264 -lz -lswscale -lavutil -lm

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

-L/usr/local/lib

You are using something you manually installed. wipe /usr/local/lib and /usr/local/include out of it and you should be fine.

@AlexandreLicinio
Copy link
Author

Now i have new errors :

horus-ekla@horusekla-ProLiant-DL320e-Gen8-v2:~/Downloads/sdk/SDK/Linux/Samples/bmdtools-master$ make
g++ -o bmdcapture bmdcapture.cpp modes.cpp ../../include/DeckLinkAPIDispatch.cpp pkg-config --cflags libavcodec libavformat libswscale libavutil -D__STDC_CONSTANT_MACROS -Wno-multichar -I ../../include -fno-rtti -g pkg-config --libs libavcodec libavformat libswscale libavutil -lm -ldl -lpthread
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing libswscale.pc' to the PKG_CONFIG_PATH environment variable No package 'libswscale' found Package libswscale was not found in the pkg-config search path. Perhaps you should add the directory containinglibswscale.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswscale' found
bmdcapture.cpp: In function ‘int main(int, char*_)’:
bmdcapture.cpp:778:42: warning: too many arguments for format [-Wformat-extra-args]
"Please disable either\n");
^
/tmp/cc2oGovU.o: In function avpacket_queue_flush': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:92: undefined reference toav_free_packet'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:93: undefined reference to av_freep' /tmp/cc2oGovU.o: In functionavpacket_queue_put':
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:114: undefined reference to av_dup_packet' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:118: undefined reference toav_malloc'
/tmp/cc2oGovU.o: In function avpacket_queue_get': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:164: undefined reference toav_free'
/tmp/cc2oGovU.o: In function add_audio_stream': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:198: undefined reference toavformat_new_stream'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:218: undefined reference to avcodec_find_encoder' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:224: undefined reference toavcodec_open2'
/tmp/cc2oGovU.o: In function add_video_stream': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:238: undefined reference toavformat_new_stream'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:265: undefined reference to avcodec_pix_fmt_to_codec_tag' /tmp/cc2oGovU.o: In functionadd_data_stream':
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:293: undefined reference to avformat_new_stream' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:312: undefined reference toav_malloc'
/tmp/cc2oGovU.o: In function write_data_packet(char_, int, long)': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:363: undefined reference to av_init_packet'
/tmp/cc2oGovU.o: In functionDeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame_, IDeckLinkAudioInputPacket_)': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:390: undefined reference to av_init_packet'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:467: undefined reference toav_init_packet' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:509: undefined reference to av_gettime'
/tmp/cc2oGovU.o: In functionpush_packet': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:620: undefined reference to av_interleaved_write_frame'
/tmp/cc2oGovU.o: In functionmain': /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:657: undefined reference to av_register_all'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:745: undefined reference toav_guess_format' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:760: undefined reference to av_dict_parse_string'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:876: undefined reference toav_guess_format' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:923: undefined reference to avformat_alloc_context'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:950: undefined reference toavio_open' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:956: undefined reference to avformat_write_header'
/home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:999: undefined reference toav_write_trailer' /home/horus-ekla/Downloads/sdk/SDK/Linux/Samples/bmdtools-master/bmdcapture.cpp:1002: undefined reference to avio_close'
collect2: error: ld returned 1 exit status
make: *** [bmdcapture] Error 1

i'm confused to disturb you with that.
Thanks

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

apt-get install libswscale-dev

@AlexandreLicinio
Copy link
Author

wWOOWw you rock ! it works !
Just to know, what was the main problem, because i have only ffmbc installed and avconv on a fresh "rusty" (14;04) ubuntu ?

for next time i need to install bmdtool, what you recommand, install ffmpeg only ? or avconv ?
do you have a donate paypal ?

Thanks, many many thanks

@lu-zero
Copy link
Owner

lu-zero commented Apr 15, 2015

The only supported configuration is using the most current libav release or even better using libav master.

Virtual drinks are always welcome at [email protected] =)

@AlexandreLicinio
Copy link
Author

with pleasure, santé !

i work in broadcast industry so if you need help in your project, please advise me. If i can do something, i will do it.

@lu-zero
Copy link
Owner

lu-zero commented Apr 16, 2015

If you want, please contact on my email address, I have plenty of maybe interesting plans that might be useful to you =)

@AlexandreLicinio
Copy link
Author

Sorry for that question lu-zero but i'm a bit struggle with understanding of "how to correct compile and install libav". I learned a lot during my problem you solved and i want to go further to understand clearly how to compile and install the latest libav with the latests librairies. And don't just apt-get install .

Finally i post this question here because after a long long search on the net i found nothing.

When i go to the libav project site you explain how to install the latest libav from git :
So i clone the git > git://git.libav.org/libav.git

And when i do a ./configure i don't have x264 encoders and many others. I know that when i do a ./configure --help there are a lot of options i can add but to be honnest i don't understand clearly what i have to do.

So what is the correct way to add library ?
How to add new encoders, do i have to uninstall libav an re-install it ?

And i can't use both ffmbc and libav. Is is a way to share the librairies ?

I'm sorry for that, maybe you can help me by giving me a link where i can find a solution somewhere.

Thanks lu-zero

@lu-zero
Copy link
Owner

lu-zero commented Apr 16, 2015

I'll write down detailed instructions soon, today I'm too tired.

@AlexandreLicinio
Copy link
Author

Thanks luka. Realy thanks to you. I wrote an email this morning to you to
[email protected] is that the correct one or do you prefer the gmail one
(i seen it on libav)?

Btw, for my problem ''how to compile correctly'' i'm confused to disturb
you about that. If i can do something for your project in exhange of you
helping me, it's with pleasure. Or i can pay you as a ''consultant'' :).
Sorry if you find that to polite.

Thanks,
Cheers

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:27, "Luca Barbato" [email protected] a écrit :

I'll write down detailed instructions soon, today I'm too tired.


Reply to this email directly or view it on GitHub
#52 (comment).

@lu-zero
Copy link
Owner

lu-zero commented Apr 16, 2015

Strange, I didn't get it...
On 16 Apr 2015 21:55, "AlexandreLicinio" [email protected] wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you to
[email protected] is that the correct one or do you prefer the gmail one
(i seen it on libav)?

Btw, for my problem ''how to compile correctly'' i'm confused to disturb
you about that. If i can do something for your project in exhange of you
helping me, it's with pleasure. Or i can pay you as a ''consultant'' :).
Sorry if you find that to polite.

Thanks,
Cheers

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:27, "Luca Barbato" [email protected] a écrit :

I'll write down detailed instructions soon, today I'm too tired.


Reply to this email directly or view it on GitHub
#52 (comment).


Reply to this email directly or view it on GitHub
#52 (comment).

@AlexandreLicinio
Copy link
Author

You want i use the gmail one ? The gentoo ?

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:57, "Luca Barbato" [email protected] a écrit :

Strange, I didn't get it...
On 16 Apr 2015 21:55, "AlexandreLicinio" [email protected] wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you to
[email protected] is that the correct one or do you prefer the gmail
one
(i seen it on libav)?

Btw, for my problem ''how to compile correctly'' i'm confused to disturb
you about that. If i can do something for your project in exhange of you
helping me, it's with pleasure. Or i can pay you as a ''consultant'' :).
Sorry if you find that to polite.

Thanks,
Cheers

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:27, "Luca Barbato" [email protected] a
écrit :

I'll write down detailed instructions soon, today I'm too tired.


Reply to this email directly or view it on GitHub
#52 (comment).


Reply to this email directly or view it on GitHub
#52 (comment).


Reply to this email directly or view it on GitHub
#52 (comment).

@lu-zero
Copy link
Owner

lu-zero commented Apr 16, 2015

Both should be fine
On 16 Apr 2015 21:58, "AlexandreLicinio" [email protected] wrote:

You want i use the gmail one ? The gentoo ?

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:57, "Luca Barbato" [email protected] a écrit :

Strange, I didn't get it...
On 16 Apr 2015 21:55, "AlexandreLicinio" [email protected]
wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you
to
[email protected] is that the correct one or do you prefer the gmail
one
(i seen it on libav)?

Btw, for my problem ''how to compile correctly'' i'm confused to
disturb
you about that. If i can do something for your project in exhange of
you
helping me, it's with pleasure. Or i can pay you as a ''consultant''
:).
Sorry if you find that to polite.

Thanks,
Cheers

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:27, "Luca Barbato" [email protected] a
écrit :

I'll write down detailed instructions soon, today I'm too tired.


Reply to this email directly or view it on GitHub
<#52 (comment)
.


Reply to this email directly or view it on GitHub
#52 (comment).


Reply to this email directly or view it on GitHub
#52 (comment).


Reply to this email directly or view it on GitHub
#52 (comment).

@lu-zero lu-zero changed the title bmdcapture.cpp:36:28: fatal error: libavutil/time.h: No such file or directory Detailed Build Instructions missing Apr 17, 2015
@lu-zero
Copy link
Owner

lu-zero commented Apr 17, 2015

I wrote down this. Hopefully covers everything.

@AlexandreLicinio
Copy link
Author

Luca, thanks a lot, grazie mille.
Everything is clear now.

If i want to update libav or add new encoders, decoders, do i have to
remove and purge it and re-do the ./configure ? Or something else ?

Again, grazie.

Did you receive my email on your gmail @ ?

Cheers,

2015-04-17 15:54 GMT+02:00 Luca Barbato [email protected]:

I wrote down this https://github.com/lu-zero/bmdtools/wiki. Hopefully
covers everything.


Reply to this email directly or view it on GitHub
#52 (comment).

Alexandre Licinio
Gérant

E__K_L_A INGENIERIE *
*Broadcast engineering

RF . IPTV . IT . LAN . WAN
Hardware & Software R&D

*.yes, we are open-source. *

[email protected]

+33 (0)6 76 10 28 41

50 Avenue Lacassagne
69003 Lyon - France

@lu-zero
Copy link
Owner

lu-zero commented Apr 17, 2015

it is suggested to remove it and re-run configure with the new options, I received your email, but today I had been busy and I wanted to get you a better reply =)

@AlexandreLicinio
Copy link
Author

BIG thanks for your wiki. I had some problems with some steps (maybe it's my fault).
I wanted to change some lines in the wiki but first i prefer discuss with you about.

So i did (on a fresh 14.04 install) :

sudo apt-get install git cmake g++ autoconf pkg-config unzip nasm qt-sdk
sudo add-apt-repository ppa:motumedia/libav-daily
apt-get update
apt-get upgrade
apt-get install libavresample-dev libavscale-dev

No succes when ./configure Yasm from git so i did :

wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install

For x264, libfdk-aac and opus, when i did ./configure --enable-lib-x264 (and opus and aac), x264, aac and opus were "not found", but were in /usr/local !!
So i did :

apt-get install libfdk-aac-dev
sudo apt-get install libmp3lame-dev
sudo apt-get install libfreetype6-dev
apt-get install libx264-dev

git clone git://git.videolan.org/x265
cd x265/build
cmake ../source
make
make install

wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
tar xzvf opus-1.1.tar.gz
cd opus-1.1
./configure
make
make install
make distclean

git clone git://github.com/libav/libav
cd libav
./configure --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libopus --enable-libmp3lame --enable-libfreetype
make
make install

avconv -codecs : everything sounds good =)

Blackmagic desktop video (for drivers, we don’t need gui)

tar -xvf Blackmagic_Desktop_Video_Linux_10.4.tar.gz
cd Blackmagic_Desktop_Video_Linux_10.4/deb/amd64
dpkg -i desktopvideo_10.4a17_amd64.deb
sudo apt-get install -f

BlackmagicFirmwareUpdater status (if needed)

Blackmagic SDK

unzip Blackmagic_DeckLink_SDK_10.4.zip
cd Blackmagic DeckLink SDK 10.4/SDK/Linux/Samples

I noticed that it was impossible to "make" because some build.sh were not executables.

cd SignalGenerator/
chmod +x build.sh

cd OpenGLOutput/
chmod +x build.sh

cd LoopThroughWithOpenGLCompositing/
chmod +x build.sh

cd .. (we are in /samples)
make

(we are in /Downloads)

cp -r bmdtools/ Blackmagic\ DeckLink\ SDK\ 10.4/SDK/Linux/Samples/
cd Blackmagic\ DeckLink\ SDK\ 10.4/SDK/Linux/Samples/bmdtools
make

cp bmdcapture bmdplay /usr/local/bin

to test it :

bmdcapture -M 2 -C 0 -m 7 -A 2 -V 4 -F nut -o strict=experimental:syncpoints=none -f pipe:1 | avconv -y -i - -vsync passthrough -vcodec mpeg2video -s 1920x1080 -vf yadif -r 25 -pix_fmt "yuv420p" -b:v 8500k -g 12 -acodec mp2 -ab 320k -ac 2 -ar 48000 input1.nut

avconv -vsync 1 -i input1.nut -c:v rawvideo -pix_fmt uyvy422 -r 25 -s 1920x1080 -c:a pcm_s16le -ar 48000 -f nut -f_strict experimental -syncpoints none - | bmdplay -m 7 -C 0 -O 4 -b 200 -f pipe:0

:) everything is working well

  • libx264-dev and libfdk-aac-dev (from apt-get) are the same than x264 and aac from git ? or less quality encoders ?
  • I seen in most "web tuto" --prefix=/usr/local after ./configure, what does it means ? It means everything goes in /usr/local ? Or every libs are there ? And what doeas it means --enabled-shared ?

Many Thanks

@lu-zero
Copy link
Owner

lu-zero commented Apr 19, 2015

In general you can use everything from the distribution repository.

apt-get build-dep libav-tools should get you all the dependencies you need in an easy way if you just need a recent libav and the dependencies aren't too old.

apt-get install libavformat-dev libswscale-dev should be all you need, ibavresample-dev and libavscale-dev are not needed yet =)

If you want something custom you can install it in /usr/local (that's the default) and then you need to make sure /usr/local/lib and /usr/local/include are in the right priority (and make sure PKG_CONFIG_PATH is set correctly).

@AlexandreLicinio
Copy link
Author

Ok, thanks Luca. I understand better now.

I do lot of tests with bmdtools and avconv to capture with 2 decklink cards
and play simultaneous one of the feed recorded.
Can i open a new issue about it ? Because when i launch the playout, memory
increases a lot and playout crashes.
I can only record twice in MPEG2 with nut container without crashes because
in x264 it crashes all the time (memory increases too).

Do you think it's possible to do a instant replay solution with bmdtools ?

Cheers,

2015-04-19 13:55 GMT+02:00 Luca Barbato [email protected]:

In general you can use everything from the distribution repository.

apt-get build-dep libav-tools should get you all the dependencies you
need in an easy way if you just need a recent libav and the
dependencies aren't too old.

apt-get install libavformat-dev libswscale-dev should be all you need,
ibavresample-dev and libavscale-dev are not needed yet =)

If you want something custom you can install it in /usr/local (that's the
default) and then you need to make sure /usr/local/lib and
/usr/local/include are in the right priority (and make sure
PKG_CONFIG_PATH is set correctly).


Reply to this email directly or view it on GitHub
#52 (comment).

Alexandre Licinio
Gérant

E__K_L_A INGENIERIE *
*Broadcast engineering

RF . IPTV . IT . LAN . WAN
Hardware & Software R&D

*.yes, we are open-source. *

[email protected]

+33 (0)6 76 10 28 41

50 Avenue Lacassagne
69003 Lyon - France

@lu-zero
Copy link
Owner

lu-zero commented Apr 20, 2015

On Mon, Apr 20, 2015 at 12:08 PM, AlexandreLicinio <[email protected]

wrote:

Ok, thanks Luca. I understand better now.

I do lot of tests with bmdtools and avconv to capture with 2 decklink cards
and play simultaneous one of the feed recorded.
Can i open a new issue about it ? Because when i launch the playout, memory
increases a lot and playout crashes.

That means you do not have enough CPU to do it. I know of people capturing
from 4 different cards at the same time.

Do you think it's possible to do a instant replay solution with bmdtools ?

What do you have in mind?

lu

@AlexandreLicinio
Copy link
Author

But why memory is increasing (viewing with htop) when i'm playing a feed through bmdplay (x264 or mpeg2) with no recording.

avconv -vsync 1 -i udp://@224.0.1.15:5000 -c:v rawvideo -pix_fmt uyvy422 -r 25 -s 1920x1080 -c:a pcm_s16le -ar 48000 -f nut -f_strict experimental -syncpoints none - | bmdplay -m 7 -C 0 -O 4 -b 200 -f pipe:0

i have 16gb ram and e3 xeon 1220v3 (3ghz) [hp server g8v2]

for the instant replay, it could be nice to record one feed or multiple feeds, and instant replay (while recording) one of them with seek (pause, rewind) controled (by usb remote) through bmdplay. To do an evs LSM "like".

i did a test :
bmdcapture feed 1 Card 1 record mpeg2 to output1.nut
bmdcapture feed 2 Card 2 record mpeg2 to output2.nut
through samba server, macos, vlc opens output1.nut or output2.nut (while recording) and can plays it with time control to pause, play, forxward and rewind instantly. It's working good.

@lu-zero
Copy link
Owner

lu-zero commented Apr 20, 2015

I see at least 1 problem in doing that, try to use mkv instead and tell me
if it works better.

On Mon, Apr 20, 2015 at 1:07 PM, AlexandreLicinio [email protected]
wrote:

But why memory is increasing (viewing with htop) when i'm playing a feed
through bmdplay (x264 or mpeg2) with no recording.

avconv -vsync 1 -i udp://@224.0.1.15:5000 -c:v rawvideo -pix_fmt uyvy422
-r 25 -s 1920x1080 -c:a pcm_s16le -ar 48000 -f nut -f_strict experimental
-syncpoints none - | bmdplay -m 7 -C 0 -O 4 -b 200 -f pipe:0

i have 16gb ram and e3 xeon 1220v3 (3ghz)

for the instant replay, it could be nice to record one feed or multiple
feeds, and instant replay (while recording) one of them with seek (pause,
rewind) controled (by usb remote) through bmdplay. To do an evs LSM "like".

i did a test :
bmdcapture feed 1 Card 1 record mpeg2 to output1.nut
bmdcapture feed 2 Card 2 record mpeg2 to output2.nut
through samba server, macos, vlc opens output1.nut or output2.nut (while
recording) and can plays it with time control to pause, play, forxward and
rewind instantly. It's working good.


Reply to this email directly or view it on GitHub
#52 (comment).

@AlexandreLicinio
Copy link
Author

Memory still increasing when bmdplay plays even bmdcapture is off. (fails also when bmdcapture is on).

here the commands lines :

bmdcapture -M 2 -C 0 -m 7 -A 2 -V 4 -F nut -o strict=experimental:syncpoints=none -f pipe:1 | avconv -y -i - -vsync passthrough -vcodec mpeg2video -s 1920x1080 -vf yadif -r 25 -pix_fmt "yuv420p" -b:v 18500k -g 12 -acodec mp2 -ab 320k -ac 2 -ar 48000 input1.mkv

bmdcapture -M 2 -C 1 -m 7 -A 2 -V 4 -F nut -o strict=experimental:syncpoints=none -f pipe:1 | avconv -y -i - -vsync passthrough -vcodec mpeg2video -s 1920x1080 -vf yadif -r 25 -pix_fmt "yuv420p" -b:v 8500k -g 12 -acodec mp2 -ab 320k -ac 2 -ar 48000 input2.mkv

avconv -vsync 1 -i inawvideo -pix_fmt uyvy422 -r 25 -s 1920x1080 -c:a pcm_s16le -ar 48000 -f nut -f_strict experimental -syncpoints none - | bmdplay -m 7 -C 0 -O 4 -b 200 -f pipe:0

@AlexandreLicinio
Copy link
Author

Hello Lu, i'm not lucky with mkv too. And i tried a lot of differents config, formats but still getting memory increasing and bmdplay crashes.

Do you want i test other settings ?

Also, what do you advise to me in cpu / ram config for a nice server. I want to buy new one and install many decklink to do some tests. Bi Xeon e5 ? at least 64gb ram ?

Thanks,

@lu-zero
Copy link
Owner

lu-zero commented Apr 24, 2015

Make sure that the video frame rate matches the output frame rate.

On Fri, Apr 24, 2015 at 3:29 PM, AlexandreLicinio [email protected]
wrote:

Hello Lu, i'm not lucky with mkv too. And i tried a lot of differents
config, formats but still getting memory increasing and bmdplay crashes.

Do you want i test other settings ?

Also, what do you advise to me in cpu / ram config for a nice server. I
want to buy new one and install many decklink to do some tests. Bi Xeon e5
? at least 64gb ram ?

Thanks,


Reply to this email directly or view it on GitHub
#52 (comment).

@leico
Copy link

leico commented Oct 11, 2017

Hi @lu-zero Thanks to publish bmdtools.
I note that missed x264 "library".

# git clone git://github.com/videolan/x264.git
# cd x264
# ./configure
# make
# make install

This way generate x264 binary only.

# ./configure --enable-static --enable-shared
# make
# make install

It generates libx264 and fix libx264 not found when libav configure enabled libx264 flag.

@lu-zero
Copy link
Owner

lu-zero commented Oct 11, 2017

Thank you for your contribution, wiki updated accordingly.

@eyqlator
Copy link

Hi I've a problem and i can't install bmdtools correctly can you help me with this?
emilito@emilito-VirtualBox:/Desktop/bmdtools-master$ sudo make SDK_PATH=/home/emilito/Desktop/bmdtools-master/includeg++ -o bmdcapture bmdcapture.cpp modes.cpp /home/emilito/Desktop/bmdtools-master/include/DeckLinkAPIDispatch.cpp pkg-config --cflags libavcodec libavformat libswscale libavutil -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -Wno-multichar -I /home/emilito/Desktop/bmdtools-master/include -fno-rtti -g pkg-config --libs libavcodec libavformat libswscale libavutil -lm -ldl -lpthread
bmdcapture.cpp: In function ‘AVStream* add_audio_stream(AVFormatContext*, AVCodecID)’:
bmdcapture.cpp:197:5: error: ‘AVCodecParameters’ was not declared in this scope
AVCodecParameters par;
^
bmdcapture.cpp:197:24: error: ‘par’ was not declared in this scope
AVCodecParameters par;
^
bmdcapture.cpp:206:27: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
par = st->codecpar;
^
bmdcapture.cpp: In function ‘AVStream
add_video_stream(AVFormatContext
, AVCodecID)’:
bmdcapture.cpp:220:5: error: ‘AVCodecParameters’ was not declared in this scope
AVCodecParameters par;
^
bmdcapture.cpp:220:24: error: ‘par’ was not declared in this scope
AVCodecParameters par;
^
bmdcapture.cpp:229:27: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
par = st->codecpar;
^
bmdcapture.cpp: In function ‘AVStream
add_data_stream(AVFormatContext
, AVCodecID)’:
bmdcapture.cpp:254:5: error: ‘AVCodecParameters’ was not declared in this scope
AVCodecParameters *par;
^
bmdcapture.cpp:254:24: error: ‘par’ was not declared in this scope
AVCodecParameters *par;
^
bmdcapture.cpp:263:15: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
par = st->codecpar;
^
Makefile:58: recipe for target 'bmdcapture' failed
make: *** [bmdcapture] Error 1
emilito@emilito-VirtualBox:
/Desktop/bmdtools-master$

And.....

emilito@emilito-VirtualBox:~/Desktop/bmdtools-master$ pkg-config --libs libavcodec libavformat libswscale libavutil
-lavcodec-ffmpeg -lavformat-ffmpeg -lswscale-ffmpeg -lavutil-ffmpeg

And...

head /usr/include/libavformat/avformat.h
/*

  • copyright (c) 2001 Fabrice Bellard
  • This file is part of FFmpeg.
  • FFmpeg is free software; you can redistribute it and/or
  • modify it under the terms of the GNU Lesser General Public
  • License as published by the Free Software Foundation; either
  • version 2.1 of the License, or (at your option) any later version.

And last....

emilito@emilito-VirtualBox:~/Desktop/bmdtools-master$ sudo apt-get install libavformat-dev libswscale-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libavformat-dev is already the newest version (7:2.8.11-0ubuntu0.16.04.1).
libswscale-dev is already the newest version (7:2.8.11-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 192 not upgraded.

What happens??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants