{"id":784,"date":"2011-12-23T08:41:41","date_gmt":"2011-12-23T12:41:41","guid":{"rendered":"http:\/\/www.eyoungwon.com\/journal\/?p=784"},"modified":"2011-12-23T13:29:36","modified_gmt":"2011-12-23T17:29:36","slug":"the-art-of-webcasting","status":"publish","type":"post","link":"https:\/\/eyoungwon.com\/journal\/the-art-of-webcasting\/","title":{"rendered":"The Art of Webcasting"},"content":{"rendered":"<p>There are many important aspects that go into streaming a live broadcast. I often have people asking: \u201cWhich settings should I use to broadcast a high-quality Flash stream?\u201d Seems like a reasonable question but there are\u00a0<em>so many<\/em>\u00a0variables involved that it\u2019s impossible for me to give a simple answer. My goal here is to explain all of the different factors involved and hopefully give you the knowledge necessary to start Wirecasting like a pro.<\/p>\n<p>&nbsp;<\/p>\n<p>First, I\u2019ll briefly go over the\u00a0<strong>major<\/strong>\u00a0elements involved in live webcasting, then I\u2019ll go more into more detail on each. These are the most important things to keep in mind:<\/p>\n<p>1)\u00a0\u00a0\u00a0 Hardware \u2013 Obviously, a better machine will be able to handle higher-quality streams.<\/p>\n<p>2)\u00a0\u00a0\u00a0 Bandwidth \u2013 If you\u2019re broadcasting from a standard DSL connection, you need to make sure you don\u2019t exceed your uploading bandwidth.<\/p>\n<p>3)\u00a0\u00a0\u00a0 Broadcast Settings \u2013 Higher quality video streams are taxing on your system and require more upload bandwidth.<\/p>\n<p>4)\u00a0\u00a0\u00a0 Multiple Streams \u2013 If you\u2019re streaming multiple streams simultaneously, this is going to increase the amount of work your machine has to do.<\/p>\n<p>5)\u00a0\u00a0\u00a0 Inputs \u2013 Your video source can impact your stream in many different ways. Live sources, in particular, can dramatically impact the performance of your broadcast.<\/p>\n<p>6)\u00a0\u00a0\u00a0 Codecs \u2013 Some codecs are more efficient than others and they do have limitations to what they can handle.\u00a0 Sometimes you can overload the limitations your video codec and start dropping frames on an otherwise ideal recording.<\/p>\n<p><strong>Hardware<\/strong><\/p>\n<div>Remember, Wirecast webcasting software is a type of video encoder.<\/div>\n<p>Remember, Wirecast webcasting software is a type of\u00a0<em>video encoder<\/em>. For most people, it wouldn\u2019t be surprising if it took a long time to encode a full 1920\u00d71080 HD video on your desktop computer. Still, people seem surprised that Wirecast starts dropping frames when they\u2019re broadcasting at the same resolution!<\/p>\n<p>Wirecast goes through a process called\u00a0<em>compositing<\/em>\u00a0where it decodes all the separate inputs (movies, images, live cameras, etc.), layers them together, then re-encodes them on their way to each destination. That\u2019s a lot of work considering it has to do it\u00a0<em>at least<\/em>\u00a0as fast as real time encoding. If your machine can\u2019t keep up with the quality of your broadcast, Wirecast will start dropping your frame rate to compensate. If you\u2019re just starting to drop frames, you can sometimes get away with it without it being too noticeable but if it starts dipping too low it will become very obviously choppy.<\/p>\n<p>If you\u2019re planning on doing lots of big streams you\u2019re going to need a powerful CPU. Think in terms of multiple cores, not just CPU speed; an eight core i7 will beat your Core 2 Duo and a decent graphics card. In the highly unlikely situation that you are hitting a bottleneck in your record to disk, you may need to upgrade to a\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/RAID\" target=\"_blank\">RAID<\/a>\u00a0hard drive setup or lay down the cash for an\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Solid-state_drive\" target=\"_blank\">SSD<\/a>.<\/p>\n<p><strong>Bandwidth<\/strong><\/p>\n<p>There are several different ways that you can broadcast to the web. You can do it yourself (via\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/QuickTime_Streaming_Server\" target=\"_blank\">QuickTime Streaming Server<\/a>,\u00a0<a href=\"https:\/\/www.adobe.com\/products\/flashmediaserver\/\" target=\"_blank\">Flash Streaming Server<\/a>, etc.), you can use a community streaming website (<a href=\"http:\/\/www.ustream.tv\/\" target=\"_blank\">Ustream<\/a>,<a href=\"http:\/\/www.livestream.com\/\" target=\"_blank\">Livestream<\/a>,\u00a0<a href=\"http:\/\/www.justin.tv\/\" target=\"_blank\">Justin.tv<\/a>, etc.) or you can use a content distribution network or CDN (<a href=\"http:\/\/www.limelightnetworks.com\/\" target=\"_blank\">Limelight<\/a>,\u00a0<a href=\"http:\/\/www.akamai.com\/\" target=\"_blank\">Akamai<\/a>, etc.).<\/p>\n<p>If you\u2019re broadcasting to a community streaming site, you may run into bandwidth restrictions. If your stream is refused for no apparent reason, I would check to make sure that you haven\u2019t exceeded the data rate limitations for that site. This can also cause problems with random disconnects because the data rate fluctuates and the server may kill your stream when your data rate peaks.<\/p>\n<p>If you\u2019re hosting the streaming server yourself then you have to be careful about how many people connect to your stream. This is less of an issue if you are only broadcasting within a local area network but if you\u2019re streaming to the web, you have to be able to manage the data rate for each individual connection to your stream. If you don\u2019t have enough upload bandwidth then people will start losing quality and getting disconnects. Also, make sure that nobody else on your network is using upload bandwidth. This can be a major issue when streaming from a corporate network where there are lots of users sharing the bandwidth. Still, using a streaming server is the best choice for streaming across a LAN or VPN, assuming you know about how many people will be connecting.<\/p>\n<p>Using a CDN is good way to go for streaming to the web. You can embed the videos directly in your website and don\u2019t have to worry about advertisements in your video. Plus, the only restriction will be your upload bandwidth for a single stream which will be reproduced by the CDN for each person who connects. However, they can be prohibitively expensive for individuals or broadcasters working on a tight budget.<\/p>\n<p><strong>Broadcast Settings<\/strong><\/p>\n<p>Obviously, the quality of stream you are sending out will affect your performance. Let\u2019s say for example that you found the perfect data rate for streaming 320\u00d7180 and you want to upgrade to a 640\u00d7360 stream. Thinking in terms of pixels displayed, the total number of pixels in a 320\u00d7180 image is 57,600. The number of pixels in a 640\u00d7360 image is 230,400 \u2013 four times greater. However, codecs are more efficient at encoding larger resolutions, so there is not a one-to-one ratio of pixel size to data rate.\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Jan_Ozer\" target=\"_blank\">Jan Ozer<\/a>\u00a0wrote a\u00a0<a href=\"http:\/\/www.streaminglearningcenter.com\/articles\/streaming-103-choosing-your-streaming-configuration-parameters.html\" target=\"_blank\">great article<\/a>\u00a0on this exact subject.<\/p>\n<p>It\u2019s important to keep in mind the context of your stream when setting up your encoder presets for a broadcast. You need to think about:<\/p>\n<p>1)\u00a0\u00a0\u00a0 How much bandwidth do I have to work with?<\/p>\n<p>2)\u00a0\u00a0\u00a0 How much bandwidth does my target audience have to work with?<\/p>\n<p>3)\u00a0\u00a0\u00a0 What type of video do I want to broadcast?<\/p>\n<div>First, you need to make sure that your broadcast settings aren\u2019t going to use more bandwidth than you have available<\/div>\n<p>First, you need to make sure that your broadcast settings aren\u2019t going to use more bandwidth than you have available. You can calculate this by seeing what your maximum upload rate is (from your internet service provider), and by making sure that your presets never exceed that amount. It\u2019s always a good idea to test running a broadcast first just to make sure.<\/p>\n<p>Second, you need to consider your target audience. If you know that it\u2019s only going to be watched by people on your internal network then you just have to limit yourself to the bandwidth of your internal network. Alternatively, if you\u2019re expecting to be streaming to people who are still on dial-up, you are going to have to\u00a0<em>dramatically<\/em>\u00a0reduce the quality of your presets to compensate.<\/p>\n<p>Third, you need to keep in mind the type of broadcast you intend to do. If you are doing a low action interview then you can probably reduce your frame rate and use a conservative data rate without losing too much quality. If you are broadcasting a high-action sports event, you\u2019re going to need a higher frame rate to avoid choppy video and a higher data rate.<\/p>\n<p>Typically, when setting up for a broadcast, I experiment a bit with my data rate beforehand. I start it out a bit high then bring it down little by little until I can get it as low as possible without impacting the quality of my stream. If I\u2019m expecting a higher-action stream then I\u2019ll wiggle the camera around while broadcasting to see if my frame rate starts to drop. If you are starting to drop frames on a broadcast that\u2019s using a preset with more than 30fps (which is rarely necessary), I would recommend lowering your frame rate a bit to maintain quality and reduce your data rate. Typically, I think you can get away with as low as 24fps (standard film) on a stream without it looking\u00a0<em>too<\/em>\u00a0choppy, I would caution against going much lower than that unless you\u2019re working within very specific restrictions.<\/p>\n<p><strong>Multiple Streams<\/strong><\/p>\n<p>It\u2019s important to remember, again, that Wirecast is encoding its output on the fly. Sending simultaneous streams works great but will dramatically increase the impact to your machine.<\/p>\n<div>I regularly stream 6 simultaneous streams from my Mac Pro.<\/div>\n<p>I regularly stream 6 simultaneous streams from my Mac Pro. One high and one low quality QuickTime stream, one high and one low quality Flash stream, one\u00a0<a href=\"http:\/\/www.wowzamedia.com\/forums\/showthread.php?t=1063\" target=\"_blank\">iPhone stream<\/a>\u00a0(via\u00a0<a href=\"http:\/\/www.wowzamedia.com\/index.html\" target=\"_blank\">Wowza\u00a0<\/a>server) and one<a href=\"http:\/\/www.apple.com\/quicktime\/\" target=\"_blank\">QuickTime<\/a>\u00a0record to disk. However, a lot of fine-tuning was required to make sure that each stream was using exactly the right data rate, resolution and frame rate to give me the quality that I wanted and I am just on the edge of exceeding the limitations of my machine.<\/p>\n<p>Here\u2019s a little known trick to Wirecast that allows it to identify if you are using identical broadcast and recording presets:\u00a0 If you have a broadcast and a record to disk using an identical preset, Wirecast will match them up so it doesn\u2019t have to do the encoding twice. This is helpful if you\u2019re already pushing the limits of your setup and want to get a recording of your broadcast at the same time.<\/p>\n<p><strong>Inputs<\/strong><\/p>\n<p>Wirecast is great at managing a wide variety of input sources, so you can easily have several live camera sources feeding into your Wirecast machine. However, really high-quality video sources may end up causing you more harm than good. Let\u2019s hypothetically say that you\u2019re bringing video in from an HD camera, dropping it into Wirecast\u2019s canvas (set to an HD resolution), then broadcasting back out at an HD resolution.<\/p>\n<p>That is\u00a0<strong>a lot<\/strong>\u00a0of information to be going through your graphics processor (<a href=\"http:\/\/en.wikipedia.org\/wiki\/Graphics_processing_unit\" target=\"_blank\">GPU<\/a>). If your frame rate starts to drop but your\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Cpu\" target=\"_blank\">CPU<\/a>\u00a0usage is staying steady, you\u2019ve hit a bottleneck. Try reducing the frame size going through Wirecast. There\u2019s no need to bring in a 1080p video input if you\u2019re only streaming out to 640\u00d7360. Also, always remember, resizing down is okay but resizing up is\u00a0<strong>not.<\/strong><\/p>\n<p><strong><a href=\"http:\/\/www.eyoungwon.com\/journal\/?attachment_id=1116\" rel=\"attachment wp-att-1116\"><img fetchpriority=\"high\" decoding=\"async\" title=\"pixel-degradation\" src=\"http:\/\/blogs.telestream.net\/wirecast\/wp-content\/uploads\/2010\/07\/pixel-degradation1.jpg\" alt=\"\" width=\"508\" height=\"300\" \/><\/a><br \/>\n<\/strong><\/p>\n<p>Above is an exaggerated example of resizing an image from the input to the canvas to the output. By reducing the high-quality source to fit into the lower-quality canvas the output has become extremely pixelated and blurry. As a rule, you should try to keep your resolution as constant as possible from source to output. You get no benefit out of having your HD camera at native resolution if you\u2019re only broadcasting a 640\u00d7360 stream, all you are doing is increasing the amount of work your machine has to do and you may end up getting\u00a0<em>reduced<\/em>\u00a0quality.<\/p>\n<p>When using a live source, Wirecast has three potential resize steps.<\/p>\n<p>1)\u00a0\u00a0\u00a0 Device Capture Size<\/p>\n<p>2)\u00a0\u00a0\u00a0 Wirecast Canvas Size<\/p>\n<p>3)\u00a0\u00a0\u00a0 Encoder Preset Size<\/p>\n<p>Your goal should be to bring your Device Capture Size and Wirecast Canvas Size down as low as possible without your Device Capture Size being smaller than your Canvas Size or your Canvas Size being smaller than your\u00a0<em>highest<\/em>\u00a0broadcasting preset size. The Device Capture Size is dependent on your input source so it\u2019s good to experiment a bit with Native, Reduced and Low settings before picking one for your broadcast. Also, many HDV cameras have the ability to switch to a DV mode \u2013 which is probably a good call if you aren\u2019t planning on using an HD resolution.<\/p>\n<p><a href=\"http:\/\/www.eyoungwon.com\/journal\/?attachment_id=1117\" rel=\"attachment wp-att-1117\"><img decoding=\"async\" title=\"scaling-diagram\" src=\"http:\/\/blogs.telestream.net\/wirecast\/wp-content\/uploads\/2010\/07\/scaling-diagram.gif\" alt=\"\" width=\"578\" height=\"320\" \/><\/a><\/p>\n<p>This diagram helps to illustrate the different resize steps your video goes through in Wirecast. The base resolution is dependent on whatever your live source is. It is then scaled down based on your Device Capture Size. The video is then scaled to match your Wirecast Canvas Size. The last step scales it to whatever your highest broadcast preset resolution is. Smaller broadcast presets are automatically resized down from there. Keep this sequence of resizes in mind as you set up your document to ensure the highest possible quality for your output.<\/p>\n<p><strong>Codecs<\/strong><\/p>\n<div>Video codecs, by design, have their own built-in data rate limitations<\/div>\n<p>Video codecs, by design, have their own built-in data rate limitations. It should be pretty rare that you start exceeding the limitations of your video codec but it\u2019s something to consider for very high-quality video. For example, the Apple H.264 codec claims it can go as high as 135,000 kbits\/sec (Level 5, Main Profile) but I\u2019ve found in practice that it\u2019s quite a bit lower than that. If you start to encounter issues with the inefficiencies of the Apple H.264 codec, then you should probably switch to an unrestricted format like Apple Intermediate Codec or Apple ProRes. Be careful though, these are large uncompressed formats and will eat up the space on your hard drive\u00a0<strong>very<\/strong>\u00a0quickly.<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>Hopefully this overview has helped illustrate some of the different elements involved in the broadcasting process. Finding the right balance between all of these components is key to getting a high-quality broadcast.<\/p>\n<p>The Official Wirecast Blog &#8211;<br \/>\n<a title=\"The Art of Webcasting\" href=\"http:\/\/blogs.telestream.net\/wirecast\/2010\/07\/19\/the-art-of-webcasting\/\" target=\"_blank\">http:\/\/blogs.telestream.net\/wirecast\/2010\/07\/19\/the-art-of-webcasting\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many important aspects that go into streaming a live broadcast. I often have people asking: \u201cWhich settings should I use to broadcast a high-quality Flash stream?\u201d Seems like a reasonable question but there are\u00a0so many\u00a0variables involved that it\u2019s impossible for me to give a simple answer. My goal here is to explain all [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,211],"tags":[353,351,352],"class_list":["post-784","post","type-post","status-publish","format-standard","hentry","category-business-resources-blog","category-video","tag-blogging","tag-the-art-of-webcasting","tag-webcasting"],"_links":{"self":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/comments?post=784"}],"version-history":[{"count":5,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/784\/revisions"}],"predecessor-version":[{"id":830,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/784\/revisions\/830"}],"wp:attachment":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/media?parent=784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/categories?post=784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/tags?post=784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}