Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
General Development
 ViewCast Forums : General Development
Subject Topic: Windows Media performance hint Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
usr-local-dick
Newbie
Newbie


Joined: January 07 2004
Location: Netherlands
Posts: 1
Posted: January 08 2004 at 7:39am | IP Logged Quote usr-local-dick

Hi

I use Windows Media Encoder 9 to stream a webcam.
The equipment I use for encoding is:

    * Dell poweredge 2650
    * Dual Xeon 1,8 GHz
    * 512 Mb RAM
    * Osprey 230 video capture card
    * A Sony EVI-D31 Pan/Tilt/Zoom camera
    * Windows Server 2003 Enterprise Edition
    * Windows Media Encoder 9 Series

The streaming server is also W2K3 but not relevant for this issue.

I choose to have 3 streams with these properties:

WindowsMedia 9 audio, CBR, 64 kbit, 44 khz, stereo
WindowsMedia 9 video, CBR, 1018 + 668 + 318 Kbps (total bit rate 1849 kpbs).
The size of the stream is 384 x 288 @ 25 fps (PAL).

Now when I let the encoder run, it will start out fine, with about 50% CPU load, and an average framerate of 25.00 fps.
However, after 10-20 seconds, the average framerate will gradually drop to around 20. If I add another stream (big one - 1500 kbps, total bit rate now 3276 kbps), the CPU does not seem to be bothered by it and stays at 50% load. But the framerate drops further down to 10-15 fps, which looks terrible on the client side.

I was rather dissapointed by this performance, especially after I swapped in so much horsepower for this purpose. After trying numerous settings, I found out that there is a way to encode all the streams at high framerates :)

If you take the .prx file of the previous example, and change the framerate from 25 to 72, the streams get encoded perfectly.
Even the CPU load drops. In my example, the 4-stream session with a total bit rate of 3276 kpbs load the CPU for about 35%, and all the stream get encoded without a glitch.
After some testing, my system was even able to compress a 5-stream session with a total bit rate of about 4 Mbps (take a look at  http://www.terena.nl/~dick/cam2.asx ).

Does anyone know the reason for this strange behaviour?
Setting WME to a framerate that is deliberately higher than the supplied source yields much better results?

Maybe a bug in WME?
I wil post this also to the appropriate WM list.

Best regards,

--
dick visser
[email protected]
Back to Top View usr-local-dick's Profile Search for other posts by usr-local-dick Visit usr-local-dick's Homepage
 
SteveL
Moderator Group
Moderator Group


Joined: December 19 2003
Location: United States
Posts: 14
Posted: January 13 2004 at 4:51pm | IP Logged Quote SteveL

Windows Media Encoder profiles allow the content creator to choose between emphasizing video quality over framerate (video smoothness).  Unfortunately, it's not possible to have your cake and eat it, too, so increasing the quality in one area always means a sacrifice in the other.    I think that this is what is happening in your scenario where the encoder must make a choice between keeping the image quality high or keeping the framerate high.  This keeps the CPU utilization to get maxed out and also prevents the encoder from falling behind.

To illustrate this, start Windows Media encoder and choose "Create a custom encoding session".  Then choose your sources etc., then click the profiles tab & click the manage profiles button.  Find the profile that you're using and copy it, then edit the copied profile.  Give the copied profile a new name, etc, then click next until you get to the "common stream settings" screen.  You'll notice an advanced button there - clicking allows you to adjust the amount of buffering performed on the encoder side.  This is the number of seconds that are stored in memory before encoding begins.  A larger buffer will give better results but the trade-off is more memory usage.  Also, the player will buffer the same # of seconds before playback in order to give the viewer a smoother viewer experience - meaning, in live events, the player will be behind the encoder by this number in addition to any buffering on the server.

On the next screen, "Individual Video Stream Settings", you will see in addition to the framerate setting, two additional settings.  First, Image Quality; this can be set from 0 (smoother) to 100 (clearer images).  Even with the CPU only at 20% to 40% setting this to 100 can result in dropped frames when the encoder must make a decision on whether to sacrifice image quality or the framerate and does so on based on the setting to emphasize the image's quality over the framerate.  Without this decision making process the encoder would try to do everything perfectly and the CPU usage would dramatically increase, eventually getting so behind there would be a radical increase in dropped frames.  Try setting this to 0 and encoding a file with the same specs as before and you will note that, in almost every instance, no frames are dropped but that there is a significant decrease in the image quality.
 
The second you will see is Key Frame IntervalIncreasing this number results in slightly less image quality and is generally considered appropriate when the source video is somewhat static, as in a "talking head" news footage or cartoons, where the background doesn't change much.  Decreasing this number is desirable when there is a lot of motion in the source video and the need to maintain high quality images in the video is important.  If you experiment with this and you should find that if you were to leave all the settings from your below profile the same and change this to 1 that the # of dropped frames would increase slightly, while increasing it to, for example, 7 from 4 (which I think is the default for most profiles) will decrease the # of dropped frames.
 
The settings I think are effecting your results are Image Quality and Key Framer Interval.  I recommend you experiment with these to see how they impact your results.
 
Let me know if you have questions,
 
-Steve
Back to Top View SteveL's Profile Search for other posts by SteveL
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.1250 seconds.
� 2001 ViewCast Corporation - All Rights Reserved.