|
![](/i/fill.gif) |
Serge LAROCQUE wrote in message <38B3815C.F9231CDC@hotmail.com>...
>> >Sorry to be a pain but could you send me these explanations of what this
>> >files is/does too?
>
>me too please :)
>
>@+
>
We're now upto three requests, I'll post the info here.
** First things first, read the CMPEG.DOC file that comes with CMPEG, it
tells you what you can and can't do with I, P and B frames. But the three
important ones are: (I believe the first two are CMPEG issues and not MPEG
standards)
1) no more than 32 frames specified in the .ctl file.
2) no more than 8 B frames between any I or P frames.
3) your .ctl file cannot finish on a B frame, you put the finishing B
frames before the initial I frame.
** If you are like me, you've probably detached and unzipped the
attachment before getting this far into the email. If not, the following
will explain the creation of the files contained.
[sample1.ctl & sample2.ctl]
The smallest playable mpeg will be created with an initial I frame
followed by P frames until the end of the animation, with changes to the
quality parameter giving your smaller/larger files with lower/better image
quality. (Note: if your animation is not one smooth animation, but a series
of "scenes", you would need an I frame at the beginning of each "scene".)
However, due to the limitations of the CMPEG .ctl files, you are limited
to the approximation of having a repeating sequence of one I frame followed
by 31 P frames [sample1.ctl]. This leads to a small MPEG file (especially
with lower quality settings) but leads to a very noticeable quality jump as
the 31st P frame is followed by an I frame. We can reduce this quality jump
by replacing the last few P frames in the sequence by B frames [sample2.ctl]
which are calculated on future frames as well as past frames.
You still get the quality jump, but it is blurred over 8 frames.
The above works for simple animations, but for others the regular
quality jump every 1.28 seconds (if playback is set to 25 fps) can detract
from the animation, so I went back to modifying the original ipb.ctl file.
[conv.bat, ip_0.ctl ... ip_8.ctl]
ip_0 to ip_8 are just copies of the original ipb.ctl file with the
quality settings changed. For ip_1 to ip_8 the quality settings are:- for
the file ip_N, I frames have quality N, P and B frames have quality 2N.
(ip_0 is a special case where the quality settings are all 1). ip_4.ctl is
exactly the same as ipb.ctl that comes with CMPEG.
conv.bat is just a batch file which encodes a series of MPEG files with
the different .ctl files.
Once I have my animation stills I run conv.bat, then go away and do
something else whilst waiting for it to create the 9 mpeg files. When it has
finished I delete any failed mpeg creations (CMPEG chokes if the bitrate
gets too high, typically happens with ip_0.ctl and ip_1.ctl, but can also
happen on ip_2.ctl, depending on the animation). I then do a visual check on
the remaining files, rejecting those of too poor a quality, then choose
three of the remaining files as high, medium and low quality based on their
file size. (I think the bridge animation posted to p.b.a was either an ip_7
or 8).
** Hope this helps, if CMPEG is choking during the conversion and not
before, I suspect you may just have your quality settings set too high (in
the range 1 to 3) or too many B frames, and CMPEG is running out of memory.
Justin
Post a reply to this message
Attachments:
Download 'cmpeg_ctl_samples.zip' (2 KB)
|
![](/i/fill.gif) |