Ffmpeg in dockerfile failed - 455 Method Not Valid in This State

I created a nodejs app that gets a streaming with FFMPEG to analize it with Opencv3. It is working if I install ffmpeg and opencv in my local.

But now I created a docker image that contains the installation of those libraries and I’m using it as a base to create another image & container where I’m trying to run my app. When I run it inside that container I get this error over and over again when trying to get the stream with an ffmpeg instruction for “method SETUP failed: 455 Method Not Valid in This State”.

This is how I am installing FFMPEG in the image:

RUN mkdir -p /opt/src \
  && curl -Lo /opt/src/ffmpeg-${FFMPEG_VERSION}.tar.gz  http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 \
  && tar -xvf /opt/src/ffmpeg-${FFMPEG_VERSION}.tar.gz -C /opt/src \
  && cd /opt/src/ffmpeg-${FFMPEG_VERSION} \
  && ./configure --enable-gpl --enable-avresample --enable-libopencore-amrnb \
  --enable-libx264 --enable-libxvid --enable-postproc --enable-version3 \
  --enable-shared --enable-pic --extra-ldexeflags=-pie \
  && make -j $(nproc) \
  && make install \
  && ldconfig -v \
  && rm -rf /opt/src

Do you have any idea what this error is and how to fix it? I think it might have to do with the initial configuration on the installation.

Thanks for your help