lu-zero / bmdtools

Basic capture and play programs for Blackmagic Design Decklink
Boost Software License 1.0
198 stars 74 forks source link

Detailed Build Instructions missing #52

Open AlexandreLicinio opened 9 years ago

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

You probably are missing the dev package.

You can use this repository to get the latest libav.

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_audiostream(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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_videostream(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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_datastream(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 = codecid; ^ 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 commented 9 years ago

libavformat-dev missing =)

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

can you please paste the full error?

AlexandreLicinio commented 9 years ago

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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_audiostream(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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_videostream(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 codecid) ^ bmdcapture.cpp: In function ‘AVStream add_datastream(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 commented 9 years ago

Check that avformat exists

ls /usr/include/libavformat/avformat.h

head /usr/include/libavformat/avformat.h

AlexandreLicinio commented 9 years ago

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 /*

lu-zero commented 9 years ago

pkg-config --libs libavcodec libavformat libswscale libavutil

AlexandreLicinio commented 9 years ago

it says :

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

lu-zero commented 9 years ago

-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 commented 9 years ago

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_CONFIGPATH 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 toav_initpacket' /tmp/cc2oGovU.o: In function`DeckLinkCaptureDelegate::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 commented 9 years ago

apt-get install libswscale-dev

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

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

Virtual drinks are always welcome at luca.barbato@gmail.com =)

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

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

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

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

AlexandreLicinio commented 9 years ago

Thanks luka. Realy thanks to you. I wrote an email this morning to you to lu_zero@gentoo.org 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" notifications@github.com a écrit :

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

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93820883.

lu-zero commented 9 years ago

Strange, I didn't get it... On 16 Apr 2015 21:55, "AlexandreLicinio" notifications@github.com wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you to lu_zero@gentoo.org 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" notifications@github.com a écrit :

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

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93820883.

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826032.

AlexandreLicinio commented 9 years ago

You want i use the gmail one ? The gentoo ?

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:57, "Luca Barbato" notifications@github.com a écrit :

Strange, I didn't get it... On 16 Apr 2015 21:55, "AlexandreLicinio" notifications@github.com wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you to lu_zero@gentoo.org 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" notifications@github.com a écrit :

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

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93820883.

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826032.

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826347.

lu-zero commented 9 years ago

Both should be fine On 16 Apr 2015 21:58, "AlexandreLicinio" notifications@github.com wrote:

You want i use the gmail one ? The gentoo ?

Alexandre Licinio - EKLA INGENIERIE

Le 16 avr. 2015 21:57, "Luca Barbato" notifications@github.com a écrit :

Strange, I didn't get it... On 16 Apr 2015 21:55, "AlexandreLicinio" notifications@github.com wrote:

Thanks luka. Realy thanks to you. I wrote an email this morning to you to lu_zero@gentoo.org 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" notifications@github.com a écrit :

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

— Reply to this email directly or view it on GitHub <https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93820883 .

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826032.

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826347.

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93826559.

lu-zero commented 9 years ago

I wrote down this. Hopefully covers everything.

AlexandreLicinio commented 9 years ago

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 notifications@github.com:

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

— Reply to this email directly or view it on GitHub https://github.com/lu-zero/bmdtools/issues/52#issuecomment-93990596.

Alexandre Licinio Gérant

_E__K_LA INGENIERIE Broadcast engineering RF . IPTV . IT . LAN . WAN Hardware & Software R&D

.yes, we are open-source.

alexandre.licinio@ekla.fr

+33 (0)6 76 10 28 41

50 Avenue Lacassagne 69003 Lyon - France

lu-zero commented 9 years ago

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 commented 9 years ago

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

Many Thanks

lu-zero commented 9 years ago

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 commented 9 years ago

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 notifications@github.com:

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 https://github.com/lu-zero/bmdtools/issues/52#issuecomment-94269922.

Alexandre Licinio Gérant

_E__K_LA INGENIERIE Broadcast engineering RF . IPTV . IT . LAN . WAN Hardware & Software R&D

.yes, we are open-source.

alexandre.licinio@ekla.fr

+33 (0)6 76 10 28 41

50 Avenue Lacassagne 69003 Lyon - France

lu-zero commented 9 years ago

On Mon, Apr 20, 2015 at 12:08 PM, AlexandreLicinio <notifications@github.com

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 commented 9 years ago

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 commented 9 years ago

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 notifications@github.com 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 https://github.com/lu-zero/bmdtools/issues/52#issuecomment-94424628.

AlexandreLicinio commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

On Fri, Apr 24, 2015 at 3:29 PM, AlexandreLicinio notifications@github.com 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 https://github.com/lu-zero/bmdtools/issues/52#issuecomment-95932324.

leico commented 6 years ago

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 commented 6 years ago

Thank you for your contribution, wiki updated accordingly.

eyqlator commented 6 years ago

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 -DSTDC_CONSTANT_MACROS -DSTDC_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 /*

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??