After getting some feedback for
QTV during Dreamhack, few new things have been added to the
ezQuake to finetune the QTV playback. Continue reading to learn more.
REQUIREMENT: ezQuake 1.9 stable
QTV_BUFFERTIME 0.5Basically defines the amount of buffer ezQuake buffers from QTV stream and the default value is set to 0.5 (500ms). You can try changing this to different values but notice that 0.2 (200ms) is the lowest allowed value.
QTV_ADJUSTBUFFER 0/1Enables automatic finetuning of the QTV_BUFFERTIME buffer. This means that your client is trying to keep the set QTV_BUFFERTIME by variating playback speed. So if the buffer falls short of 500ms it will slow down the playback and if the buffer gets excessive for some reason then the playback speed is increased. After the buffer level is back on the configured value, 100% playback speed is set. NOTE: Enabling this feature limits QTV_BUFFERTIME to a minimum of 0.5 (500ms) while higher values can still be set.
QTV_ADJUSTLOWSTARTTells QTV_ADJUSTBUFFER when to start slowing down the playback speed of the stream so buffer level can climb back to normal. The value 0.8 means 80% of the configured buffertime, for example if you have set the buffertime to 0.5 (500ms) then it would start slowing the playback speed at buffer level of 0.8*500ms=400ms mark until the buffer reaches 500ms again.
QTV_ADJUSTHIGHSTARTTells QTV_ADJUSTBUFFER when to start speeding up the playback speed of the stream so buffer level can fall down to normal. The value 1.2 means 120% of the configured buffertime, for example if you have set the buffertime to 0.5 (500ms) then it would start speeding up the playback speed at buffer level of 1.2*500ms=600ms until the buffer reaches 500ms again.
WARNING: Do not set too low value for lowstart and too high value for highstart. Setting too low value for lowstart could mean running out of the buffer before enough slowdown has happened and in this case, playback would pause for a moment. Setting too high value for highstart causes more lag on giving commands (cmd users) and chatting.
RECOMMENDATION: Leave the values at 1 (100%) or change them by 20%-30% at the most.
QTV_ADJUSTMINSPEEDDefines the slowest possible playback speed when starting to run out of buffer. Value 1 means 100% speed and value 0.5 means 50% of the normal playback speed.
NOTE1: Not allowing to slow down enough, buffer level might still drop down to zero if there were longer network lag. This causes pausing during playback.
NOTE2: Allowing to slow down too much is noticeable!
QTV_ADJUSTMAXSPEEDDefines the highest possible playback speed during excessive buffertime. Again, value 1 means 100% playback speed while 1.5 means 150% of the normal speed.
NOTE1: Usually during map changes the buffertime becomes exessive. This starts to delay chat and commands at some point.
NOTE2: Too high playback speed is really noticeable!
RECOMMENDATIONS:Let the speed variate less over longer periods of time. For example 5-10% playback speed increase/decrease over 2 seconds isn't as noticeable as 25% speed increase over half seconds. Minspeed should be 0.9 - 0.95 while maxspeed should be 1.05 - 1.10.
All of this info can also be found from QTV
wiki but it's explained better here. Try experimenting different values for the best performance. I personally use default buffertime, default low/highstart and 0.9 minspeed and 1.1 maxspeed. With these changes the chat will not get delayed and most of the time I get no buffer underruns (pauses) but 500ms is still quite a short time for these values so I might want to consider actually increasing the qtv_buffertime a bit.
Client command
scr_qtvbuffer 1 gives more detailed statistics about the buffer size and demo playback speed.