Export bug: export to mpeg4 stops after some image clips

Timeline exporting stops prematurely when rendering timeline to mpeg4 AVI (Medium Quality, PAL, 720x576, high).
Export to mpeg2 (DVD VOB PAL) is OK.
For this trivial project (just 4 gif pictures, all 2 sec) it stops after the second picture (ie it rendered just the first two pictures).
The same failure appears when rendering selection (where selection is wider then just 2 first gifs)

The rendering progressbar stops at 50%.

No warning or error message appeared in console stdout.

For another, more complex, project it stops on the first (!) gif, it renders just the very first sequence of timeline, just the first GIF.
So the export length may vary from project to project.

Number of rendered image differs from project to project, but it is always the same for the given project!

MLT bug?
This is a serious bug, show stopper.

FFmpeg SVN version:
Revision: 9470
Last Changed Date: 2007-07-03 18:59:28 +0100 (Tue, 03 Jul 2007)
MLT SVN version:
Revision: 1005
Last Changed Date: 2007-07-01 19:17:44 +0100 (Sun, 01 Jul 2007)
MLT++ SVN version:
Revision: 1005
Last Changed Date: 2007-06-12 07:00:29 +0100 (Tue, 12 Jun 2007)
Kdenlive SVN version:
Revision: 1627
Last Changed Date: 2007-07-04 08:55:11 +0100 (Wed, 04 Jul 2007)

Forums:

The same problem with JPEGs.
I even more reduced the project file (just one video track, no virtual folder etc.):

With the mpeg4 Low and Medium quality options it is OK!
Only the hight quality is affected.
Strange..

OK, so this is a MLT/FFmpeg bug.

inigo ~/video/test14.kdenlive # OK, played full
inigo ~/video/test14.kdenlive \
  -consumer avformat:~/video/test14.avi real_time=0 \
  format=avi video_rc_min_rate=0 video_bit_rate=8000000 audio_bit_rate=384000 frequency=48000 \
  size=720x576 vcodec=mpeg4 mbd=2 trell=1 v4mv=1 progressive=1

Output:

..
inigo: ratecontrol.c:756: ff_rate_estimate_qscale: Assertion `q>0.0' failed.
Aborted

Assertion `q>0.0' failed ..this seems somewhat familiar to me, there are more bug reports concerning this.

viewtopic.php?f=16&t=30&start=40

Seems to be fixed with the latest FFmpeg Revision: 9505.
Hooray!