Page MenuHome

Crash when rendering to Quicktime RLE codec
Closed, ResolvedPublic


System Information
Arch Linux, NVIDIA Quadro K5100M

Blender Version
Broken: 2.79 official and a51688d0b06
Worked: 2.78c

Short description of error
When rendering to a movie format using FFMPEG on a .blend file that was created at or before Blender 2.78c, Blender will crash if you choose to use the Quicktime RLE codec.

I made a debug build of a51688d0b06 and got the following GDB backtrace:

(gdb) bt
#0  0x00007fffeaa038a0 in raise () from /usr/lib/
#1  0x00007fffeaa04f09 in abort () from /usr/lib/
#2  0x00007ffff07cdaac in ?? () from /usr/lib/
#3  0x00007ffff07e6ea2 in av_image_copy () from /usr/lib/
#4  0x00007ffff07dfc91 in av_frame_copy () from /usr/lib/
#5  0x00007ffff07e0255 in av_frame_ref () from /usr/lib/
#6  0x00007ffff0fc5e72 in ?? () from /usr/lib/
#7  0x00007ffff1084e68 in avcodec_encode_video2 ()
   from /usr/lib/
#8  0x000055555825a98b in write_video_frame (context=0x7fffd25a5008,
    rd=0x7fffbc509490, cfra=0, frame=0x7fffd2582a00, reports=0x7fffc4f0be58)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:328
#9  0x000055555825cd8a in BKE_ffmpeg_append (context_v=0x7fffd25a5008,
    rd=0x7fffbc509490, start_frame=775, frame=775, pixels=0x7fffac7cf6c8,
    rectx=1920, recty=1080, suffix=0x55555bd363a4 "", reports=0x7fffc4f0be58)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:1241
#10 0x00005555578cf640 in RE_WriteRenderViewsMovie (reports=0x7fffc4f0be58,
    rr=0x7fffc1903670, scene=0x7fffccf5d808, rd=0x7fffbc509490,
    mh=0x55555d95fee0 <mh>, movie_ctx_arr=0x7fffd2583008, totvideos=1,
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3446
#11 0x00005555578cf97c in do_write_image_or_movie (re=0x7fffbc508008,
    bmain=0x7fffccee3f08, scene=0x7fffccf5d808, mh=0x55555d95fee0 <mh>,
    totvideos=1, name_override=0x0)
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3494
#12 0x00005555578d06fc in RE_BlenderAnim (re=0x7fffbc508008,
    bmain=0x7fffccee3f08, scene=0x7fffccf5d808, camera_override=0x0,
    lay_override=0, sfra=775, efra=3058, tfra=1)
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3768
#13 0x000055555779efa6 in render_startjob (rjv=0x7fffd3688448,
    stop=0x7fffd364bcfc, do_update=0x7fffd364bcfa, progress=0x7fffd364bd00)
    at /home/jason_vangumster/src/blender/blender/source/blender/editors/render/render_internal.c:604
#14 0x00005555571efc4f in do_job_thread (job_v=0x7fffd364bc88)
    at /home/jason_vangumster/src/blender/blender/source/blender/windowmanager/intern/wm_jobs.c:337
#15 0x000055555857bab9 in tslot_thread_start (tslot_p=0x7fffd7aa6908)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenlib/intern/threads.c:253
#16 0x00007fffeaf9108a in start_thread () from /usr/lib/
#17 0x00007fffeaac51bf in clone () from /usr/lib/

Exact steps for others to reproduce the error

  1. Open Blender
  2. Load the startup.blend attached to this report
  3. In the Output panel of Render Properties, change Format to FFMPEG video
  4. In the Encoding panel, change codec to QT rle/Quicktime Animation (container and audio codec don't seem to matter)
  5. Render animation (Ctrl+F12)
  6. Observe crash

Crash was confirmed on IRC by @jens verwiebe (jensverwiebe)

Event Timeline

LazyDodo (LazyDodo) triaged this task as Confirmed, Medium priority.

Can repro this on windows as well.

I use a quickfix for now cause it seems rle is always handled/expected with alpha in blender:

diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index a19e414..57dbbe8 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -648,9 +648,9 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
        if (codec_id == AV_CODEC_ID_QTRLE) {
-               if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+//             if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = AV_PIX_FMT_ARGB;
-               }
+//             }
        if (codec_id == AV_CODEC_ID_PNG) {


I can confirm this is still an issue in current master (3994084e6a33a32b111188b91c28440181405f1d).

As a workaround, select RGBA as color model in Blender. It basically does the same as @jens verwiebe (jensverwiebe) 's fix, without having to touch the C code and rebuild Blender.

@Sybren A. Stüvel (sybren) can you fix this then? It shouldn't be too hard to just always write RGBA under the hood if that is all we support.

@Luciano Muñoz Sessarego (looch) I also fixed it properly in D5174. It's probably safest to keep that for 2.81, but then writing RGB is also possible with QTRLE (and it is also a bit faster).

next time i see you ill kiss ya!

Writing RGB with QTRLE is now also possible, as D5174 is now in master. And WebM+VP9 also has proper alpha support now.