Great post, great information, cheers :)
On the issue of forcing keyframes, I intend to do some testing fo this
stuff with h264. Im interested what the simple apple 'export to ipod'
option does with keyframes.
The stuff about streaming, and users waiting many seconds to see the
video, will generally not apply to progressive download that
videobloggers use, because they will always get the keyframe at the
start of the video, as opposed to a live stream where I may join the
stream at a moment in time which is lacking in keyframes. It probably
does affect how well people can jump forwards in time in the video,
but I need to test this more. The random blocky frame issue with
apples encoder is certainly a reason to force keyframes, but ideally
and hopefully (pending result of tests) most people will be abl to
leave it on auto in the future if the move to h264 happens and the
scrubbing issues arent too noticable.
In theory forcing keyframes limits the encoders ability to make
optimal quality at a given bitrate, but in practise you may get a more
consistent quality. Thinking about it , a possible reason why it gives
you better results for anything you throw at it without having to
tweak, may be because the encoder in inclined to be too conservative.
When left to put keyframes where it wants, it may miss a scene change
that should have a new keyframe, and it may overcompress slightly more
than is ideal. By forcing keyframes every so often, you are
interfering with its temporal compression, that is time compression,
making it less efficient in terms of filesize but also less likely to
get carried away and skimp on keyframes/overcompress.
I agree with you about the bitrate issues. It is worth noting however
that the bitrate that quicktime tells us is the bitrate of a video, is
actually the average bitrate. Depending on encoder settings, most
peoples stuff is likely variable bitrate, so at some moments in time
your 700kbits/sec video might be 400kbits/sec and at other times
1200kbits/sec. Again this isnt an issue most will need to worry about,
it would be more important if we wanted a progressive download
experience that looks just streaming for all users on a certain
connection speed or higher. Unfortunately I cant find suitable free or
cheap tools that do mp4 analysis to show bitrate. This is the same
sort of stuff as pro dvd authoring houses will use to analyse mpeg2
streams and optimise each scene as much as possible for available
bandwidth. Because its pro and most normal people dont need to go to
these lengths, no cheap tools exist that Ive found, only scenescope
while is loadsamoney.
Steve of Elbows
--- In videoblogging@yahoogroups.com, Verdi [EMAIL PROTECTED] wrote:
On Oct 24, 2005, at 2:10 AM, Adrian Miles wrote:
i haven't seen michael's latest guide but if it still suggests
forcing keyframes at the rate of every n frmaes then yes, your
results will be poor in terms of final file size. H.264 and 3.ivx
both support natural keyframes. enabling this is much better and
usually leads to smaller file sizes with little or no loss in quality.
Yeah, my latest tutorial has people set the keyframes to every 75
frames as per the 3ivx website:
URL: http://www.3ivx.com/support/mac/encoding/
quicktime.html#force_keyframe
Force keyframe after ... delta frames
In normal operation the encoder will insert keyframes for scene
changes or where a keyframe would result in a more efficient encode.
But in order to promote random access it is sometimes necessary to
insert keyframes more regularly. The codec will insert a keyframe if
it has outputted this many non-keyframes in a row. By setting this
value to 0 you can produce an all keyframe video, which could be
usefull for an editing format, similar to DV. Keyframes are also
usefull for streaming broadcasts, as a user can normally only begin
watching a stream after receiving a keyframe, if the stream was
25fps, and keyframes were only inserted after 250 frames (worst case)
then the user might have to wait 10 seconds before seeing the stream
(worst case).
300 is the default value for normal video tasks, for streaming we
recommend a keyframe every 5 seconds (fps times 5).
In the past I've recommended forcing keyframes frames for a couple of
reasons. If you're using Apple's mpeg4 codec it will prevent the
random blocky frame. Videos by JD Lasica come to mind here. If you
watch some of his videos you will see a decent image become really
blocky for one frame every 10 - 15 sec. By forcing the keyframes to
something like every 5 this problem goes away without a large
increase in file size when compressing at around 600kbits/sec. Now,
I know that's much higher than you like and forcing the keyframe
makes a larger difference in terms of file size at lower bit rates.
FWIW, a file with keyframes every 5 frames (or 75 frames for that
matter) is much more responsive when