[Kdenlive-devel] IPB frame order and possible link to my "jerking" video?
Dan Dennedy
dan at dennedy.org
Wed Jun 6 17:56:59 UTC 2007
On Saturday 02 June 2007 11:40:16 am Jan Uhlir wrote:
First of all, let me explain something about MLT and its history... I would
not even expect to generate DVD compliant output directly from kdenlive/MLT
at this time. MLT was written firstly and with priority given to
*uncompressed* output. I have even hardly used the ffmpeg-based output
module, and I already know of some limitations and flaws. I have on my TODO
for MLT to revisit the avformat (ffmpeg) module.
For starters, it does not provide for any sort interlace-based encoding as is
typical with DVD Video output. Therefore, you should be deinterlacing until
this is fixed. Without it, you will get a lot of compression artifacts on
inter-field motion. Try adding progressive=1 to the kdenlive export profile.
> Avidemux exported sequence, non-jerking video:
Avidemux has placed much emphasis on encoding and output, particularly DVD
Video.
> Frames sequnce
> I(06) B(08) B(08) P(06) B(08) B(08) P(06) B(08) B(07) P(06) B(08) B(07)
> I(06)
>
> I frame i every 12 frame, so GOP = 12 ?
> B frames present, interesting.
>
> Image size 720x 576
> Frame Rate 25.000 fps
> # of frames 332 frames
> Codec 4CC MPEG
> Video duration 00:00:13.280
> Aspect Ratio Pal 4:3 (16:15)
>
> Extra properties:
> Packed Bitstream No
> Quartel Pixel No
> GMC No
>
> Audio:
> Codec AC3
> Channels STEREO
> Bitrate 32000 Bps / 256 kbps
> Frequency 48000 Hz
> Audio duration 00:00:13.472
> VBR No
>
>
> Kdenlive rendered, jerking video, the same clip:
> I(31) P(18) P(12) P(08) P(06) P(06) P(06) P(06) P(06) P(06) P(04) P(04)
The "(31)" after the first frame (I) indicates quantisation, and 31 is the max
quantisation. That explains the very poor quality at the beginning, but it
might be a bug in consumer_avformat; I do not yet know.
> P(06) P(06) P(06) I (06) I frame i every 15 frame, so GOP = 15 (as was set
> in render profile) There are no B frames at all!
In the kdenlive export profile you can add b_frames=2, and it should output
with b frames.
> Image size 720x 576
> Frame Rate 25.000 fps
> # of frames 320 frames (12 frames missing, interesting!)
Hmm.. is kdenlive adding real_time=0 to all export consumers? It should. If
not, or to be sure, try adding real_time=0 to the export profile. Realtime
behaviour will drop video frames when computer can not output fast enough. It
should only be used for monitoring scenarios (playback) and turned off for
transcoding.
> Codec 4CC MPEG
> Video duration 00:00:12.800
> Aspect Ratio Pal 4:3 (16:15)
>
> Extra properties:
> Packed Bitstream No
> Quartel Pixel No
> GMC No
>
> Audio:
> Codec AC3 (MP2 also tested)
> Channels STEREO
> Bitrate 56000 Bps / 448 kbps (128, 192, 256 kbps also tested)
> Frequency 48000 Hz
> Audio duration 00:00:12.768
> VBR No
>
> forum.doom9.org: GOP's: I, P, and B frames explained...
> http://forum.doom9.org/archive/index.php/t-19436.html
>
> This information is interesting:
>
> I noticed some confusion about B frames, so I thought I would write down a
> quick explaination of an MPEG "GOP", or, "Group Of Pictures", as explained
> to me by a professor ...
> Oh, BTW, in MPEG2 at least, a GOP order is always IPBBPBBPBBIPBBPBB etc
> etc. (pending on your GOP size), but it is always 1 I, 1 P, and 2 B's, then
> you can stack more groups of "PBB"'s in that one GOP if needed (usually up
> to 15 total frames. ...
I do not believe this is correct. It represents a most typical scenario, but
not a requirement AFAIK. I will have to lookup whether DVD Video specifies
usage of b frames.
> This information indicates that Avidemux processed clip (cut and copy
> operation from original stream) is very close to this IBBPBBPBBPBBI..
> order. And this works!
Well, avidemux does not directly use the ffmpeg implementation. It builds upon
it as well as mpeg2enc. I think it is a bit of a stretch to say lack of B
frames is the problem at this point, but it could be.
> Contrary, Kdenlive exported video is IPPPPPPPPIPPPP.. only stuff. No B
> frames at all. May this be related? Is this MTL or Kdenlive specific? What
> avlib parameters I can use to achive desired IBP frames combination?
b_frames=2
Also, I think it would be interesting to work on getting a good quality DV AVI
out of kdenlive and then try using it with mjpegtools mpeg2enc (you can use
Kino as a frontend) to see what the result is.
At this time, I would suggest then just focus on getting a high quality output
from kdenlive and then using avidemux if you want to get good encoded output
to MPEG-2 or MPEG-4.
--
+-DRD-+
More information about the Kdenlive
mailing list