﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Soumasish Goswami</title>
	<atom:link href="http://soumasish.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://soumasish.com</link>
	<description>Software Engineer</description>
	<lastBuildDate>Thu, 25 Apr 2013 07:35:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Streaming Video To Mobiles Explained Further</title>
		<link>http://soumasish.com/streaming-video-to-mobilesexplained-further/</link>
		<comments>http://soumasish.com/streaming-video-to-mobilesexplained-further/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 07:21:16 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Streaming]]></category>
		<category><![CDATA[h.264]]></category>
		<category><![CDATA[Live streaming]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=392</guid>
		<description><![CDATA[&#160; &#160; Intro Media delivery technology has been changing radically over the past decade and with broadband getting broader and broader the shape of things to come in the future could be very interesting. Currently most broadcasting companies stream their TV or radio contents to a website or more recently[...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><b>Intro</b></h4>
<p>Media delivery technology has been changing radically over the past decade and with broadband getting broader and broader the shape of things to come in the future could be very interesting. Currently most broadcasting companies stream their TV or radio contents to a website or more recently to mobile and tablet devices.</p>
<p>This White paper discusses the issues faced with streaming and the way forward.</p>
<p>Since streaming video to mobile devices is a relatively new concept I have described the video streaming process – technology overview and best practices for video compression (encoding) and decompression (decoding), high and standard deﬁnition (HD and SD) video, progressive and interlaced video, analog and digital video, and common settings to encode video for live streaming using the ITU-T H.264 / MPEG-4 in detail. If you&#8217;re looking to just get started with the technology you can check out my other blog on the subject.</p>
<p>&nbsp;</p>
<h5><i>What is video streaming?</i></h5>
<p>Video streaming is the act of transmitting compressed (typically) video across a private or public network (like the Internet, a LAN, satellite, or cable television) to be uncompressed and played on a computing device (such as a TV, smart phone or computer).</p>
<h5><i>Why compress video?</i></h5>
<p>Video is compressed in size to save transmission bandwidth and storage space. Compression reduces original video information and removes redundancies. Uncompressed video requires a tremendous amount of bandwidth to transmit across a network or space to store.</p>
<p>The table below illustrates the advantages of compression.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="82"><b>RESOLUTION</b><b></b></td>
<td valign="top" width="86"><b>FORMAT</b></td>
<td valign="top" width="94"><b>UNCOMPRESSED</b></td>
<td valign="top" width="88"><b>COMPRESSED</b></td>
<td valign="top" width="88"><b>APPLICATION</b></td>
</tr>
<tr>
<td valign="top" width="82">720&#215;480</td>
<td valign="top" width="86">480i29.97fps</td>
<td valign="top" width="94">124.29 Mbps</td>
<td valign="top" width="88">2.49 Mbps</td>
<td valign="top" width="88">DVD movies</td>
</tr>
<tr>
<td valign="top" width="82">1,280&#215;720</td>
<td valign="top" width="86">720p30</td>
<td valign="top" width="94">663 Mbps</td>
<td valign="top" width="88">13.26 Mbps</td>
<td valign="top" width="88">Broadcasting</td>
</tr>
<tr>
<td valign="top" width="82">1,280&#215;720</td>
<td valign="top" width="86">720p60</td>
<td valign="top" width="94">1.66 Gbps</td>
<td valign="top" width="88">33.2 Mbps</td>
<td valign="top" width="88">Sports broadcasting</td>
</tr>
<tr>
<td valign="top" width="82">1,920&#215;1,080</td>
<td valign="top" width="86">1080i60</td>
<td valign="top" width="94">1.49 Gbps</td>
<td valign="top" width="88">29.8 Mbps</td>
<td valign="top" width="88">Broadcasting</td>
</tr>
<tr>
<td valign="top" width="82">1,920&#215;1,080</td>
<td valign="top" width="86">1080p24</td>
<td valign="top" width="94">1.19 Gbps</td>
<td valign="top" width="88">25 Mbps</td>
<td valign="top" width="88">Blu-Ray movies</td>
</tr>
</tbody>
</table>
<p><i>TABLE 1. UNCOMPRESSED VS COMPRESSED VIDEO</i></p>
<p>It compares the streaming bit-rate of uncompressed video with that of compressed video assuming a  YUV 4:2:0 color space for SD video and YUV 4:4:4 color space for HD video, both using a 8-bit color depth. An H.2641encoder can achieve a wide range of compression ratios depending on a number of factors, including the video itself and target bit rate. H.264 is a standard for video compression. The ITU-T (International Telecommunications Union) and ISO/IEC MPEG (Motion Picture Experts Group) standards bodies jointly deﬁned and maintain the standard. It is occasionally referred to as MPEG-4 Part 10 or AVC (Advanced Video Coding).</p>
<h5><i>What are the peculiarities of live streaming?</i></h5>
<p>Streaming video can either be live or VoD. With live streaming, source video is captured and encoded in real-time. This requires more computer processing, network resources and efﬁciency (lower latency during capture, encoding and stream delivery) compared to VoD streaming. With VoD streaming, source video is previously encoded and then streamed removing the need to capture, preprocess, convert and encode the video in real-time.</p>
<p>VoD encoding should utilize better (but more time consuming) encoding techniques (such as two-pass Variable Bit Rate) that increase quality whenever possible. These encoding techniques are typically not used for live streaming since the extra encoding time increases overall latency (delay). Since the size and location of VoD ﬁles are known, delivery of VoD ﬁles across a computer network can be optimized to further reduce delivery latency.</p>
<h5><i>What is the video streaming process and what resources are required to stream?</i></h5>
<p>The video streaming process consists of a number of steps and requires</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="105"><b>STEP</b></td>
<td valign="top" width="119"><b>DESCRIPTION</b></td>
<td valign="top" width="93"><b>REQUIRED HARDWARE AND/OR SOFTWARE</b></td>
<td valign="top" width="93"><b>RESPONSIBILITY</b></td>
</tr>
<tr>
<td valign="top" width="105">Capture, Convert and Process</td>
<td valign="top" width="119">Obtain source analog or digital video and audio from cameras, video mixers, etc.Convert analog source video to digital; no conversion required for digital source videoProcess remove noise, de-interlace interlaced video, etc. for more efﬁcient encoding</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
<td valign="top" width="93">Video cameras, video mixer, microphonesVideo capture card such as one from Digital Rapids, Aja, ViewCast, Blackmagic, etc.Video capture card from Digital RapidsEncode Encode and compress digital video</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
<td valign="top" width="93">Broadcast Engineers</td>
</tr>
<tr>
<td valign="top" width="105">Encoding</td>
<td valign="top" width="119">Encode the broadcast-ready video to send to the streaming server using TCP/IP protocol</td>
<td valign="top" width="93">A hardware or software encoder</td>
<td valign="top" width="93">Stream Administrator</td>
</tr>
<tr>
<td valign="top" width="105">Streaming and Distribution</td>
<td valign="top" width="119">The encode content is received at the streaming server nodes based on the distribution algorithm and then streamed to client devices using RTMP/HTTP protocols</td>
<td valign="top" width="93">Self-Hosted or cloud Hosted Streaming Server</td>
<td valign="top" width="93">Stream Administrator</td>
</tr>
<tr>
<td valign="top" width="105">Decoding</td>
<td valign="top" width="119">The stream is received decoded and uncompressed at the client device which uses a native app to render contents</td>
<td valign="top" width="93">iOS/Android Devices</td>
<td valign="top" width="93">App Developer</td>
</tr>
</tbody>
</table>
<p><i>TABLE 2. VIDEO STREAMING PROCESS AND REQUIREMENTS</i></p>
<p><i>What are the network and bandwidth requirements for live streaming?</i></p>
<p>A customized streaming platform, well that is if you architecture one yourself, won’t require the reconﬁguration of existing networking infrastructure devices (routers, switches and gateways) or for security controls to be changed or bypassed. Since software encoders use RTMP, the ports Flash uses (80, 1935, 443) must be open on infrastructure routers and gateways. In most corporate environments this is already the case since many software applications used by businesses include Flash. HTTP streaming (Apple HTTP D Streaming, Adobe Flash Dynamic Streaming, Microsoft Smooth Streaming with Silverlight) does not have this requirement unless ﬁrewall packet inspection inhibits smooth trafﬁc ﬂow of multimedia packets. That must be addressed.</p>
<p>Minimally, it is recommended that between 10 Mbps and 20 Mbps sustained upload network bandwidth be available at an encoding location to stream a single high quality 512&#215;384 or 768&#215;432 resolution video. More bandwidth is required to encode multiple streams of different quality to allow users with varying bandwidth conditions to watch a stream that best matches their local conditions.</p>
<p>At the receiving (or viewing) location, that same amount of sustained download bandwidth (650 Kbps to 1 Mbps) is required by viewers to avoid excessive buffering, choppiness, dropped frames, and freezing of the video stream. Viewers should minimize the number of running applications (such as virus checkers) on their devices so the maximum amount of computing resources (CPU cycles and memory) can be allocated to the timely decoding of the video stream. Play back devices must be powerful enough to decode the video stream at the broadcast bit rate. Extensive buffering and dropped frames can otherwise result.</p>
<p>When streaming over the Internet to viewers across the country or world, a Content Delivery Network (CDN) &#8211; such as Influxis, Primcast, LiveStream &#8211; should be used. A CDN allows scalable delivery to tens of thousands (even hundreds of thousands) of viewers with no intervention required at the encoding location.</p>
<h5><i>What is a CODEC?</i></h5>
<p>A CODEC(COder-DECoder or COmpressor-DECompressor) is hardware or software that compresses (encodes) digital data (like digital video or audio) and uncompresses (decodes) the data back to its original form. A CODEC collectively refers to two components &#8211; an encoder and decoder.</p>
<p>CODECs used for live streaming must be very efﬁcient in order to complete the encoding and decoding process fast enough to keep up with the rate of input video, minimize the size of the compressed output video, minimize latency and play back decoded frames ﬂuidly. Common video CODECs are H.264, VP 8 and VC-1.</p>
<p>Encoders can be lossy or lossless. A lossless encoder reduces, but does not loose, original audio or video information during the compression process. Uncompressed source video matches the original exactly but less space is used to transmit or store the compressed video. The reduction (and space savings) however is no where near as signiﬁcant as that provided by lossy encoding. A lossy encoder destructively reduces original video and audio information during the compression process substantially. Modern lossy encoders, like H.264 or HE-AAC V2, can be implemented and conﬁgured so it is difﬁcult for most people to observe a difference between source video and uncompressed video. The purpose of lossy encoders is to save considerable amounts of space while maintaining acceptable quality. Compression artifacts (jagged edges, moire patterns, motion blur, loss of detail) result when a lossy encoder destructively reduces video information so much so it becomes easily discernible to a viewer after the video is uncompressed.</p>
<p>The challenge is to conﬁgure a lossy encoder to provide an acceptable level of quality while using an acceptable level of bandwidth or space. This balance is not always easily attainable since lossy encoders aren’t aware when the reduction process starts to do more harm then good.</p>
<p>Encoders and decoders can be implemented in hardware (a chip or set of chips within a computing device) or software, such as an application running on a computing device, e.g. Adobe’s Flash Media Encoder Live or the open source x264.</p>
<p>To be accurate, H.264 is a decoding standard. Software or hardware encoders used in combination with H.264 compliant decoders must encode source video so that any H.264 compliant decoder can decode it without issue.</p>
<h5><i>What is a video frame?</i></h5>
<p>Digital video consists of a sequence of pictures (frames) of video images in a particular aspect ratio (width/height) representing the source video at a point in time. Each frame consists of a set of pixels. A pixel is also known as a “sample.”Each pixel contains information representing the color (e.g. red, green, blue or cyan, magenta, yellow and black) intensity of the video at a particular location in the frame. The number of pixels in a frame depends on the frame’s resolution. Image 1 is an example of a video frame divided into groups of 8&#215;8 pixels.</p>
<h5><i>What is Standard Deﬁnition video?</i></h5>
<p>SD video is any video that is not HD. One of the most common SD video modes is:</p>
<p>• 480i &#8211; 720&#215;480 resolution @ 4:3 aspect ratio @ 24 frames per second (fps); there are 480 vertical lines of resolution in each interlaced video frame.</p>
<p>DVDs and non-HD television use 480i.The highest resolution SD video frame has a height of 576 lines.</p>
<h5><i>What is High Deﬁnition video?</i></h5>
<p>HD video is any video that is not SD or any video with a frame height greater than 576 lines. Two of the most common HD video modes (and what is popularly considered HD) are:</p>
<p>• 720p &#8211; 1280&#215;720 resolution @ 16:9 aspect ratio @ 25/30/60 frames per second (fps); there are 720 vertical lines of resolution in each video frame; and</p>
<p>• 1080i/p &#8211; 1920&#215;1080 resolution @ 16:9 aspect ratio @ 25/30/60 frames per second (fps); there are 1080 vertical lines of resolution in each video frame.</p>
<p>It’s important to recognize that resolution alone determines if a video is HD or SD. Not quality. Not frame rate. Not bit rate.</p>
<h5><i>What is progressive and interlaced video?</i></h5>
<p>SD and HD video is either “progressive” or “interlaced.” Progressive HD video consists of frames with each and every pixel of a video image. It’s a complete picture of all lines in a video image. Someone looking at an individual progressive frame would see an entire video image.</p>
<p>The ‘p’ in “720p” standards for “progressive.” Interlaced HD video consists of ﬁelds with 1/2 the pixels of a video frame. It’s a picture of the video frame containing every other vertical line in the frame &#8211; the even lines or the odd lines. Someone looking at an individual interlaced ﬁeld would see 1/2 a video frame. Two interlaced ﬁelds are combined (the even and odd lines) to form one complete video frame with all its pixels. The ‘i’ in “1080i” standards for “interlaced.”</p>
<p>If an interlaced video mode mode is followed by a number such as 1080i60, the number stands for the ﬁeld rate. Dividing by two gives the frame rate. E.g. 1080i60 has a frame rate of 30. If a progressive video mode is followed by a number such as 720p30, the number stands for the frame rate. E.g. 720p30 has a frame rate of 30, 720p60 and 1080p60 have a frame rate of 60. Streamlane can encode and stream interlaced or progressive video.</p>
<h5><i>What affects the quality of streaming video?</i></h5>
<p>Bit rate, color depth, and production factors (such as proper lighting) affect video quality. Resolution (if the video is HD or SD) does not. An SD video stream may look better than an HD video stream.</p>
<p>HD resolution video can be very low quality for a number of reasons, one being insufﬁcient bit rate to transmit enough information to “ﬁll” HD video frames with enough detail at an acceptable rate.</p>
<h5><i>Here are some key factors that affect the quality of streaming video:</i></h5>
<p><i><span style="text-decoration: underline;">Quality of Original Source Video</span></i><span style="text-decoration: underline;">. </span>Source video should be digital (preferably SDI) at the highest frame rate and resolution possible.</p>
<p><i><span style="text-decoration: underline;">Input video resolution</span></i><span style="text-decoration: underline;">.</span> The aspect ratio of a video can positively or negatively inﬂuence the efﬁciency of an encoder. The video frame’s height and width should both be wholly divisible by 16 if possible, or wholly divisible by 8 if not.</p>
<p><i><span style="text-decoration: underline;">Video aspect ratio</span></i>. The input video aspect ratio should match the target output video aspect ratio. The most common aspect ratios are 16:9 and 4:3.</p>
<p><i><span style="text-decoration: underline;">Content of the source video including the amount of motion and proper contrast</span></i>. Motion requires more information to represent accurately thus an encoder has to use more bandwidth to compress motion. Less motion (changes between or within video frames) requires less information and thus less bandwidth. Therefore, do not include unnecessary motion in source video. The background and foreground subjects in the video should be lit and contrasted properly.</p>
<p><i><span style="text-decoration: underline;">Compatibility of devices</span></i>. The devices used to process and render final broadcast contents need to be compatible with the encoding hardware. Minor incompatibilities can lead to loss of quality or even complete loss of audio or video.</p>
<p><i><span style="text-decoration: underline;">Conﬁguration of the encoder</span></i>. The number of I-frames, B-frames, Variable or Constant Bit Rate Encoding, CAVLAC or CABAC, etc.</p>
<p><i><span style="text-decoration: underline;">Streaming bit rate</span></i>. Streaming video is like water rushing through a pipe. The bigger the pipe, the more water that can ﬂow through it. An encoder ﬁlls a pipe with compressed video. Therefore, the larger the bit rate the more video information an encoder can compress. This additional information allows the video to be higher quality. The quality difference between 320 Kbps and 650 Kbps video is quite evident. However, a diminishing point of return exists so adding more bandwidth to an already high quality 320&#215;240 video stream may not increase perceptible quality.</p>
<p>An end user must have the ability to support the higher bit rates required with the higher resolution. Presently the encoders at the MCR are streaming contents between 500 Kbps and 1.5 Kbps.</p>
<h5><i>What are CBR and VBR?</i></h5>
<p>Most encoders offer Constant Bit Rate (CBR) or Variable Bit Rate (VBR) encoding. VBR compresses video to a variable bit rate after analyzing video content to optimize quality and bandwidth use. CBR compresses video to a constant bit rate regardless of content. CBR helps ensure smooth playback without interruption since the rendering player doesn’t have to deal with bit rate ﬂuctuations. CBR by default prevents bandwidth spikes in compressed video while VBR can be conﬁgured to compress to no greater than a maximum bit rate which will also prevent bandwidth spikes.</p>
<p>If the source video has little or no movement or change over time, CBR can waste bandwidth encoding redundant or static information that is not needed to maintain quality. This is where VBR excels. VBR uses bandwidth for more detailed or complex aspects of the video or in areas with high motion content instead of wasting it on static or less detailed imagery. However, VBR takes longer to compress video compared to CBR.</p>
<p>Despite CBR not using bandwidth as efﬁciently as VBR, CBR should be used for all live streaming applications to minimize encode latency. VBR is (and should) be used when creating VoD since this work typically doesn’t have a time constraint. When using VBR, set an average and maximum bit rate to avoid extreme bandwidth peaks in compressed video. Bandwidth spikes can cause extensive buffering and dropped frames for end viewers.</p>
<h5><i>What is multi-pass encoding?</i></h5>
<p>An encoder needs at least one pass through source video to analyze and compress it. The quality of compressed video (and how efﬁciently bandwidth is used) can be improved by allowing an encoder to make additional passes through source video to perform a more detailed analysis. This technique, known as multi-pass encoding, can be applied to both CBR and VBR encoding.</p>
<p>But (of course) there is a tradeoff with multi-pass encoding: speed. Additional passes through the source video increases overall encoding time (two-pass encoding typically doubles it) which may not be problematic for VoD, but can be problematic for live streaming where low latency may be required. Therefore, multi-pass encoding is not usually used to encode live streaming.</p>
<p>Two-pass encoding typically produces a noticeable increase in quality with most source video at the expense of twice the encoding time. Adding additional passes usually does not cause a discernible increase in quality or more efﬁcient use of bandwidth. Once again, a factor of diminishing encoding return exists.</p>
<h5><i>How powerful of a device is required to play streamed video?</i></h5>
<p>A computing device must decode compressed video fast enough for ﬂuid video playback. High bit rate compressed video requires signiﬁcant processing power and memory to decode and play. Therefore, if viewers have limited processing power, adjustments must be made to the encoding settings to compensate. This is partially addressed by dynamic bit rate streaming (described later).</p>
<p>The power required varies with the complexity of the compressed video. A high motion 720p60 stream encoded at 1.5 Mbps requires a much more powerful rendering device compared to a 320&#215;240 24 fps encoded stream at 350 Kbps.</p>
<p>Due to the amount of computational power required to decode and play streaming video, battery consumption in mobile devices also increases. Thus, care should be taken when determining target bit rates, frame rates and resolution for mobile devices.</p>
<h5><i>Why is frame rate important and what are macroblocks?</i></h5>
<p>The frame rate must reasonably convey sense of movement in the video source content. If the content contains fast-moving video, use a higher frame rate. As frame rate is increased, the frame size of the video may need to be reduced to retain reasonable visual quality for a speciﬁc bit rate. 24 fps is the cinematic frame rate. 29.97 (30) fps is the television and DVD frame rate. ESPN uses a frame rate of 60 to convey motion in sporting events.</p>
<p>Most video encoders including H.264, deﬁne each video frame as a series of pixel (e.g. 16&#215;16) blocks. Each block is called a macroblock. Encoders compress and encode video by operating on differences between macroblocks in each frame (intraframe) and between previous and successive frames (interframe). This is known as spatial and temporal encoding respectfully.</p>
<p>By using frame resolutions that evenly distribute a macroblock (and not subportions), the video encoder can more easily encode the video source (which is more easily decoded during playback). Video encoders such as H.264 and VP 8 perform best when the frame width and height use multiples of 16. This allows macroblocks to be easily and efﬁciently created from the source pixels. For the best image quality and playback, always use width and height dimensions that are each wholly divisible by 16 (best), 8 (better), or 4 (good).</p>
<p>The width and height of video destined for computer playback should be kept to a square pixel aspect ratio. Any non-square pixel aspect video should be adjusted for computer playback. For example, source with a 720 by 480 frame size can be resized during the encoding process to 640 by 480, 480 by 360, 320 by 240, 160 by 120, and so on. Similarly, content with a 1440 by 1080 native non-square pixel frame size should be resized to 1920 by 1080, 1024 by 576, 768 by 432, 512 by 288, 256 by 144, and so on.</p>
<h5><i>What is a keyframe? </i></h5>
<p>An encoder generates a sequence of video frames of different types, with each type having a speciﬁc purposes. For H.264, these frame types are:</p>
<p>• I-frames (intraframes, a.k.a. keyframes) are self-contained video frames that can be independently decoded without reference to other frames. They are the least compressible and contain the most information.</p>
<p>• P-frames (predictive frames) hold only the differences between the current frame and a previous frame. They are more compressible than I-frames but require I-frames to decode.</p>
<p>• B-frames (Bi-predictive frames) are a second level of prediction that hold differences between the current frame and both a preceding frame and subsequent frame. They are the most compressible and require I-frames to decode.</p>
<p>A keyframe (I-frame) is used as a starter frame, drawing the initial video. Subsequent P-frames and Bframes store only the changes in the video frame relative to the previous keyframe. A group of pictures (GOP) is the number of frames from one I-frame to another. In one GOP, there is a full I-frame and a number of frames predicting the motion associated with that full frame. Higher levels of compression (less bandwidth for a given clip of source video) are achieved through larger GOP sizes and deeper frame prediction (i.e., using an IBP compression sequence instead of an IP sequence). However, deeper frame compressions require more time to encode, resulting in higher latencies. Note that these parameters are typically established during system setup and not changeable during live encoding.</p>
<h5><i>Performance tuning</i></h5>
<p>Low bandwidth/high latency &#8211; If a tighter bandwidth budget exists, select a deep compression (IBBP) with a large GOP size (~40-200); latency will suffer to some extent.</p>
<p>High bandwidth/low latency &#8211; If 100% accuracy and immediacy is required, select low compression (Iframe only, or IP) and a very small GOP size (~10-40).</p>
<h5><i>Keyframe interval</i></h5>
<p>The frequency of keyframes (I-frames) in the video can be speciﬁed in the encoder. This is known as the keyframe interval.</p>
<p>Keyframes are best inserted in multiples (or fractions) of the compressed ﬁle’s frame rate. For example, if a frame rate of 15 fps is used, use a keyframe interval of 150 frames (one keyframe will be generated every 150 frames). Some encoders can be provisioned to select automatic or natural keyframes, which essentially tell the encoder to make a keyframe whenever enough of the video frame has changed. The keyframe interval can greatly affect the quality of the overall video clip. If the encoder creates too many keyframes for an allocated video bit rate, the visual quality degrades. If too few keyframes are created, one loses the ability to start the playback of the video or seek or scrub the video very smoothly or accurately.</p>
<h5><i>Keyframes and Dynamic Bit Rate Streaming</i></h5>
<p>The advent of Dynamic Bit Rate Streaming in Flash Media Server 4.5 (and Flash player 10), Microsoft’s Internet Information Service (IIS) Smooth Streaming (and Silverlight player) and Apple’s HTTP Streaming, allows the quality of an end user’s viewing experience to be adjusted continuously based on the end user’s bandwidth conditions.</p>
<p>An end user’s video player constantly evaluates available end user bandwidth and instructs the streaming server to stream at a bit rate that can be supported by the end user’s available bandwidth. A player autonomously switches between individually encoded higher and lower bit rate video streams based on the available bandwidth. There can be many available streams from which the player can choose—the number is dependent on the encoding system, media server and bandwidth availability at the source and destination.</p>
<p>In order to facilitate smooth switching between streams, two provisions must be made when encoding.</p>
<p>1. Keyframes must be encoded at a much higher ratio to P-frames compared with previous encoding recommendations (e.g. one every 150 frames). A 25% (one out of every four) ratio to P-frames is recommended. Some even advise a 50% (every other frame is a keyframe) ratio.</p>
<p>2. All streams must be encoded using the same keyframe ratio.Implementing these provisions will ensure stream switching is done quickly and smoothly with no noticeable delay and/or staggering.</p>
<p><i>What are encoding proﬁles and levels?</i></p>
<p>The H.264 standard deﬁnes seven proﬁles to serve different applications, categorized by quality verse computational cost. The most common are Baseline, Main and High.</p>
<p>Baseline requires the lowest amount of processing power but provides the least efﬁcient compression. It is typically used for video conferencing, security cameras and mobile devices such as iPhones. Main provides a medium level of quality for a slightly higher computational cost. The High proﬁle provides the best quality because the encoder can use the widest range of encoding techniques provided by the H.264 standard but requires the highest processing power to decode. Some devices don’t even support it (e.g. iPhone). It was originally intended for Blu-ray devices but is gaining in popularity as computing devices become ever more powerful. H.264 has 11 levels or degree of capability to limit performance, bandwidth and memory requirements. Each level deﬁnes the bit rate and encoding rate in macroblock per second for resolutions from SD to HD. The higher the resolution, the higher the level required.</p>
<h5><i>What is CAVLC and CABAC in H.264?</i></h5>
<p>The Main and High proﬁles of the H.264 codec support encoding parameters such as B-frames, reference frames, Context-Adaptive Variable-Length Coding (CAVLC) &#8211; the default &#8211; and Context-Adaptive Binary Arithmetic Coding (CABAC) entropy encoding. These parameters can greatly improve the visual quality of a given video clip at any bit rate.</p>
<p>CABAC is more processor intensive than CAVLC. However, one typically sees a marked improvement in the visual quality of H.264 content with CABAC.CABAC creates more latency in live video streams as opposed to CAVLC so use CAVLC when real-time delivery is a concern.</p>
<h5><b>How to reduce streaming latency?</b></h5>
<p><i><span style="text-decoration: underline;">Minimizing H.264 encode latency</span></i><span style="text-decoration: underline;">. </span>Some techniques we use to minimize latency introduced by H.264 encoding:</p>
<p>• Use CAVLC not CABAC</p>
<p>• Use a low GOP such as 3</p>
<p>• Don’t use B-frames or keep the B-frames very low</p>
<p>• Use CBR, not VBR</p>
<p>• Use the Constrained Baseline Proﬁle</p>
<p>• Ensure all CPUs and all cores on each CPU are used by the H.264 encoder, use the most powerful hardware available to run a software encoder and allocate as much processing power to the encoding software as possible by minimizing the use of other software applications</p>
<p>• Use a hardware H.264 encoder (this can be costly)</p>
<p>• Reduce motion in the video source, subjects should wear clothes without brightness extremes and ﬁne patterns; ensure the scene and subjects are well lit; see [7] for more information</p>
<p>• Use multi-bit rate streaming</p>
<p><i><span style="text-decoration: underline;">Minimizing transmission latency</span></i><span style="text-decoration: underline;">. </span>Some techniques that we adopt to minimize latency introduced by transmission:</p>
<p>• Ensure there is more than enough sustained bandwidth at the encode site</p>
<p>• Use a CDN or a peer-to-peer UDP based stream distribution technology</p>
<p>• Use a point to point dedicated network link between the encode and decode sites; this can be cost prohibitive and impractical if there are many viewers worldwide at unknown viewing locations</p>
<p>• Prioritize streaming trafﬁc over other types of network trafﬁc on a private LAN or VPN</p>
<p>• Ensure streaming ports are open on network infrastructure devices on a private LAN or VPN</p>
<p>• Separate streaming trafﬁc onto a dedicated VLAN in a private LAN</p>
<p>• Do not stream over a wireless network since data transmission collisions can be more frequent, and more adverse, than over a wired network</p>
<p><i><span style="text-decoration: underline;">Minimizing H.264 decode latency</span></i><span style="text-decoration: underline;">. </span>Some techniques  we use to minimize latency introduced by decoding:</p>
<p>• Ensure all CPUs and all cores on each CPU are used by the H.264 decoder, use the most powerful hardware available to run a software decoder and allocate as much processing power to the decoding software as possible by minimizing the use of other software applications</p>
<p>• Reduce the frame rate (to 12 or 15); take care not to degrade quality with a low frame rate.</p>
<p>&nbsp;</p>
<p><b><span style="text-decoration: underline;"> </span></b></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/streaming-video-to-mobilesexplained-further/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8 Life Changing Websites for Front-End Coders</title>
		<link>http://soumasish.com/8-life-changing-websites-for-front-end-coders/</link>
		<comments>http://soumasish.com/8-life-changing-websites-for-front-end-coders/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 06:28:03 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[texture]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=380</guid>
		<description><![CDATA[&#160; 1. http://colorzilla.com/gradient-editor/ Using images to support gradients in your code is history, but writing your code manually can be a bit of work. So here&#8217;s the best GUI approach which gives you the complete code black as you visually adjust the gradient. 2. http://css3please.com If gradients are not your only concern,[...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<h2>1. <a href="http://colorzilla.com/gradient-editor/" target="_blank">http://colorzilla.com/gradient-editor/</a></h2>
<p>Using images to support gradients in your code is history, but writing your code manually can be a bit of work. So here&#8217;s the best GUI approach which gives you the complete code black as you visually adjust the gradient.</p>
<h2>2. <a href="http://css3please.com" target="_blank">http://css3please.com</a></h2>
<p>If gradients are not your only concern, this is the way to go.</p>
<h2>3. <a href="https://browserlab.adobe.com/" target="_blank">https://browserlab.adobe.com/</a></h2>
<p>A great place to compare how your CSS3 and HTMl 5 elements render on older browsers. It offers a two up view for comparison. This one&#8217;s particularly important for coders working on Mac. You can&#8217;t go live with your website without testing it on IE.</p>
<h2>4. <a href="http://html5boilerplate.com/" target="_blank">http://html5boilerplate.com/</a></h2>
<p>Loads up modernizer, jQuery and other essential libraries and provides starting templates to render your site consistently across most browsers. A lighter version of the application would be -</p>
<pre>http://html5reset.org/</pre>
<p>And if you&#8217;re just looking to clean things up without the overhead of templates, I recommend you use this -</p>
<pre>http://necolas.github.com/normalize.css/</pre>
<p>Just download the file and link it to your project root.</p>
<h2> 5.  <a href="http://kuler.adobe.com" target="_blank">http://kuler.adobe.com</a></h2>
<p>If you&#8217;re running our of creativity with a color scheme for your website, this is the site to hit. You can weak one of the existing themes to get started.</p>
<h2> 6. <a href="http://texturise.com/" target="_blank">http://texturise.com/</a></h2>
<p>A great place to morph images and generate patterns. They offer a bunch of gradients ready-to-use off the shelf.</p>
<h2>7. <a href="http://repperpatterns.com/" target="_blank">http://repperpatterns.com/</a></h2>
<p>Take a picture and combine it into a seamless pattern. This is a paid application though.</p>
<h2>8. <a href="http://fontsqirrel.com/">http://fontsqirrel.com/</a></h2>
<p>If you&#8217;re picky about typography, well you should be, and still not using typekit.com, you need to rethink. However if you&#8217;re a control freak and don&#8217;t believe in calling remote fonts  check this site out. You can also check out -</p>
<pre>     http://fontspring.com</pre>
<p>You can use the CSS generator for multiple formats or just upload the format that you have and it will provide you all the other formats necessary. Remember though, online font usage requires a separate licence, even if you&#8217;ve purchased the font.</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/8-life-changing-websites-for-front-end-coders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a flash drive work on both windows and mac</title>
		<link>http://soumasish.com/making-a-flash-drive-work-on-both-windows-and-mac/</link>
		<comments>http://soumasish.com/making-a-flash-drive-work-on-both-windows-and-mac/#comments</comments>
		<pubDate>Thu, 14 Feb 2013 13:59:38 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[file format]]></category>
		<category><![CDATA[flash drive]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[not recognized]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=370</guid>
		<description><![CDATA[I get to hear this very commonly, this flash drive sucks, windows cant even read it. More commonly once you insert a drive into Windows from a mac it asks to format the drive. Go ahead and format the drive and the mac no longer recognizes it as a storage media anymore.[...]]]></description>
				<content:encoded><![CDATA[<p>I get to hear this very commonly, this flash drive sucks, windows cant even read it. More commonly once you insert a drive into Windows from a mac it asks to format the drive. Go ahead and format the drive and the mac no longer recognizes it as a storage media anymore. In all, life sucks!!!<br />
Well there&#8217;s help at hand and indeed it&#8217;s quite simple. In it&#8217;s clean state you need to format a flash drive in a mac using the ex-fat file format. The walkthrough is pretty simple.</p>
<p>Goto Disk Utilities&gt;Erase&gt;Ex-Fat</p>
<p><a href="http://soumasish.com/wp-content/uploads/2013/02/Screen-Shot-2013-02-14-at-4.51.57-PM.png" rel="fancybox[370]"><img class="alignnone size-large wp-image-371" alt="formatting a flash drive in mac" src="http://soumasish.com/wp-content/uploads/2013/02/Screen-Shot-2013-02-14-at-4.51.57-PM-1024x640.png" /></a></p>
<p>And that&#8217;s all that is there to make a flash drive discoverable in both a mac and windows. Happy data transferring guys!!</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/making-a-flash-drive-work-on-both-windows-and-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia&#8217;s Life Saver</title>
		<link>http://soumasish.com/nokias-life-saver/</link>
		<comments>http://soumasish.com/nokias-life-saver/#comments</comments>
		<pubDate>Sat, 15 Dec 2012 08:44:46 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[920]]></category>
		<category><![CDATA[Lumia]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=363</guid>
		<description><![CDATA[Review Nokia Lumia 920 Bearing in mind the fact, that the guys at Nokia House at Espoo, Finland are soon gonna be tenants in a property they once owned, the Nokia Lumia 920 is being hailed as the Armageddon for this Finnish giant. Also keep in mid the fact that[...]]]></description>
				<content:encoded><![CDATA[<h3>Review Nokia Lumia 920</h3>
<p>Bearing in mind the fact, that the guys at Nokia House at Espoo, Finland are soon gonna be tenants in a property they once owned, the Nokia Lumia 920 is being hailed as the Armageddon for this Finnish giant. Also keep in mid the fact that Windows has already slashed down the production of its Surface Tablet.<br />
The Lumia 920 packs Windows 8 and a 4.5 inch IPS display  and introduces PureView camera technology in a bid to compete with the Apple and Samsung.<a href="http://www.t3.com/reviews/samsung-galaxy-s3-review" target="_self"><br />
</a></p>
<p>The slick unibody design makes the Nokia Lumia 920 feel like a sturdy, luxurious slab of chocolate in the hand and is clearly one of the best designed phones from Nokia till date.  The curved body allows ample space for speakers, looks stylish and  brings to the table good spacing of control buttons and a decent speaker at the bottom.</p>
<p>Windows Phone 8 with its vertical scroll works interestingly well on mobiles and continues to make others look like a boring alternative to the flashing tiles and infinitely customisable home screen options found on the Nokia Lumia 920. The bigger screen helps showcase the impressive 8 megapixel camera which is, like everything else, ultra fast thanks to a Snapdragon S4 processor making apps move with zero lag.</p>
<p>The persistent lack of apps and major apps is still the biggest drawback despite Nokia going to great lengths to show Windows Phone 8 in the best way possible. 32GB of internal storage however doesn&#8217;t stall my crib for  the lack of a MicroSD socket.</p>
<p>The IPS display and deep blacks work well &#8211; there’s little glare or reflection from the 4.5 inch screen which, in pixel terms, clocks in at 1280 x 768 pixels per inch. For movies and photos it works brilliantly and though it doesn’t have the best resolution on show, the menus and OS are super clear and bold, designed to match the screen. The end result is that it’s an impressive display that can’t match the best, but offers great colour and depth for the screen size &#8211; it still manages a wow factor against 2012 smartphones.</p>
<p>The Nokia Lumia 920 is the fastest Lumia yet, not that any Lumia could be accused of being slow. The screen itself is responsive and the easy start up menus and integration of contacts and old numbers is as simple as it gets. The exclusive apps like Nokia Drive and SkyDrive options are good and, really, the on-board navigation and clever Local Scout services kick Apple maps into touch &#8211; the Nokia 920 makes the best of them.</p>
<h3></h3>
<p>Has to be said though, that the battery life is disappointing and inconsistent. It’s hard to see what actually uses power but I managed a day with moderate use. The fast wireless charging accessory (simply place your phone on the black plastic charge plate) works well but does get hot and it’s not really a slim bedside table companion.</p>
<h3>Verdict</h3>
<p>Ingenuously chunky with good specs and a brilliant take on Windows Phone 8, there’s lots to like about the Nokia Lumia 920. The battery life and the lack of microSD may be enough to disappoint potential buyers but they would miss out on the advantages of a super-powered Windows phone.</p>
<p>And the nice Nokia extras like Nokia Drive which are so slick, they set a real example of how to do home grown navigation apps. Overall, I still find the Nokia Lumia 920 immense fun and that&#8217;s not something I&#8217;ve said for a long time about Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/nokias-life-saver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FMLE 3.2 not starting up</title>
		<link>http://soumasish.com/fmle-3-2-not-starting-up/</link>
		<comments>http://soumasish.com/fmle-3-2-not-starting-up/#comments</comments>
		<pubDate>Mon, 01 Oct 2012 11:44:36 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=348</guid>
		<description><![CDATA[If you&#8217;re using FMLE 3.2 for Live streaming, this is a common problem that you&#8217;re likely to face at some point of time or other. The program doesn&#8217;t launch. No apparent reason, you click the icon and the program doesn&#8217;t launch. You reboot the machine and try launching it, it[...]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re using FMLE 3.2 for Live streaming, this is a common problem that you&#8217;re likely to face at some point of time or other. The program doesn&#8217;t launch. No apparent reason, you click the icon and the program doesn&#8217;t launch. You reboot the machine and try launching it, it still doesn&#8217;t launch.</p>
<p>I&#8217;m not really a windows guy, so my best possible guess as to why this happens would be a startup profile corruption. &#8220;How&#8221; could be anybody&#8217;s guess!!!</p>
<p>A quick fix &#8211; after setting you preferences to make hidden files visible, navigate to the AppData folder.</p>
<p>C:\Users\Soumasish\AppData</p>
<p>Go to the roaming profile and navigate to the FMLE folder inside Adobe.</p>
<p>AppData\Roaming\Adobe\Flash Media Live Encoder 3.5</p>
<p>This folder contains XML data of the profiles that you&#8217;ve set in the Encoder. It also contains a default profile named start up. Just delete the start up folder and your encoder should get back to life.</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/fmle-3-2-not-starting-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploading to Youtube from an iPhone</title>
		<link>http://soumasish.com/uploading-a-video-to-youtube-from-an-iphone/</link>
		<comments>http://soumasish.com/uploading-a-video-to-youtube-from-an-iphone/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 03:23:25 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=340</guid>
		<description><![CDATA[This is one which I get asked very often. Does the YouTube app let you upload a video in an iOS device. Well the answer is yes and no. The app doesn&#8217;t let you do it directly. It uses an external API. Ok if that&#8217;s getting tecnical, let&#8217;s jump right[...]]]></description>
				<content:encoded><![CDATA[<p>This is one which I get asked very often. Does the YouTube app let you upload a video in an iOS device. Well the answer is yes and no. The app doesn&#8217;t let you do it directly. It uses an external API. Ok if that&#8217;s getting tecnical, let&#8217;s jump right into the modus opernadi. Once you&#8217;ve recorded a video, open it up on your photos app and click the share icon on the left bottom. You get a pop-up with the old YouTube icon and if you&#8217;re logged into your YouTube account on the iPhone, go ahead and upload the video directly.</p>
<p><a href="http://soumasish.com/uploading-a-video-to-youtube-from-an-iphone/img_0054/" rel="attachment wp-att-341"><img class="alignnone size-medium wp-image-341" title="IMG_0054" src="http://soumasish.com/wp-content/uploads/2012/09/IMG_0054-200x300.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/uploading-a-video-to-youtube-from-an-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attaching an image to a mail on the iPhone</title>
		<link>http://soumasish.com/attaching-an-image-to-a-mail-on-the-iphone/</link>
		<comments>http://soumasish.com/attaching-an-image-to-a-mail-on-the-iphone/#comments</comments>
		<pubDate>Mon, 24 Sep 2012 13:03:19 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[iOS 6]]></category>
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=327</guid>
		<description><![CDATA[This is one welcome addition, you could do it before iOS 6 by selecting the image and then emailing it, but c&#8217;mon that like ew. Moreover if you wanted an attachment on a reply, this would entail manual typing of the email address &#8211; not so cool, really. So here&#8217;s the new[...]]]></description>
				<content:encoded><![CDATA[<p>This is one welcome addition, you could do it before iOS 6 by selecting the image and then emailing it, but c&#8217;mon that like ew. Moreover if you wanted an attachment on a reply, this would entail manual typing of the email address &#8211; not so cool, really. So here&#8217;s the new trick. Open up your mail body and touch and hold for a couple of seconds. The magnifier appears and touching that provide the copy/paste selector pop. Refer the images below, if you don&#8217;t know what I&#8217;m talking about.</p>
<p><a href="http://soumasish.com/adding-an-image-to-a-mail-on-the-iphone/img_0050-2/" rel="attachment wp-att-330"><img class="alignnone size-medium wp-image-330" title="IMG_0050" src="http://soumasish.com/wp-content/uploads/2012/09/IMG_00501-200x300.png" alt="" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://soumasish.com/adding-an-image-to-a-mail-on-the-iphone/img_0049/" rel="attachment wp-att-329"><img class="alignnone size-medium wp-image-329" title="IMG_0049" src="http://soumasish.com/wp-content/uploads/2012/09/IMG_0049-200x300.png" alt="" /></a></p>
<p>Now click the right button icon to push the stack into the next frame.</p>
<p><a href="http://soumasish.com/adding-an-image-to-a-mail-on-the-iphone/img_0051/" rel="attachment wp-att-331"><img class="alignnone size-medium wp-image-331" title="IMG_0051" src="http://soumasish.com/wp-content/uploads/2012/09/IMG_0051-200x300.png" alt="" /></a></p>
<p>Voila! there you go click the tab, select the image and send your mail. That easy.</p>
<p><a href="http://soumasish.com/adding-an-image-to-a-mail-on-the-iphone/img_0052/" rel="attachment wp-att-332"><img class="alignnone size-medium wp-image-332" title="IMG_0052" src="http://soumasish.com/wp-content/uploads/2012/09/IMG_0052-200x300.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/attaching-an-image-to-a-mail-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy CSS Tricks</title>
		<link>http://soumasish.com/handy-css-tricks/</link>
		<comments>http://soumasish.com/handy-css-tricks/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 17:57:29 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Gradient]]></category>
		<category><![CDATA[CSS Opacity]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Rounded corners]]></category>
		<category><![CDATA[Translucent background]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=318</guid>
		<description><![CDATA[Well, if you&#8217;re like me &#8211; understand the language of design but dont fancy speaking it, you&#8217;re in the right place. The recession apparently is still not over and once in a while you&#8217;d end up clients where photoshop or illustrator files end up on your machine, waiting to be[...]]]></description>
				<content:encoded><![CDATA[<p>Well, if you&#8217;re like me &#8211; understand the language of design but dont fancy speaking it, you&#8217;re in the right place. The recession apparently is still not over and once in a while you&#8217;d end up clients where photoshop or illustrator files end up on your machine, waiting to be converted into front-end code. Here&#8217;s  few quick CSS 3 tricks  that you&#8217;d need pretty often. I will keep updating this page periodically with stuff that I stumble upon. All codes presented here are optimized for most browsers &#8211; Ok it&#8217;s not gonna work on Babbage&#8217;s Mark V, but for the rest of us&#8230;.</p>
<h3>Rounded corners</h3>
<pre>div {</pre>
<pre>-moz-border-radius: 10px;
 -webkit-border-radius: 10px;
 -khtml-border-radius: 10px;
 border-radius: 10px;</pre>
<pre>}</pre>
<p>Just suit the radius to your liking and apply it on the suitable div.</p>
<h3>Transparency</h3>
<pre>/* Theoretically for IE 8 &amp; 9 (more valid) */ 
 /* ...but not required as filter works too */
 /* should come BEFORE filter */
 -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

 /* This works in IE 8 &amp; 9 too */
 /* ... but also 5, 6, 7 */
 filter: alpha(opacity=50);

 /* Older than Firefox 0.9 */
 -moz-opacity:0.5;

 /* Safari 1.x (pre WebKit!) */
 -khtml-opacity: 0.5;

 /* Modern!
 /* Firefox 0.9+, Safari 2?, Chrome any?
 /* Opera 9+, IE 9+ */
 opacity: 0.5;</pre>
<p>Again suit the opacity to your liking(instead of 0.5 -0.3) and you&#8217;re good to go.</p>
<h3>CSS Gradient</h3>
<p>For CSS gradient, I normally use this URL</p>
<p>http://www.colorzilla.com/gradient-editor/</p>
<p>Ideally, choose a preset tonality and change colours to suit your page contents. Copy the code and place it in the relevant div.</p>
<p>Border Collapse</p>
<h3>Collapsing Divs</h3>
<p>If you have a div nested inside a parent div, adding a float property to the child, leads to the parent div losing its height or collapsing and  your site breaks. A quick and easy fix is to add an empty div as the last semantic element before closing the parent div, with the following property.</p>
<pre>.clear_float{
      clear:both;
 }</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/handy-css-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 5 Release</title>
		<link>http://soumasish.com/iphone-5-release/</link>
		<comments>http://soumasish.com/iphone-5-release/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 18:22:22 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[A6]]></category>
		<category><![CDATA[Bluetooth 4.0]]></category>
		<category><![CDATA[iOS 6]]></category>
		<category><![CDATA[iPhone 5]]></category>
		<category><![CDATA[Lightning]]></category>
		<category><![CDATA[NFC]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=306</guid>
		<description><![CDATA[After all that wait, iPhone 5 finally arrives, and indeed they call it iPhone 5. The design looks similar to 4S, though this phone is significantly taller(not wider) to continue one hand usability. For all those who missed the live blog at endgadget, here&#8217;s some facts about the new iPhone[...]]]></description>
				<content:encoded><![CDATA[<p>After all that wait, iPhone 5 finally arrives, and indeed they call it iPhone 5. The design looks similar to 4S, though this phone is significantly taller(not wider) to continue one hand usability. For all those who missed the live blog at endgadget, here&#8217;s some facts about the new iPhone 5. I know you&#8217;re yearning to get your hands on it, but till then &#8230;..</p>
<p><a href="http://soumasish.com/iphone-5-release/img0642/" rel="attachment wp-att-314"><img class="alignnone size-full wp-image-314" title="img0642" src="http://soumasish.com/wp-content/uploads/2012/09/img0642.jpeg" alt="" /></a></p>
<p>The iPhone 5 is the thinnest and lightest iPhone yet. 7.6mm thick, 18% thinner than before. It&#8217;s the world&#8217;s thinnest smartphone, and weighs 112 grams. 20% lighter than the 4S.<br />
<a href="http://soumasish.com/iphone-5-release/img0293/" rel="attachment wp-att-307"><img class="alignnone size-full wp-image-307" title="img0293" src="http://soumasish.com/wp-content/uploads/2012/09/img0293.jpeg" alt="" /></a></p>
<p>The iPhone 5 sports a 326ppi Retina display, 4-inches. 1136 x 640 resolution. Same width, but taller. It has five rows of icons, plus the four shortcuts on the bottom. The phone offers 44% better color saturation, full sRGB rendering. It supports GPRS, EDGE, EV-DO, HSPA, HSPA+, DC-HSDPA and LTE! HSPA+ is 21Mbps, DC-HSDPA is 42Mbps, and LTE is a max of 100. So that&#8217;s a major concern addressed.</p>
<p><a href="http://soumasish.com/iphone-5-release/img0299/" rel="attachment wp-att-309"><img class="alignnone size-full wp-image-309" title="img0299" src="http://soumasish.com/wp-content/uploads/2012/09/img0299.jpeg" alt="" /></a></p>
<p>Apple still refuses to tread the quad core route. A new chip surely, the A6! 2X faster CPU and 2x graphics compared to the A5 &#8212; is this compared to the A5 or A5X?<br />
With the new processor Pages is said to launch 2.1X faster than before and Keynote attachments load 1.7X faster. The battery life is 8 hours of 3G or LTE talk time or browsing and 10 hours on WiFi browsing.</p>
<p>The Camera is the same as 4S, but offers panorama now.The front-facing camera though is now 720p, backside illuminated.<br />
Finally the long discussed connector port. The new connector port is called lightning &#8211; it&#8217;s 80% smaller. Apple now owns both the Thunderbolt and Lightning.</p>
<p><a href="http://soumasish.com/iphone-5-release/img0305/" rel="attachment wp-att-310"><img class="alignnone size-full wp-image-310" title="img0305" src="http://soumasish.com/wp-content/uploads/2012/09/img0305.jpeg" alt="" /></a></p>
<p>Ofcourse it launches iOS 6. I caught up Apple updating its site for the new pricing and download. As per the keynote, the pricing remains the same as iPhone 4S on the contractual rates. But that&#8217;s not what we&#8217;re interested in, here in the Middle East. So have to wait a few more hours for the official unlocked pricing ot be launched.</p>
<p><a href="http://soumasish.com/iphone-5-release/screen-shot-2012-09-12-at-9-03-50-pm/" rel="attachment wp-att-311"><img class="alignnone size-large wp-image-311" title="Screen Shot 2012-09-12 at 9.03.50 PM" src="http://soumasish.com/wp-content/uploads/2012/09/Screen-Shot-2012-09-12-at-9.03.50-PM-1024x640.png" alt="" /></a></p>
<h5>What did we miss then?</h5>
<p>No NFC, unfortunately, nor any talk about using Bluetooth 4.0 for near-field communications. No wireless charging, either. You&#8217;ll need to keep that Lightning cable handy and, no micro-USB compatibility. That port indeed doesn&#8217;t look to be compatible.</p>
<p>Pre-orders start on Friday the 14th. Shipping on September 21st in the US, Canada, UK, Germany, France, Australia, Japan, Hong Kong and Singapore. Seems like my brother has a busy week ahead in Atlanta - queuing up, buying and then shipping it all the way up here is a lot of work for sure.</p>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/iphone-5-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 Audio and Video Demystified</title>
		<link>http://soumasish.com/html-5-audio-and-video-demystified/</link>
		<comments>http://soumasish.com/html-5-audio-and-video-demystified/#comments</comments>
		<pubDate>Tue, 11 Sep 2012 09:55:09 +0000</pubDate>
		<dc:creator>soumasish</dc:creator>
				<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://soumasish.com/?p=274</guid>
		<description><![CDATA[There&#8217;s a still some time to go before HTML 5 dominates audio/video playback on the web, since most browsers, as of today, support video to some extent and the shape of things to come still isn&#8217;t very clear. As much as I wish all browsers supported HTML 5 completely, or[...]]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a still some time to go before HTML 5 dominates audio/video playback on the web, since most browsers, as of today, support video to some extent and the shape of things to come still isn&#8217;t very clear. As much as I wish all browsers supported HTML 5 completely, or every internet user used chrome alone, cross-browser compatibility continues to remain a reality and we developers can&#8217;t escape progressive enhancements. In this blog, I&#8217;ve tried to address web audio and video from a conceptual standpoint &#8211; things as they stand and where they&#8217;re possibly headed. Bear in mind both Video and Audio come from the same media element in HTML 5 and share the same DNA, thus if I talk about video alone at places, you can safely assume the same holds true for audio as well.</p>
<p>Go back a few years into early 2000 and web video started with plugins like real player, quicktime and windows media player. There wasn&#8217;t a clearly dominant plugin at that time and web developers would often try to support all three to make sure video could reach as much of their audience as possible. Then Flash came along and dominated the scene for a few years and even today Flash continues to be the predominant standards for video delivery over the web. With the rise of Flash browser developers around the world started playing with the idea of including audio/video as a component of HTML much like image and text. Opera introduced a video tag in early 2007 and played using a native player. From this the HTML 5 video concept was born and browser developers around the world continued to refine the specifications for video delivery on the web.<br />
The inertia of change would have delayed the natural course of development further had it not been Apple unceremoniously dropping Flash support on its mobiles and tablets. HTML 5 thus became the order of the day if you had to deliver contents on iOS devices.  With HTML 5 video delivery every browser uses its own player and thus one could be very different from the other as opposed to Flash, which being a plugin, basically runs the same code running across browsers.<br />
Though browser developers have done a commendable job in supporting HTML 5 specification as to how the video tag should be parsed, yet the components and formats are vastly different.</p>
<h5>So can we use HTML 5 video as of today?</h5>
<p>Yes, but with a list of caveats. IE 9, Safari 3, Firefox 3.5, Chrome 3 and Opera 10.5 onwards all browsers support HTML 5 video, but to varying extents.<br />
I often get asked, &#8220;Why should we use HTML 5 Video in any case?&#8221;<br />
Aside from the fact that it supports iOS devices, one big reason, is that&#8217;s the future and we&#8217;ll all be there eventually. That&#8217;s not the best reason though as, if you wait, you&#8217;ll find working with HTML 5 easier after most kinks are worked out. Second, would be cleaner code &#8211; use of one simple video tag as opposed to a bulky script for a plugin. However at present times, with multiple fall back options the code might actually get bulkier than plain Flash. This leads us to the third reason &#8211; HTML 5 video is rendered natively by the browser and not through a plugin, the video playback is thus smoother and more responsive.  And this gets us to the meat of our discussion today &#8211; not all browsers support all video formats. So let&#8217;s take a deeper look into what formats are all about and who supports what?</p>
<h5>Audio &amp; Video Formats</h5>
<p>A video/audio format is essentially made up of three pieces &#8211; the container format which essentially gives the file extension, inside which you have your video data which is compressed using a video codec and audio data compressed using an audio codec.</p>
<p><a href="http://soumasish.com/html-5-audio-and-video-demystified/video_formats/" rel="attachment wp-att-279"><img class="alignnone size-full wp-image-279" title="video_formats" src="http://soumasish.com/wp-content/uploads/2012/09/video_formats.png" alt="" /></a></p>
<p>HTML 5 supports three principal video formats &#8211; mp4, Ogg Thora and WebM.<br />
The mp4 container supports H.264 video and AAC audio compression.Mp 4 is avery popular format and if you have a handheld video device, you&#8217;re most likely storing video in that format. It&#8217;s a closed format and there are licensing issues involved. Safari 3, IE 9 and Flash 9 supports the format &#8211; thus this is the format to reach iOS devices which essentially sports a mobile Safari.</p>
<p>&nbsp;</p>
<p><a href="http://soumasish.com/html-5-audio-and-video-demystified/video_mp4/" rel="attachment wp-att-280"><img class="alignnone size-full wp-image-280" title="video_mp4" src="http://soumasish.com/wp-content/uploads/2012/09/video_mp4.png" alt="" /></a></p>
<p>&nbsp;</p>
<p>The Ogg Theora format is made up of the Ogg container with Theora video codec and Vorbis audio codec. The format is free and open source and is supported by Firefox 3.5, Chrome 3 and Opera 10.5 and above. The only issue with Ogg is that it requires bigger file sizes to render the same quality as with the other two formats.</p>
<p><a href="http://soumasish.com/html-5-audio-and-video-demystified/video_ogv/" rel="attachment wp-att-283"><img class="alignnone size-full wp-image-283" title="video_ogv" src="http://soumasish.com/wp-content/uploads/2012/09/video_ogv.png" alt="" /></a></p>
<p>The Web M format uses the webm container with the VP8 video codec and Vorbis audio codec. It is supported by Firefox 4, Chrome 6 and Opera 10.6 and above and is an open source format. Significant to mention here that web M technology was created after google bought On2 for VP8 video codecs. The format is comparable to H.264 in terms of quality and also completely free, thus it has the maximum likelihood of becoming a standard HTML 5 format if there is one in the future.</p>
<p><a href="http://soumasish.com/html-5-audio-and-video-demystified/video_webm/" rel="attachment wp-att-285"><img class="alignnone size-full wp-image-285" title="video_webm" src="http://soumasish.com/wp-content/uploads/2012/09/video_webm.png" alt="" /></a></p>
<p>In case of audio, the formats are mostly the same containers with only audio data in them. In fact, in some cases, there isn&#8217;t even a container only compressed audio data. Mp3 files for example have not containers. Mp3 is supported by Safari, IE9 and Chrome. AAC is the same as H.264 without the video data and often has the extension .m4a, to distinguish from the video content and is supported by the same browsers as mp3. AAC is a successor to mp3 and renders a higher quality, however both are closed source, so if you&#8217;re charging for your audio, make sure you understand the licensing agreement. The Ogg audio files typically have the extension .oga and uses the same vorbis audio codec. Ogg Vorbis is supported by Firefox, Chrome and Opera. Finally comes the .wav format which doesn&#8217;t use any audio codec and stores data in an uncompressed pcm format, the same format used in CDs. Wav is supported by most HTML 5 browsers, but it&#8217;s unlikely to make the cut, primarily b&#8217;coz of file sizes.</p>
<p>Now that we know all that we need to know about HTML 5 audio and video formats, time to get our hands dirty with some code to get you up and running.<br />
The video tag is a simple open and close tag which contains your video attributes and even fall back contents if your browser doesn&#8217;t support HTML 5.</p>
<pre>&lt;video&gt;</pre>
<pre>&lt;p&gt; Update your browser, bummer!!! &lt;/p&gt;</pre>
<pre>&lt;/video&gt;</pre>
<p>Now you can add the source -</p>
<pre>&lt;video src = "../myFolder/myVideo.ogv " &gt;</pre>
<p>At this stage if you open up your page in a browser it would show you the first frame without any controls to play the content. So we need to add a few controls.</p>
<pre>&lt;video src = "../myFolder/myVideo.ogv "  controls&gt;</pre>
<p>That simple, it&#8217;s a boolean attribute, so if its present it&#8217;s true, otherwise false. It&#8217;s exactly same with audio.</p>
<pre>&lt;audio src = "../myFolder/myAudio.oga "  controls&gt;</pre>
<pre>&lt;p&gt; Fallback content&lt;/p&gt;</pre>
<pre>&lt;/audio&gt;</pre>
<p>Ok this is all it would be, another five years down the line when all browsers support HTML 5. But in today&#8217;s date if you load this page up in IE 6,7 or 8 or iOS devices, you hav a peeved audience, one amongst more than half  of your audience. So clearly you need to cater to fall back contents. So, hate as much as you&#8217;d, but its time to get your hands dirty with alternate.</p>
<p>The video file  format I&#8217;ve used above wouldnt work on Safari or Chrome and to support multiple formats we use the source tag. The tag is self closing and all we need to do is remove the src attribute from the video tag. It also has a type def. The way it works is that the browser will look from top to the bottom to see the list of sources which it can play and would start playing the one it supports.</p>
<pre>&lt;video controls&gt;</pre>
<pre>&lt;source src = "../myFolder/myVideo.mp4" type = "video/mp4" /&gt;</pre>
<pre>&lt;source src = "../myFolder/myVideo.ogv " type = "video/ogg" /&gt;</pre>
<pre>&lt;source src = "../myFolder/myVideo.webm " type = "video/webm" /&gt;</pre>
<pre>&lt;p&gt; Fallback content&lt;/p&gt;</pre>
<pre>&lt;/video&gt;</pre>
<p>Last time, I checked, a bug in the iPad prevents it from scanning through the entire list of sources, thus you&#8217;d do good to place your mp4 source on top of the list. To add a smoother rendering experience you can add the <em>preload</em> attribute which enumerates between <em>none</em>, <em>auto</em> and <em>metadata</em>. With none, even the first frame will nto be loaded, with auto once the page is loaded the browser continues to load the video in the background and waits for the user to push play and finally with metadata selected the browser loads the meta information, ie frame size, duration and first frame and not the video itself.</p>
<pre>&lt;video controls preload="metadata"&gt;</pre>
<p>You can also add the <em>autoplay</em> boolean attribute to your video tag and make the video loop using the <em>loop</em> boolean tag.</p>
<pre>&lt;video controls preload="metadata" autoplay loop&gt;</pre>
<p>Finally if you feel the first frame of your video doesn&#8217;t adequately represent the content, you can add a poster frame as place holder before the video starts playing. just poing the poster attribute to the source image.</p>
<pre>&lt;video controls preload="metadata" poster = "../myImageFolder/myImage.png"&gt;</pre>
<p>That&#8217;s it. Goes without saying, I would add flash to my fall back contents, as not doing that might still leave out 50% of my audience.</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://soumasish.com/html-5-audio-and-video-demystified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
