atyenoria / janus-webrtc-gateway-docker

Perfect Docker Image for Media Streaming Expert User ( https://github.com/meetecho/janus-gateway )
687 stars 200 forks source link

Build fails postprocessing/janus_pp_rec-pp-h264.o #8

Closed Bhlowe closed 6 years ago

Bhlowe commented 6 years ago

Makefile:2007: recipe for target 'postprocessing/janus_pp_rec-pp-h264.o' failed make[2]: *** [postprocessing/janus_pp_rec-pp-h264.o] Error 1

This is on a new amazon linux running Docker version 17.03.2-ce

I also would love a pre-built docker file posted to hub.docker.com

Bhlowe commented 6 years ago

Disabling post-processing "fixes" the problem.. Dockerfile: change --enable-post-processing to --disable-post-processing

atyenoria commented 6 years ago

Thank you for your feedback. Unfortunately, I can't replicate the error. And, if you do --disable-post-processing, you can't use the recording feature of Janus. So, I don't recommend that.

relrix commented 6 years ago

I had the same issue - here is the error signature:

postprocessing/pp-h264.c:91:28: error: 'CODEC_FLAG_GLOBAL_HEADER' undeclared (first use in this function) vStream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; ^ postprocessing/pp-h264.c:91:28: note: each undeclared identifier is reported only once for each function it appears in postprocessing/pp-h264.c: In function 'janus_pp_h264_process': postprocessing/pp-h264.c:384:41: error: 'FF_INPUT_BUFFER_PADDING_SIZE' undeclared (first use in this function) memset(received_frame + frameLen, 0, FF_INPUT_BUFFER_PADDING_SIZE); ^ postprocessing/pp-h264.c: In function 'janus_pp_h264_close': postprocessing/pp-h264.c:417:2: warning: 'codec' is deprecated (declared at /usr/local/include/libavformat/avformat.h:876) [-Wdeprecated-declarations] if(vStream != NULL && vStream->codec != NULL) ^ postprocessing/pp-h264.c:418:3: warning: 'codec' is deprecated (declared at /usr/local/include/libavformat/avformat.h:876) [-Wdeprecated-declarations] avcodec_close(vStream->codec); ^ postprocessing/pp-h264.c:420:3: warning: 'codec' is deprecated (declared at /usr/local/include/libavformat/avformat.h:876) [-Wdeprecated-declarations] av_free(fctx->streams[0]->codec); ^ make[2]: [postprocessing/janus_pp_rec-pp-h264.o] Error 1 Makefile:2007: recipe for target 'postprocessing/janus_pp_rec-pp-h264.o' failed make[2]: Leaving directory '/janus-gateway' make[1]: [all-recursive] Error 1 Makefile:2381: recipe for target 'all-recursive' failed make[1]: Leaving directory '/janus-gateway' make: *** [all] Error 2

CODEC_FLAG_GLOBAL_HEADER and other constants are missing declaration in ffmpeg source. Is there an easy way to fix it ?

atyenoria commented 6 years ago

Okay, I will investigate it much more deeply.

danotrilogic commented 6 years ago

Hi, I get the same error, hope you find the fix soon.

danotrilogic commented 6 years ago

Hi, I finally fixed the issue, first I cloned the janus project and replaced all occurrences of CODEC_FLAG_GLOBAL_HEADER by AV_CODEC_FLAG_GLOBAL_HEADER and all occurrences of FF_INPUT_BUFFER_PADDING_SIZE by AV_INPUT_BUFFER_PADDING_SIZE. After this change everything compiled flawlessly.

atyenoria commented 6 years ago

hi @danotrilogic Thank you for the solution. Can you create the PR if possible ?

atyenoria commented 6 years ago

OK. I checked it. Fixed. https://github.com/meetecho/janus-gateway/issues/1094