Showing posts sorted by relevance for query HLS. Sort by date Show all posts
Showing posts sorted by relevance for query HLS. Sort by date Show all posts

Monday, June 06, 2011

HLS: HTTP Live Streaming

Originally created by Apple, it works by breaking a video stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unlimited video stream. 


By using only standard HTTP transactions just like normal web pages, HLS is capable of traversing any firewall or proxy server that lets through standard HTTP traffic. This is very different then UDP-based protocols such as RTP.

This also makes it a little easier for Content delivery networks to implemented for any given stream since standard web servers can used to server live and recorded video now.

As the stream is playing, the player application can select from number of different alternate streams containing the same material encoded at different data rates, allowing the streaming session to adapt to the available speed of your Internet connect, known as Adaptive bit rate.

http://en.wikipedia.org/wiki/HTTP_Live_Streaming
http://developer.apple.com/resources/http-streaming/



Apple submitted HTTP Live Streaming to the IETF in 2009 as a proposed standard. This is the latest draft of the RFC at the time of this article being written.  http://tools.ietf.org/html/draft-pantos-http-live-streaming-06

Adobe added HTTP Live Streaming support to Flash Media Server. Last year Adobe came up with it's own HTTP-based streaming protocol HTTP Dynamic Streaming. The main difference is that its HTTP Dynamic Streaming uses an XML-based manifest file instead of a plain-text playlist file and the MPEG-4 fragment container format (.f4f). Also, it's only compatible with Flash Player and Adobe AIR.


Adobe throws in towel, adopts HTTP Live Streaming for iOS
Adobe's new Flash DRM comes with selective output control

HTTP Live Streaming, FFMPEG & FFSERVER, and iPhone OS 3



Monday, July 18, 2011

Sunday, November 13, 2011

Fwd: 3D CineCast



---------- Forwarded message ----------
From: 3D CineCast
Date: Sun, Nov 13, 2011 at 4:20 AM
Subject: 3D CineCast
To: john.sokol@gmail.com


3D CineCast


Rapid Adoption of ID System Speeds Multiscreen Rollouts

Posted: 12 Nov 2011 07:56 AM PST

A simple but essential new pan-industry method for keeping track of entertainment content and the metadata that's essential to monitoring usage and enabling navigation and other applications is already paying off in activities across the digital landscape. Known as EIDR (Entertainment ID Registry), the platform employs numerical IDs to provide a solution for identifying digital movie and TV content in commercial distribution, regardless of platform or distribution channel.

"The film and TV industry hasn't been very good at tracking compared to what we see in retail stores," says Jud Cary, vice president and deputy general counsel at CableLabs, one of the founding entities in the EIDR initiative. "What we're doing is very similar to UPC (the Universal Product Code barcode system) in dry goods."

People and applications alike can search the registry via Web user interfaces or Web service APIs using the numerical ID that's been assigned to a given piece of content submitted by a content owner or other registrant to immediately access all the metadata descriptions associated with that content. The numerical tags create a uniform basis for tracking content usage and developers can use the APIs to integrate the registry features with their applications and automated workflows.

"When you're trying to deliver content in multiple formats to multiple devices, it gets exponentially complex to keep track of each movie or TV program and to make the back office work efficiently," Cary says. "You can have hundreds of permutations of a given piece of content once you start talking about clips, different cuts, different encoding and distribution formats."

EIDR, which began over two years ago as a development project spearheaded by MovieLabs, CableLabs, Comcast and Rovi Corporation with backing from many individual studios and other entities, launched in early 2011 and now is anchoring content initiatives across the ecosystem.

"Complete, accurate and consistent metadata is key to our products and features such as browse, search, filter and recommendations," notes Steve Heeb, vice president of business development at Comcast. "The use of EIDR will enable us to develop a robust and accurate database of program metadata from multiple sources that can be used across multiple platforms, including VOD, linear and online."

A big advantage for content producers is the impact EIDR is likely to have on monetization, leading to more aggressive use of online distribution. "EIDR makes it easier for content producers to track and get paid for ad impressions and the use of their assets," Cary says.

For example, Warner Bros. has invested in several technology initiatives to streamline and automate online interactions with retailers, vendors and consumers, says Darcy Antonellis, president of Warner Bros. technical operations. "EIDR is a key component of these initiatives, providing a global, unique identifier for content assets as they move from creation to consumption," Antonellis explains.

"Just as our advertising colleagues have seen a need to use a unique ID system for ads, the need for a unique ID to track media and entertainment flowing online also has become obvious," she continues. "We are actively integrating EIDR into our content workflow and are working with retailers like Microsoft to incorporate the standard over the coming months."

Similarly, Disney has made EIDR part of its infrastructure supporting multiple digital initiatives, says Arnaud Robert, Disney's senior vice president of distribution technology. "We have implemented EIDR into our metadata and internal digital workflows, and, working with our distribution partners, we intend to extend its usage to our various distribution channels," Robert says.

Rovi, a major holder of metadata from movies and programming going back to the dawn of broadcast TV, played a major role in contributing records to "prime the pump," Cary says. Comcast and others with significant data bases contributed as well.

The non-profit EIDR operation is designed to draw as much content into the database as possible, he adds. "The idea is the fees to join are so ridiculously low anyone can participate," he says, noting that costs are tiered for contributors to where the highest level is only $5,000, which "gives you unlimited access and registrations." At the promoter level, where the fee is in the $35,000 range, entities are entitled to be on the EIDR board.

