remotion-dev / remotion

🎥 Make videos programmatically with React

Home Page:https://remotion.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendering gif on lambda throws colorspace conversion error

petrbela opened this issue · comments

Command was killed with SIGKILL (Forced termination): /var/task/ffmpeg -hide_banner -r 15 -f concat -safe 0 -i /tmp/remotion-filelist0wopewpfqe/video-files.txt -loop -1 -an -c:v gif -filter_complex split[v],palettegen,[v]paletteuse -metadata comment=Made with Remotion 4.0.150 -y /tmp/remotion-filelist0wopewpfqe/video.gif\n' +
      '[matroska,webm @ 0x399d41a0] Auto-inserting h264_mp4toannexb bitstream filter\n' +
      '[aist#0:1/pcm_s16le @ 0x399db850] Guessed Channel Layout: stereo\n' +
      "Input #0, concat, from '/tmp/remotion-filelist0wopewpfqe/video-files.txt':\n" +
      '  Duration: N/A, start: 0.000000, bitrate: N/A\n' +
      '  Stream #0:0: Video: h264, yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1080x1920, 15 fps, 15 tbr, 1k tbn\n' +
      '    Metadata:\n' +
      '      ENCODER         : Lavc60.31.102 libx264\n' +
      '      DURATION        : 00:00:01.334000000\n' +
      '  Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s\n' +
      '    Metadata:\n' +
      '      DURATION        : 00:00:01.334000000\n' +
      'Stream mapping:\n' +
      '  Stream #0:0 (h264) -> split:default\n' +
      '  paletteuse:default -> Stream #0:0 (gif)\n' +
      'Press [q] to stop, [?] for help\n' +
      '[swscaler @ 0x39c88bf0] [swscaler @ 0x39c95b90] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39c88bf0] [swscaler @ 0x399f69f0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39c88bf0] [swscaler @ 0x39a03990] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dc9290] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dd6230] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39cebce0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dc9290] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dd6230] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39cebce0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dc9290] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dd6230] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39cebce0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dc9290] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39dd6230] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x39dbc2f0] [swscaler @ 0x39cebce0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39a03990] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c88bf0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c96d20] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39a03990] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c88bf0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c96d20] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39a03990] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c88bf0] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[swscaler @ 0x399f69f0] [swscaler @ 0x39c96d20] No accelerated colorspace conversion found from yuv420p to bgra.\n' +
      '[matroska,webm @ 0x399d41a0] Auto-inserting h264_mp4toannexb bitstream filter',

Using Remotion 4.0.150. Simply set codec: 'gif' in renderMediaOnLambda. Rendering h264 works fine. Also rendering the gif locally from Remotion Studio works.

Not sure if I was supposed to adjust some other settings but https://www.remotion.dev/docs/render-as-gif seems like it should be just a simple codec swap.

FFmpeg does genuinely seem slow when creating this video and does not manage the memory well.

I'll try to add .avi+rawvideo support so no colorspace conversion needs to happen. #3837

Workaround: Increase memory on Lambda, I do get renders to work with higher resources

Thanks, it does seem to work better with higher memory. I'll test the new version too once it's released.

Cool! Now released in v4.0.153, feel free to give feedback