How do i run cli tools when running with Docker?

Hello, i have uploaded a video but this time it does not start the transcoding for it
it says The video is being transcoded, it may not work properly.
so i looked at the documentation and saw that we can use cli tools for it
but i am using docker so i entered the docker shell and ran
NODE_CONFIG_DIR=/app/config NODE_ENV= npm run create-transcoding-job -- -v 92c13d83-ee86-4068-9ba1-adb980bde4a6

but i get this error

> peertube@2.4.0 create-transcoding-job /app
> node ./dist/scripts/create-transcoding-job.js "-v" "92c13d83-ee86-4068-9ba1-adb980bde4a6"

{ SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432
    at Client.connection.connect.err [as _connectionCallback] (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:170:24)
    at Client._handleErrorWhileConnecting (/app/node_modules/pg/lib/client.js:296:19)
    at Client._handleErrorEvent (/app/node_modules/pg/lib/client.js:306:19)
    at Connection.emit (events.js:198:13)
    at Socket.reportStreamError (/app/node_modules/pg/lib/connection.js:53:12)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  name: 'SequelizeConnectionRefusedError',
  parent:
   { Error: connect ECONNREFUSED 127.0.0.1:5432
       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
     errno: 'ECONNREFUSED',
     code: 'ECONNREFUSED',
     syscall: 'connect',
     address: '127.0.0.1',
     port: 5432 },
  original:
   { Error: connect ECONNREFUSED 127.0.0.1:5432
       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
     errno: 'ECONNREFUSED',
     code: 'ECONNREFUSED',
     syscall: 'connect',
     address: '127.0.0.1',
     port: 5432 } }
npm ERR! code ELIFECYCLE

Pls HALP

EDIT: okey it works changing the NODE_CONFIG_DIR=/app/config to NODE_CONFIG_DIR=/config

but the transcoding only runs about 2sec then it stops
and then it show this in the logs

error[11/6/2020, 5:15:24 AM] Error in transcoding job.
{
  "stdout": "",
  "stderr": "ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers\n  built with gcc 8 (Debian 8.3.0-6)\n  configuration: --prefix=/usr --extra-version='1~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\n  libavutil      56. 22.100 / 56. 22.100\n  libavcodec     58. 35.100 / 58. 35.100\n  libavformat    58. 20.100 / 58. 20.100\n  libavdevice    58.  5.100 / 58.  5.100\n  libavfilter     7. 40.101 /  7. 40.101\n  libavresample   4.  0.  0 /  4.  0.  0\n  libswscale      5.  3.100 /  5.  3.100\n  libswresample   3.  3.100 /  3.  3.100\n  libpostproc    55.  3.100 / 55.  3.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/videos/92c13d83-ee86-4068-9ba1-adb980bde4a6-1080.mp4':\n  Metadata:\n    major_brand     : isom\n    minor_version   : 512\n    compatible_brands: isomiso2avc1mp41\n    encoder         : Lavf58.20.100\n  Duration: 00:05:33.95, start: 0.166000, bitrate: 35087 kb/s\n    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35083 kb/s, 29.89 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)\n    Metadata:\n      handler_name    : VideoHandler\n    Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 128 kb/s (default)\n    Metadata:\n      handler_name    : SoundHandler\n    Side data:\n      audio service type: main\nStream mapping:\n  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n  Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))\nPress [q] to stop, [?] for help\n[libx264 @ 0x55fab1c21c00] using SAR=1/1\n[libx264 @ 0x55fab1c21c00] frame MB size (120x68) > level limit (3600)\n[libx264 @ 0x55fab1c21c00] DPB size (4 frames, 32640 mbs) > level limit (2 frames, 18000 mbs)\n[libx264 @ 0x55fab1c21c00] MB rate (244800) > level limit (108000)\n[libx264 @ 0x55fab1c21c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n[libx264 @ 0x55fab1c21c00] profile High, level 3.1\n[libx264 @ 0x55fab1c21c00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=16 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=5200 vbv_bufsize=10400 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00\nframe=   60 fps= 60 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=3 drop=0 speed=N/A    \nframe=   79 fps= 52 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=3 drop=0 speed=N/A    \nframe=   98 fps= 49 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=3 drop=0 speed=N/A    \nframe=  118 fps= 45 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=3 drop=0 speed=N/A    \nframe=  134 fps= 43 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=4 drop=0 speed=N/A    \nframe=  157 fps= 43 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=4 drop=0 speed=N/A    \nframe=  166 fps= 39 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=4 drop=0 speed=N/A    \nframe=  184 fps= 38 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=4 drop=0 speed=N/A    \nToo many packets buffered for output stream 0:0.\n[libx264 @ 0x55fab1c21c00] frame I:4     Avg QP:25.42  size: 85572\n[libx264 @ 0x55fab1c21c00] frame P:29    Avg QP:28.42  size: 45428\n[libx264 @ 0x55fab1c21c00] frame B:96    Avg QP:30.14  size: 16007\n[libx264 @ 0x55fab1c21c00] consecutive B-frames:  5.3%  3.1%  4.6% 18.3% 26.7% 36.6%  5.3%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%\n[libx264 @ 0x55fab1c21c00] mb I  I16..4: 15.7% 73.2% 11.1%\n[libx264 @ 0x55fab1c21c00] mb P  I16..4: 11.2% 26.6%  3.4%  P16..4: 34.5%  9.5%  2.8%  0.0%  0.0%    skip:12.1%\n[libx264 @ 0x55fab1c21c00] mb B  I16..4:  0.8%  2.0%  0.2%  B16..8: 40.8%  6.1%  0.8%  direct: 2.8%  skip:46.5%  L0:46.6% L1:48.7% BI: 4.7%\n[libx264 @ 0x55fab1c21c00] 8x8 transform intra:66.8% inter:85.7%\n[libx264 @ 0x55fab1c21c00] coded y,uvDC,uvAC intra: 47.4% 55.6% 19.8% inter: 15.2% 18.3% 0.4%\n[libx264 @ 0x55fab1c21c00] i16 v,h,dc,p: 23% 20%  8% 49%\n[libx264 @ 0x55fab1c21c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 17% 17%  5%  7% 10%  7%  5%  9%\n[libx264 @ 0x55fab1c21c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 20% 13%  5%  9% 10%  8%  5%  6%\n[libx264 @ 0x55fab1c21c00] i8c dc,h,v,p: 58% 18% 19%  6%\n[libx264 @ 0x55fab1c21c00] Weighted P-Frames: Y:0.0% UV:0.0%\n[libx264 @ 0x55fab1c21c00] ref P L0: 67.3% 21.4% 11.3%\n[libx264 @ 0x55fab1c21c00] ref B L0: 96.3%  3.7%\n[libx264 @ 0x55fab1c21c00] ref B L1: 99.1%  0.9%\n[libx264 @ 0x55fab1c21c00] kb/s:5946.66\nConversion failed!\n"
}
error[11/6/2020, 5:15:24 AM] Cannot execute job 907 in queue video-transcoding.
{
  "payload": {
    "type": "optimize",
    "videoUUID": "92c13d83-ee86-4068-9ba1-adb980bde4a6",
    "isNewVideo": false
  },
  "err": {
    "stack": "Error: ffmpeg exited with code 1: Conversion failed!\n\n    at ChildProcess.<anonymous> (/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)\n    at ChildProcess.emit (events.js:198:13)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)",
    "message": "ffmpeg exited with code 1: Conversion failed!\n"
  }
}

Hello,

For the transcoding fail, this is a bug that we’ll fix in v3.

1 « J'aime »