An important new factor in driving participation is the support of two influential industry organizations – The Digital Entertainment Group (DEG), a Hollywood marketing engine, and the Hollywood IT Society (HITS). The two are working together to help drive adoption among studios, post-production houses and service providers.

Source: ScreenPlays

Not Just Mobile: Adobe is Abandoning Flash on TVs as Well

Posted: 12 Nov 2011 07:06 AM PST

Adobe announced Wednesday that it would be abandoning its work to enable rich applications on mobile devices through Flash, and would be focusing on HTML5 and Adobe AIR apps instead. But at the same time that it was working on bringing Flash video and applications to mobile devices, it was also hoping to bridge the divide between web video and what could be watched on connected TVs. So what happens to those efforts?

While the market for TV apps is incredibly fragmented, it doesn't appear that Adobe's Flash will provide a solution. The company confirmed through a statement that like mobile, it will no longer focus on porting the Flash plugin into web browsers on CE devices, but believes developers should build native apps on those devices instead. An Adobe spokesperson writes:

"Adobe will continue to support existing licensees who are planning on supporting Flash Player for web browsing on digital home devices and are using the Flash Player Porting Kit to do so. However we believe the right approach to deliver content on televisions is through applications, not a web browsing experience, and we will continue to encourage the device and content publishing community down that path."

Adobe's efforts to bring Flash to connected TVs, Blu-ray players and other devices, like its mobile Flash plans, were part of its Open Screen Project, which aimed to create a consistent app runtime across multiple devices. The idea was that developers would be able to create a Flash application once and be able to distribute it across web browsers, mobile devices and TVs.

Two-and-a-half years ago, Adobe announced a number of partnerships with OEMs and system-on-chip vendors such as Broadcom, Intel, STMicroelectronics, NXP Semiconductors and Sigma Designs to embed the Flash player into their silicon. But the number of TVs and other CE devices that support the Flash player have been limited to those from Sony and Logitech running the Google TV operating system. And Google TV has hardly been a success.

Now, Adobe is taking a step back from those plans, but not abandoning the TV app segment altogether. Instead of pushing multi-screen browser-based Flash applications, Adobe is hoping to convince developers to create native apps on mobile and TV devices using the Adobe AIR framework. Already some developers are taking advantage of that framework, with publishers like CNet, Epix and YouTube building TV apps for Samsung TVs based on Adobe AIR.

By Ryan Lawler, GigaOM

MPEG DASH: The File Format of the Future?

Posted: 12 Nov 2011 06:52 AM PST

"If HLS were perfect, DASH would not exist," said Thierry Fautier, Harmonic's senior director of telco solutions, referring to Apple's proprietary HTTP Live Streaming (HLS) protocol and the newer MPEG-backed Dynamic Adaptive Streaming over HTTP (MPEG DASH) standard specification.

"What Apple has introduced to IETF (Internet Engineering Task Force) is merely an informational draft," added another panelist on the five-person panel. "We don't see that they're necessarily planning to push HLS as a true internet standard."

The MPEG DASH panel, led by Microsoft's Iraj Sodagar, who has chaired the MPEG subcommittee on DASH for the past year, was a hot ticket at the 2011 Streaming Media West show, held this week in Los Angeles.

"More than 50 companies and 90 experts have contributed to the MPEG-DASH specification," said Sodagar during his introductory remarks, "including Apple, Adobe, and all the companies represented here today. The proposed first-step of MPEG DASH is on the verge of completion, and we feel we took best of best practices and incorporated them into the standard."

"The growth of video over mobile networks is exponential, from a Qualcomm perspective," said Mike Luby, Qualcomm's vice president of technology. "As such we see getting standardization around video as very important and we participated heavily in the standards committee to make sure there was an adaptive-optimized common format that can be delivered via standard web servers, using common encryption."

The Common File Format (CFF) that Luby refers to is based on the UltraViolet CFF that the Digital Entertainment Content Ecosystem (DECE) published along with a Common Encryption (CENC) scheme that uses five distinct Digital Rights Management (DRM) schemes in an interoperable manner.

"We also see a value in unmuxed audio and video," added Luby, using an example of non-multiplexed elementary audio streams in a variety of languages for an "online DVD" equivalent as an example. "Above all, we welcome the chance to use a modern file format all delivered in an open standard."

Will Law, Akamai's principal architect for media engineering, offered his perspective from a Content Delivery Network (CDN) perspective.

"We're pushing 8.5 terabits today," said Law, referring to a recent peak record that Akamai set for simultaneous CDN content delivery. "We've spent the past five years delivering a variety of adaptive video formats—Smooth Streaming, HLS and HDS—all of which are 80 percent the same but 100 percent incompatible," said Law.

"We need to use HTTP to keep up with the demand curve for video on the web, but we can't do it with proprietary servers, since that means splitting our resources into three parts and trying to deliver equally to all three parts," he added. "What we really need to do is use all our edge cache servers for one standard, so that we and our users can focus on content and marketing rather than replicating the same thing three times for three separate streaming server solutions."

Asked by an audience member about the benefit of an HTTP solution, using standard HTTP servers, for Akamai as a CDN, Law said he felt Akamai's intelligent cloud could do some interesting things at the edge of DASH that standard HTTP servers cannot do.

A representative from Netflix, senior engineer Mark Watson, said that MPEG-DASH was a natural extension of what his company is already doing to deliver fragmented MPEG-4 video via HTTP to a large number of streaming customers.

"We're already using these file formats, and we see huge cache efficiencies of a single file format," said Watson. "We feel we can lower CDN costs by using a standard web but we also see the DRM agnosticism of MPEG DASH across multiple consumer electronics devices using Common Encryption (CENC) will benefit premium content owners whose content we deliver.

