0

I have the following command:

ffmpeg -loglevel verbose -y \
-i "https://my.domain/workspaces/473/RFP-107718.mp4" \
-i "https://my.domain/workspaces/473/margaritaville/palm_beach.png" \
-filter_complex "[0]drawbox=x=0:y=0:w=iw:h=ih:color=#FF0000@1:t=fill[padded];[0]format=yuva420p,pad=iw*2:ih*2:color=black@0,zoompan=z='if(lt(it,0),2,if(lte(pzoom,1.0),2,max(1.58,pzoom-0.005526315789473683)))':x=0:y=0:d=1:s=1920x1080[zp],[padded][zp]overlay=x='if(lt(t,3.04),t*20/3.04,20)':y='if(lt(t,3.04),t*18/3.04,18)':eval=frame[zp_stream],[1:v]scale=502:-1 [image1],[zp_stream][image1] overlay=1051.5078125:53.28906249999999:enable='between(t,0,10.048)' [overlay1]" -map "[overlay1]" -pix_fmt yuv420p -map 0:a -c:a copy "/usr/src/app/output/RFP-107718.mp4"

If i run it locally works without any errors, but when i run on Docker container i have the following error:

ffmpeg version 4.1.9-0+deb10u1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version=0+deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://dev-cdn.connected-stories.com/workspaces/473/RFP-107718.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: isommp41mp42
    creation_time   : 2022-04-15T18:31:51.000000Z
  Duration: 00:00:29.99, start: 0.000000, bitrate: 8207 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 7877 kb/s, 59.98 fps, 60 tbr, 60k tbn, 120k tbc (default)
    Metadata:
      creation_time   : 2022-04-15T18:31:51.000000Z
      handler_name    : Core Media Video
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2022-04-15T18:31:51.000000Z
      handler_name    : Core Media Audio
Input #1, png_pipe, from 'https://dev-cdn.connected-stories.com/workspaces/473/margaritaville/palm_beach.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 1210x240 [SAR 2834:2834 DAR 121:24], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 (h264) -> drawbox
  Stream #0:0 (h264) -> format
  Stream #1:0 (png) -> scale
  overlay -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_zoompan_3 @ 0x40006c2500] [Eval @ 0x40018421e0] Unknown function in 'it,0),2,if(lte(pzoom,1.0),2,max(1.58,pzoom-0.005526315789473683)))'
[Parsed_zoompan_3 @ 0x40006c2500] Failed to configure output pad on Parsed_zoompan_3
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!

My local version is 5.0.1 on mac os, the container one is 4.1.9 on ubuntu

Here the docker file:

FROM node:16

ENV NODE_ENV=production

RUN apt-get -y update && \
    apt-get install -y  ffmpeg \
    build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev 

WORKDIR /usr/src/app
COPY . .
RUN npm ci --production --silent

CMD node src/index.js

Any hint to solve the issue is appreciated!

Thanks.

1 Answer 1

0

Edit: it is available from v4.4 onwards, so upgrade.

Escape the commas, e.g.

if(lt(t,3.04),t*20/3.04,20) becomes if(lt(t\,3.04)\,t*20/3.04\,20)

1
  • Hi @Gyan, thanks for the reply. I already tried that, but i have exactly the same error, although I added the single quote to the z expression, so the escaping should not be necessary. Aug 8, 2022 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.