Watson also alluded to the online DVD equivalent, thanks in part to the use of elementary streams (those not multiplexed together like Apple's proprietary HLS protocol).

"We see unmuxed audio and video elementary streams as a way to effortlessly allow multi-language experiences," said Watson, "mimicking the offline multi-audio DVD experience. In doing so, we see a huge benefit to having an open standard that's a collaboration of a number of companies in the streaming space."

Fautier also said that, in connected TV space in Europe, there's a move to go to MPEG DASH.

"We expect to see a common file format with common encryption beginning in 2012," said Fautier, "perhaps using Marlin, one of the five DRM schemes, as a standard. France and Spain will be implementing first."

By Tim Siglin, StreamingMedia

Saturday, November 19, 2011

OTT Video Delivery

OTT = Over The Top, basically is a fancy way to say streaming video from the Internet.   So they are thinking it terms of how much content viewers consume from them vs. that goes over the top of them, as in over there Cable Modems without them getting a cut. 

From their perspective as the toll keepers of the bridge, they expects payment for each cart of goods crossing the river.  Now people have a way not only over the river but across their bridge and not pay them (as in the Internet DOCSIS service) .  Yea I know they are charging me $50 a month for it, true, but when I read or talk to people in that space it always is phrased to sound like it's a direct loss to them.   The term OTT is indicative of that. 

It's a terrible way to think about the Internet service you are expected to provide to your customers. 

Certainly their Incentives aren't aligned with where they need to be in the future if the expect to remain in a similar position that they are in today.  

If they can only change there perspective the path forward is obvious, but I don't think they can right now. 

John


---------- Forwarded message ----------
From: 3D CineCast
Date: Sat, Nov 19, 2011 at 4:04 AM
Subject: 3D CineCast
To: john.sokol@gmail.com



OTT Video Delivery

Posted: 18 Nov 2011 09:12 AM PST

OTT video, or streaming media, is an evolving set of technologies that deliver multimedia content over the Internet and private networks. A number of online media platforms are dedicated to streaming media delivery, including YouTube, Brightcove, Vimeo, Metacafe, BBC and Hulu.

Streaming video delivery is growing dramatically. According to the comScore 2009 U.S. Digital Year in Review Video Metrix, Americans viewed a significantly higher number of videos in 2009 than in 2008 (up by 19 percent) because of both increased content consumption and the growing number of video ads delivered.


In January 2010, more than 170 million viewers watched videos online. The average online viewer consumed 187 videos in December 2009, up 95 percent over the previous year, and the average video duration grew from 3.2 to 4.1 minutes.

Hulu, for example, in that same month delivered more than 1 billion streams for a total of 97 million hours. According to comScore, the character of video viewing is changing as well, with more people watching longer content.

There is a growing effort by broadcasters to make regular TV content available online. For example, the BBC has developed the BBC iPlayer and the bbc.co.uk website to support replication of most BBC broadcast material. The service has been outstandingly successful: 79.3 million requests were serviced in October 2009. NBC coverage of the 2010 Winter Olympics included live and recently recorded content, complete with commercials.

Whenever there is the possibility of a large or dynamic viewer audience, a reliable CDN is required. CDNs once only used to replicate website content around the world. Now, they have expanded dramatically to handle streaming media. Research and markets estimated the value of CDN services for 2008 at $1.25 billion, up 32 percent from 2007.

Top CDNs include Akamai, Mirror Image Internet, Limelight Networks, CDNetworks and Level 3. Streaming media services must deal with content collected from disparate sources and distributed to a growing number of devices.



Technology Trends
The most common network protocol used to transport video over IP networks is the Real Time Streaming Protocol (RTSP). RTSP is a stateful protocol used to establish and control media sessions between a media server and client viewer. RTSP clients issue VCR-like commands to control media playback. The transmission of the audio/video stream itself is most often handled by the Real-time Transport Protocol (RTP), although some vendors have implemented their own transport protocol. RTSP and RTP are almost universally used to implement VOD features.

Most video players, such as the Adobe Flash Player, use proprietary protocols that provide additional functionality and flexibility. Flash Player has an almost total presence on PCs and Macs, and is used to deliver more than 80 percent of online videos. The Adobe Flash Player is a lightweight client embedded in Web browsers. Adobe uses the Real Time Messaging Protocol (RTMP) to deliver streaming content, providing multiple independent channels, which are used to control and deliver content. RTMPT is an RTMP variant that encapsulates RTMP packets in HTTP.

First released in 2007, Microsoft's Silverlight player is growing in popularity within the player market. The Silverlight player uses HTTP as its top-level transport mechanism and for media streaming. Using HTTP as a single transport mechanism can result in significant internal cost reduction for end-to-end delivery. Silverlight includes Digital Rights Management (DRM) features similar to those available in Adobe Flash.

HTTP Live Streaming (HLS) is a media streaming specification that is developed by Apple that uses HTTP as the transport. Devices such as the iPhone, iPad and Apple-compatible platforms support this streaming technology. The "Live" is misleading in the name, as this technology works for on-demand and live streaming. HLS supports streaming media that is segmented into smaller chunks of data, to improve delivery and user experience. An Extended M3U Playlist format file is used that contains the media segments to download.

Modern streaming media technologies adapt to changing network conditions, especially those related to mobile devices. As conditions degrade or improve, the player requests an alternate lower or higher bit rate media stream. Multiple flows are prebuilt or constructed at multiple bit rates and divided into chunks so that a player can seamlessly switch different flows.

The ability for a video player to adapt to varying network conditions is termed differently across players. In the Silverlight player, it is called Smooth Streaming; Adobe Flash 10.1 terms it HTTP Dynamic Streaming; and Apple iPhone's HLS refers to it as adaptive streaming.

How is IPTV Delivered?
Delivery of video to the consumer has undergone rapid change in recent years and is guaranteed to continue to do so in the future. Cable TV networks deliver a large range of content, and the ability to provide user interactive features, including VOD.

Carrying the most promise for the future is delivery of video over multiservice IP networks. This is commonly referred to as IPTV. It is delivered as a triple-play service to consumers that include High-Speed Internet (HSI) and VoIP.

Video over IP Information Flow
The major components and data flow in IPTV networks consists of media and control flowing between content servers and home networks.

The two types of video services delivered are linear broadcast and VOD. Both have dramatically different characteristics that affect the networks that handle them. Broadcasts are regularly scheduled programs sent to large numbers of subscribers. It is sent efficiently over multicast IP routes.


VOD service delivery exhibits an entirely different behavior from linear broadcast service. Stored videos are sent to the subscriber on demand. Each subscriber receives his or her own video flow, which they can control with VCR-like controls.


The differences are responsible for the complexity of the delivery network. Broadcast TV over IP is primarily a one-way channel, using well-understood multicast protocols. The home network is responsible for multicast messages and image display. VOD adds another level of complexity. Requests for and control of video content are transmitted upstream from the subscriber to the service provider using RTSP. Video content is returned to the subscriber through RTP.

IPTV Delivery Challenges
Until differentiating services are developed for IP-based video-voice-data networks, IPTV services will continue to be compared with traditional TV, cable and satellite service. As such, the IP delivery network must remain transparent to customers.

Customers expect video quality and service availability to be on par or better to make the switch. With multiple choices available to consumers, there is little tolerance for poor quality and operational problems. A poorly engineered network can lead to substantial customer churn.

To successfully deploy IPTV, the following end-user requirements must be addressed:
  • Video quality: subscribers' perception of quality must be the same or better than other alternatives;
  • Minimal channel change delay: because instant response is expected;
  • Assured service delivery and availability for an always-on service.

IPTV Testing Requirements
Service providers must systematically test and verify network devices in each of the video transport architectures, including video content servers, core and edge routers, access devices, and customer premises equipment. Such testing provides an understanding of individual device performance and may determine how much impact each has on the overall system.

System-level tests that incorporate more than one demarcation point in the transport architecture are required. In this way, a clear understanding of how well the individual systems play with each other is determined.

Finally, the network must be tested end-to-end. Most standard routing and forwarding performance tests should be performed, looking at packet loss or latency under different load conditions.

Test Methodologies
All types of video testing, both OTT and IPTV, require testing through large-scale subscriber emulation. That is, large user communities must be simulated performing "normal" activities in order to exercise video components, subsystems and end-to-end delivery. "Normal" activity is directly related to the type of video delivery.

IPTV
Broadcast IPTV delivery is highly dependent on multicast operation. In order to avoid sending individual programs to individual users, all viewed channels are broadcast to all users wishing to view particular channels.

It is up to the STB and all routers between the source(s) and the subscriber(s) to join and leave multicast groups that correspond to a particular broadcast stream.

Broadcast IPTV testing requires emulation of subscribers engaged in two types of behavior:
  • Requesting a channel (joining a multicast group), watching for a period of time and then requesting an alternate channel (leaving one group and joining another);
  • Rapidly changing channels, often called "channel zapping".

During this type of testing, the critical measurements are:
  • Video quality, largely related to jitter and drop outs. Several types of quality of experience metrics, including VMOS and VQMon, produce values that are closely related to how viewers "feel" about their experience;
  • Channel change latency — that is, the time between channel change request and response.

VOD
VOD stream delivery is point-to-point, as opposed to multicast. VOD users have VCR-like buttons at their disposal: play, pause, fast forward, rewind and stop. VOD testing requires emulation of subscribers engaged mostly in viewing and occasionally in VCR-like control activities.

During this type of testing, the critical measurements are:
  • Video quality, as described above;
  • Command latency — that is, response to VCR-like control activities.

OTT
OTT delivery is also point-to-point, and testing requires emulation of large audiences of users accessing a larger set of possible sources than with VOD. The same VCR-like controls are available, but due to the generally short nature of OTT content, are generally used less often.

What differentiates OTT from VOD and makes it much more difficult to test is changing connection rates. OTT content is saved many times over at the source for delivery at many different connection rates — for example, high resolution for broadband connections and low resolution for mobile devices. OTT delivery must quickly and transparently switch between streams based on conditions dictated by the consumer.

OTT testing, therefore, must emulate frequent bandwidth changes from a large community of users accessing many possible streams. During this type of testing, the critical measurements are:
  • Video quality, as described above. Empirically, one's expectations of quality for this OTT delivery are much less than broadcast TV;
  • Smooth presentation. As bandwidth availability changes, consumers must not be aware of the changeover of streams. That is, there should be no noticeable pauses.

BY Dave Schneider, Broadcast Engineering

MP4 File Fragmentation for Broadcast, Mobile and Web Delivery

Posted: 18 Nov 2011 06:25 AM PST

Consistent multi-platform audio and video content delivery presents an ongoing challenge for broadcasters. Explosive smartphone and tablet growth on varying operating systems —Android, Apple iOS, or Windows Phone—threatens to create a user-experience divide between users on mobile devices, at the desktop or in the living room.

Broadcasters must address multi-platform consumption demands without compromising content security or network efficiencies. Many broadcasters are assessing efficiency of transport protocols used for content delivery, to see how they stack up for web and mobile delivery. Some legacy solutions, such as MPEG-2 Transport Stream (M2TS), lack basic web delivery functions.

What key information do broadcasters and network operators need to know as they look for more efficient approaches to the media delivery? This white paper explores fragmented MP4 files (fMP4) and considers whether the fMP4 format can replace legacy file formats.

Along the way, we'll explore four key areas that impact both broadcasters and network operators:
  • Format benefits of fMP4
  • Network benefits of fMP4
  • Movement toward fMP4 standardization
  • Platforms supporting fMP4

By Timothy Siglin, Transitions, Inc.

Sunday, January 18, 2026

JavaScript Libraries for Video Streaming in 2025: A Complete Guide

JavaScript Libraries for Video Streaming in 2025: A Complete Guide

The browser video landscape has transformed dramatically. Native APIs now do what required WebAssembly hacks just a few years ago.


Where It All Started: CellB and the First Internet Video Stream (1992)

Before we talk about modern libraries, it's worth understanding where browser video streaming came from—and why some 30-year-old design decisions still matter.

In December 1992, Sun Microsystems transmitted the first global corporate internet video stream: Scott McNealy's holiday greeting to Sun employees worldwide. The video reached workstations across North America, Europe, and Japan simultaneously via the MBone (Multicast Backbone).

The codec that made this possible was CellB, created by John Sokol at Sun Microsystems. Six months later, Xerox PARC's "Severe Tire Damage" concert would get the Wikipedia credit for "first internet concert"—but the Sun stream came first, and the technology that enabled it became RFC 2029.

How CellB Worked

CellB was a Block Truncation Coding (BTC) variant designed specifically for real-time network streaming:

  • 4×4 pixel cells — Each 16-pixel block encoded as a unit
  • 16-bit bitmap per cell — Each bit selects between two luminance values (Y0/Y1)
  • Vector quantization — YY/UV lookup tables instead of per-pixel color data
  • Skip codes — Bytes ≥128 mean "skip (byte-127) unchanged cells"
  • Computationally symmetric — Equal CPU cost for encode and decode

That last point was revolutionary. Previous codecs like CellA were asymmetric—encoding was much more expensive than decoding. This made sense for broadcast (one encoder, many decoders) but failed for videoconferencing where everyone encodes and decodes.

CellB vs Modern Codecs: Performance Comparison

Metric CellB (1992) VP8 (WebCodecs) H.264 (WebCodecs) AV1 (WebCodecs)
Compression Ratio ~10:1 ~50:1 ~80:1 ~120:1
Encode CPU Very Low Medium Medium-High Very High
Decode CPU Very Low Low Low Medium
Encode Symmetry ✓ Symmetric Asymmetric Asymmetric Very Asymmetric
Hardware Accel N/A ✓ Common ✓ Universal ✓ Emerging
Latency (encode) <1ms 5-20ms 10-50ms 50-200ms
Quality at 500kbps Poor Good Very Good Excellent
1992 Hardware ✓ Real-time Impossible Impossible Impossible

What CellB Got Right

1. Predictable latency over quality

CellB's simple algorithm meant guaranteed encode time. Modern codecs with B-frames, motion estimation, and rate-distortion optimization produce better quality but with variable latency. For real-time applications, predictability matters.

2. Skip codes for temporal compression

The idea that "unchanged pixels don't need retransmission" seems obvious now, but CellB's byte-level skip codes were elegant. A single byte could skip up to 127 cells. Modern codecs use sophisticated motion vectors, but the core insight is the same.

3. Fixed lookup tables

Rather than transmit quantization parameters per frame, CellB used fixed YY/UV tables known to both encoder and decoder. Zero overhead, zero negotiation. Modern codecs spend significant bits on headers and parameter sets.

4. Designed for the network, not storage

CellB was built for multicast streaming over unreliable networks. Frames were independently decodable (no inter-frame dependencies beyond skip codes). Lose a packet? Next frame recovers. Modern streaming protocols (HLS, DASH) chunk video into independent segments for similar reasons.

Benchmark: CellB.js vs WebCodecs VP8

To illustrate the tradeoffs, here's a comparison running in a 2024 browser:

Test conditions: 640×480 webcam, Chrome 120, M1 MacBook Air

Implementation Encode Time Bandwidth Visual Quality (PSNR)
CellB.js (JavaScript port) 0.8ms 2.1 Mbps ~28 dB (blocky)
WebCodecs VP8 (software) 12ms 0.5 Mbps ~38 dB (good)
WebCodecs VP8 (hardware) 3ms 0.5 Mbps ~38 dB (good)
WebCodecs H.264 (hardware) 4ms 0.4 Mbps ~40 dB (very good)
WebCodecs AV1 (hardware) 15ms 0.25 Mbps ~42 dB (excellent)

Bandwidth Required for "Acceptable" Quality

Resolution CellB VP8 H.264 AV1
320×240 800 kbps 150 kbps 100 kbps 75 kbps
640×480 2.5 Mbps 500 kbps 350 kbps 200 kbps
1280×720 8 Mbps 1.5 Mbps 1 Mbps 600 kbps
1920×1080 18 Mbps 3 Mbps 2 Mbps 1.2 Mbps

CellB wins on encode latency but loses badly on bandwidth efficiency. On a 1992 SPARCstation, that tradeoff made sense—CPU was precious, bandwidth was... well, also precious, but you couldn't magically get more CPU cycles. Today, hardware acceleration flips the equation.

When CellB-Style Approaches Still Make Sense

  1. Extremely constrained devices — Microcontrollers, embedded systems without hardware video encoders
  2. Ultra-low-latency requirements — Sub-millisecond encode times, no buffering
  3. Educational purposes — Understanding video compression fundamentals
  4. Retro computing — Streaming to/from vintage hardware

The CellB JavaScript Port

For those interested in experimenting, a working CellB decoder based on the original nv source code is available:

// CellB decoder core (simplified)
function decodeCellB(payload, width, height, prevFrame) {
  const cells_x = width / 4;
  const cells_y = height / 4;
  const frame = prevFrame ? prevFrame.slice() : new Uint8Array(width * height);

  let pos = 0, cellIdx = 0;

  while (pos < payload.length && cellIdx < cells_x * cells_y) {
    const byte = payload[pos];

    // Skip code: byte >= 128 means skip (byte - 127) cells
    if (byte >= 128) {
      cellIdx += byte - 127;
      pos++;
      continue;
    }

    // Cell data: 4 bytes [bitmap_hi, bitmap_lo, uv_idx, yy_idx]
    const bitmap = (payload[pos] << 8) | payload[pos + 1];
    const uvIdx = payload[pos + 2];
    const yyIdx = payload[pos + 3];

    // Lookup Y0/Y1 from YYTABLE, U/V from UVTABLE
    const [y0, y1] = YYTABLE[yyIdx];
    const [u, v] = UVTABLE[uvIdx];

    // Fill 4x4 cell based on bitmap
    const cellX = (cellIdx % cells_x) * 4;
    const cellY = Math.floor(cellIdx / cells_x) * 4;

    for (let dy = 0; dy < 4; dy++) {
      for (let dx = 0; dx < 4; dx++) {
        const bit = (bitmap >> (15 - (dy * 4 + dx))) & 1;
        const y = bit ? y1 : y0;
        frame[(cellY + dy) * width + cellX + dx] = y;
      }
    }

    cellIdx++;
    pos += 4;
  }

  return frame;
}

Full implementation with encoder and lookup tables: github.com/johnsokol/nv

RFC 2029 specification: rfc-editor.org/rfc/rfc2029

Original 1992 holiday greeting: youtube.com/watch?v=IAYF-m1z7o4


The Old Guard (2011-2020)

Before diving into what's new, here's what we were working with:

Broadway.js — A JavaScript H.264 decoder compiled from Android's native codec via Emscripten. Revolutionary for its time, but CPU-intensive and limited to decoding only.

JSMpeg — MPEG1 video and MP2 audio decoder with WebSocket streaming support. Achieved ~50ms latency, which was impressive in 2013. Still works, still useful for legacy streams.

ogv.js — Ogg/Vorbis/Theora/Opus/WebM support via Emscripten-compiled libraries. The open codec champion.

libde265.js — HEVC/H.265 decoder in JavaScript. Brought next-gen codec support to browsers before native implementations.

These libraries solved real problems by bringing codec support to browsers that lacked it. But they all shared the same fundamental limitation: they reimplemented codecs that already existed in the browser's native media pipeline, wasting bandwidth to download what was already there and burning CPU cycles on software decoding.


The New Native APIs

WebCodecs API

This is the big one. WebCodecs gives JavaScript direct access to the browser's hardware-accelerated video encoders and decoders.

What it does:

  • Encode raw video frames to H.264, VP8, VP9, AV1
  • Decode compressed video chunks back to frames
  • Hardware acceleration on supported devices
  • Works with the Streams API for efficient pipelines

Browser support: Chrome 94+, Edge 94+, Firefox 118+ (with flags), Safari not yet

// Encode video from camera
const encoder = new VideoEncoder({
  output: (chunk, metadata) => {
    // Send chunk over network
    sendToRemotePeer(chunk);
  },
  error: (e) => console.error('Encoder error:', e)
});

encoder.configure({
  codec: 'vp8',
  width: 640,
  height: 480,
  framerate: 30,
  bitrate: 1_000_000
});

// Get frames from camera
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
const track = stream.getVideoTracks()[0];
const processor = new MediaStreamTrackProcessor({ track });
const reader = processor.readable.getReader();

while (true) {
  const { value: frame, done } = await reader.read();
  if (done) break;

  encoder.encode(frame, { keyFrame: frameCount % 150 === 0 });
  frame.close();
}
// Decode received video
const decoder = new VideoDecoder({
  output: (frame) => {
    ctx.drawImage(frame, 0, 0);
    frame.close();
  },
  error: (e) => console.error('Decoder error:', e)
});

decoder.configure({ codec: 'vp8' });

// When chunk arrives from network
function onChunkReceived(data, timestamp, isKey) {
  decoder.decode(new EncodedVideoChunk({
    type: isKey ? 'key' : 'delta',
    timestamp: timestamp,
    data: data
  }));
}

Why this matters: No more shipping megabytes of WASM codec implementations. The browser already has optimized, hardware-accelerated codecs—WebCodecs just exposes them to JavaScript.


WebTransport API

WebTransport is what WebSockets should have been. Built on HTTP/3 and QUIC, it offers both reliable streams and unreliable datagrams.

Key advantages over WebSockets:

  • Unreliable datagrams — Like UDP, packets can be dropped. Perfect for real-time video where old frames are worthless.
  • No head-of-line blocking — Multiple streams don't block each other.
  • Lower latency — QUIC's 0-RTT connection establishment.
  • Multiplexing — Many streams over one connection.
const transport = new WebTransport('https://server.example:4433/video');
await transport.ready;

// Unreliable datagrams for video frames (drop old frames, don't wait)
const writer = transport.datagrams.writable.getWriter();
await writer.write(encodedFrameData);

// Or reliable streams for control messages
const stream = await transport.createBidirectionalStream();
const streamWriter = stream.writable.getWriter();
await streamWriter.write(new TextEncoder().encode('START_STREAM'));

The catch: WebTransport requires a server. It's not peer-to-peer like WebRTC. But if you're building a streaming service (not P2P), it's the future.

Latency achieved: Facebook's experimental WebTransport media server demonstrates <60ms end-to-end latency under good network conditions.


P2P Without the Pain

WebRTC is powerful but complex. The ICE/STUN/TURN dance for NAT traversal, the SDP offer/answer exchange, the need for a signaling server—it's a lot. These libraries simplify things dramatically.

webConnect.js

The newest and cleanest option for serverless P2P.

<script type="module">
import webconnect from 'https://cdn.jsdelivr.net/npm/webconnect/dist/esm/webconnect.js'

const connect = webconnect({
  appName: 'my-video-app',
  channelName: 'stream-room-123'
})

connect.onConnect(async (attr) => {
  console.log(`${attr.connectId} joined`)

  // Send data
  connect.Send({ type: 'chat', text: 'hello' }, { connectId: attr.connectId })

  // Or stream video
  const stream = await navigator.mediaDevices.getUserMedia({ video: true })
  connect.openStreaming(stream, { connectId: attr.connectId })
})

connect.onStreaming((stream, attr) => {
  document.getElementById('remoteVideo').srcObject = stream
})

connect.onReceive((data, attr) => {
  console.log('Received:', data, 'from:', attr.connectId)
})
</script>

How it works: Uses BitTorrent trackers, MQTT brokers, or Nostr relays for signaling. No server to maintain. Once the WebRTC connection is established, the signaling infrastructure is out of the loop.

Features:

  • Auto mesh networking
  • Zero configuration for local network
  • Binary data and streaming support
  • Progress callbacks for large transfers

Trystero

More mature, more backend options.

import { joinRoom } from 'trystero/torrent'  // or /nostr, /mqtt, /firebase, /supabase, /ipfs

const room = joinRoom({ appId: 'my-app' }, 'room-name')

// Define actions (like events)
const [sendVideo, getVideo] = room.makeAction('video')

// Send to specific peer or broadcast
sendVideo(encodedFrame, peerId)  // to one peer
sendVideo(encodedFrame)          // to all peers

// Receive
getVideo((data, peerId) => {
  decoder.decode(new EncodedVideoChunk({ ... }))
})

// Built-in media streaming
room.addStream(localStream)
room.onPeerStream((stream, peerId) => {
  remoteVideo.srcObject = stream
})

Backend options:

  • BitTorrent — Uses public torrent trackers
  • Nostr — Decentralized social protocol relays
  • MQTT — IoT messaging brokers
  • Firebase/Supabase — If you already use them
  • IPFS — Distributed web

PeerJS

The veteran. Simpler API, but requires their cloud service or self-hosted server.

const peer = new Peer()  // Uses PeerJS cloud by default

peer.on('open', (id) => {
  console.log('My peer ID:', id)
})

// Connect to another peer
const conn = peer.connect('remote-peer-id')
conn.on('open', () => {
  conn.send('Hello!')
})

// Receive connections
peer.on('connection', (conn) => {
  conn.on('data', (data) => console.log('Received:', data))
})

// Video calls
const call = peer.call('remote-peer-id', localStream)
call.on('stream', (remoteStream) => {
  remoteVideo.srcObject = remoteStream
})

For P2P Video Chat (no server)

getUserMedia()
    ↓
webConnect.js or Trystero (signaling via BitTorrent/Nostr)
    ↓
WebRTC MediaStream (built-in, hardware-accelerated)
    ↓
<video> element

This is the simplest path. Let WebRTC handle the codec work internally.


For Custom Codec Experiments

getUserMedia()
    ↓
MediaStreamTrackProcessor → VideoFrame
    ↓
Custom encoder (your own algorithm)
    ↓
webConnect.js DataChannel (binary)
    ↓
Custom decoder
    ↓
Canvas rendering

Use this if you're implementing something like CellB for educational purposes or experimenting with novel compression approaches.


For Production Streaming (server-based)

getUserMedia()
    ↓
WebCodecs VideoEncoder (H.264/VP9/AV1)
    ↓
WebTransport datagrams (unreliable, low latency)
    ↓
Server relay/CDN
    ↓
WebTransport to viewers
    ↓
WebCodecs VideoDecoder
    ↓
Canvas or <video> via MediaStreamTrackGenerator

This gives you the lowest latency and most control, but requires server infrastructure.


For Maximum Compatibility

getUserMedia()
    ↓
MediaRecorder (built-in, widely supported)
    ↓
WebSocket to server
    ↓
Media Source Extensions (MSE) on viewers

Boring but bulletproof. Works everywhere, including Safari.


Quick Reference: What to Use When

Use Case Recommended Stack
P2P video chat, no server webConnect.js + native WebRTC
Multi-party calls Trystero mesh + WebRTC
Low-latency streaming to many WebTransport + WebCodecs
Custom codec research WebCodecs + DataChannel
Maximum compatibility MediaRecorder + WebSocket + MSE
Legacy browser support JSMpeg (still works!)
Retro/embedded devices CellB-style simple codecs

End-to-End Latency: 1992 vs 2025

The ultimate measure of a real-time video system is glass-to-glass latency—the time from photons hitting the camera sensor to photons leaving the display.

Historical Comparison

Era Stack Typical E2E Latency Limiting Factor
1992 CellB + MBone 200-500ms Network (56kbps modems, satellite hops)
2010 Flash RTMP 1-3 seconds Buffering, TCP retransmits
2015 WebRTC (early) 150-300ms ICE negotiation, jitter buffers
2018 HLS/DASH 6-30 seconds Segment duration, CDN propagation
2020 WebRTC (optimized) 50-150ms Encode latency, network jitter
2023 Low-Latency HLS 2-5 seconds Partial segments, still chunked
2025 WebTransport + WebCodecs 30-80ms Hardware encode, QUIC transport
2025 WebRTC DataChannel + WebCodecs 40-100ms P2P variance, encode pipeline

Breakdown: Where Latency Hides

Camera capture: 16-33ms (frame interval at 30-60fps)

Encode:

  • CellB: <1ms (trivial computation)
  • WebCodecs VP8 software: 10-20ms
  • WebCodecs H.264 hardware: 2-5ms
  • WebCodecs AV1: 30-100ms

Network:

  • Local network: 1-5ms
  • Same city: 10-30ms
  • Cross-continent: 50-150ms
  • Satellite: 500-700ms

Jitter buffer: 0-100ms (trade latency for smoothness)

Decode:

  • CellB: <1ms
  • WebCodecs hardware: 1-3ms
  • WebCodecs software: 5-15ms

Display: 8-16ms (display refresh interval)

The CellB Advantage (and Why It Doesn't Matter Anymore)

In 1992, CellB's sub-millisecond encode/decode meant the codec contributed almost nothing to total latency. The network was the bottleneck.

Today, hardware-accelerated WebCodecs achieves 2-5ms encode times with 5-10x better compression. The codec is no longer the bottleneck—it's jitter buffering and network variance.

However, for specific use cases like:

  • ESP32/Raspberry Pi without hardware encoders
  • WebAssembly environments without WebCodecs
  • Educational demonstrations of codec fundamentals

...CellB-style approaches remain relevant. Simple algorithms that run anywhere beat complex algorithms that require specific hardware.


The Libraries That Still Matter

For specific codec support not in browsers:

  • ogv.js — Ogg/Theora/Opus when you need it
  • libde265.js — HEVC when Safari finally isn't enough

For audio specifically:

  • Aurora.js — Audio decoding framework
  • Tone.js — Web audio synthesis and processing

For video players (not streaming):

  • Video.js — Standard HTML5 player with plugins
  • Plyr — Clean, accessible player UI
  • hls.js — HLS streaming support
  • dash.js — MPEG-DASH support

What Changed and Why It Matters

Five years ago, building real-time video in the browser meant:

  1. Shipping megabytes of WASM codecs
  2. Burning CPU on software decoding
  3. Running your own signaling server
  4. Fighting WebRTC's complexity

Today:

  1. WebCodecs gives native hardware codec access
  2. WebTransport provides modern low-latency transport
  3. webConnect.js/Trystero eliminate signaling servers
  4. Higher-level APIs hide WebRTC complexity

The browser is finally a first-class platform for real-time video. The tools are here. Go build something.


Last updated: January 2025

Found something I missed? Have a library recommendation? Leave a comment.


Resources

Modern APIs

P2P Libraries

CellB Historical Resources

Classic JavaScript Codecs (still useful)

Wednesday, September 23, 2020

Facebook: Video@Scale 2020

https://videoscale2020.splashthat.com/

OCTOBER 22, 2020

10:00AM – 1:00PM

REGISTER NOW

YOU'RE INVITED TO VIDEO @SCALE REMOTE EDITION


BUILDING DISTRIBUTED VIDEO SYSTEMS




Video @Scale is an invitation-only technical conference for engineers that develop or manage large-scale video systems serving millions of people. The development of large-scale video systems includes complex, unprecedented engineering challenges. The @Scale community focuses on bringing people together to discuss these challenges and collaborate on the development of new solutions.


 


This year, we will be hosting our Video @Scale event virtually. 




 


AGENDA


SESSION #1


VIDEO QUALITY


10:00 AM - 11:00 AM PST






 






KEYNOTE


    Rajeev Rajan


VIDEO CODING STANDARDIZATION


     Ioannis Katsavounidis


VIDEO ENCODING PARAMETER SELECTION WITH HYBRID SOFTWARE/HARDWARE APPROACH


     Nick Wu


VMAF


     Zhi Li | Netflix


SESSION #2


SCALABILITY & RELIABILITY


11:00 AM - 12:00 PM PST




YET ANOTHER LIVE VIDEO DELIVERY ARCHITECTURE


     Kirill Pugin


SCALING I/O TO MILLIONS OF VIDEOS


     David Zhang


PROVIDING BETTER VIDEO EXPERIENCE FOR THE NEXT BILLION USERS


     Denise Noyes


BYTES RANGE ADDRESSING WITH LL-HLS


     Will Law | Akamai


SESSION #3 


PANEL + Q&A 


12:00 PM - 1:00 PM PST




VIDEO TRENDS DURING COVID-19


     Jaron Schaeffer | Google


     Connie Goshgarian | AT&T


     Li-Tal Mashiach | Facebook 


     Tremain Wheatley | Facebook (Moderator)