Playing Video (Part 2).

Slides:



Advertisements
Similar presentations
What is Multimedia ? Multi ( Multiple ) and Media ! So…. Information in multiple formats, including text, images, audio, video and animation :) It makes.
Advertisements

Chapter 11 Media and Interactivity Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
Chapter 11 Media and Interactivity Basics Key Concepts
HTML Structure & Web Design Basics
Iframes & Images Using HTML.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 17: Video, Audio, and Other MultiMedia.
SHAREPOINT PAKISTAN USER GROUP #1 SHAREPOINT COMMUNITY IN PAKISTAN AND ASIA HTML5 and SharePoint 2013.
HTML 5 and CSS 3, Illustrated Complete Unit K: Incorporating Video and Audio.
Neal Stublen Pre-HTML5 Solutions  Audio and video were embedded in pages using plug-ins Apple Quicktime Microsoft Silverlight Adobe.
UNIT K: INCORPORATING VIDEO AND AUDIO 1 Encoding: the process of transforming moving image and/or sound into a digital file. Each encoding method known.
 Multimedia is everything you can hear or see: texts, books, pictures, music, sounds, CDs, videos, DVDs, Records, Films, and more.  Multimedia comes.
INF Web Design Using Multimedia on the Web Video - Part 1.
Different Streaming Technologies. Three major streaming technologies include:
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Web Video Basics Carol Doggett President/Owner Preparing Your Videos for Today’s On-line World.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Session: 11. © Aptech Ltd. 2HTML5 Audio and Video / Session 11  Describe the need for multimedia in HTML5  List the supported media types in HTML5 
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
Video on the Web. The Evolution of web video formats… WebM (Supported by Google) Ogg (Supported by Theora) Mp4 (h264 video encoding) WebM (Supported by.
CHAPTER 18 INTEGRATING AUDIO AND VIDEO. LEARNING OBJECTIVES How the HTML 5 and tag pair can be used to include a video file within a webpage How video.
Using HTML 5.  HTML 5 uses a standard method to embed audio into Web pages.  Prior to HTML 5, browser plug-ins or separate applications such as Windows.
Programming Games Show your cannonball. HTML5 video. Miro. Classwork/Homework: Acquire video, convert to multiple formats, and produce simple (just html)
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 11 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 11 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML Use of Multimedia on web page. HTML Media Q. How to call Image file in our web page ? A. That is the easy syntax for defining an image. 2.
Tutorial 7 Working with Multimedia
Tutorial 7 Designing a Multimedia Web Site
HTML 5 Tutorial Chapter 3 Video. Video HTML 5.0 provides a standard for showing video. Using the element we can easily embed video within our web page.
HTML 5. Introduction In modern browsers, adding a video to your page is as easy as adding an image. No longer do you need to deal with special plug-ins.
2 If aliens came to this solar system and observed humans over the last several years, what would they think is the most significant benefits of the.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
FLASH, VIDEO & AUDIO How to add Flash movies into your site How to add video and audio to your site HTML5 and elements.
CS 200 Multimedia Objects in Web Pages. MultiMedia Objects Three primary types of multimedia objects  Audio  Video Includes Flash Objects  Images.
CHAPTER 8 Multimedia 1. Using Multimedia ❖ Multimedia: the combination of text, sound, and video to express an idea or convey a message. ❖ Podcasts: a.
Advanced Tricks and Troubleshooting.  Introduction  Uploading File Bundles  DragonDrop Media Players  Embedded Media Player Sample HTML Code  Embedded.
M ULTIMEDIA ON THE W EB. Multimedia Purpose of Multimedia Multimedia Issues HTML5 and elements CSS Transitions and Animations Animation to avoid.
CHAPTER 10 AUDIO AND VIDEO. MEDIA PLAYER API HTML5 contains an API (Application Programming Interface) for controlling audio and video players embedded.
HTML Structure & syntax
Chapter 9 HTML 5 Video and Audio
Advanced HTML Tags:.
Video Compression, Codecs, and Containers Explained
Section 9.1 Section 9.2 YOU WILL LEARN TO…
Section 9.1 Section 9.2 Identify multimedia design guidelines
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 9 HTML 5 Video and Audio
HOW FLASH WORKS The Flash authoring environment is used to create Flash movies The .fla file is exported to a format called .swf The .swf file is.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chap 3. Audio/Video api.
Chapter 4: HTML5 Media - <video> & <audio>
Audio and Video on the Web
Learn HTML Basics Lesson No : 10
Digital TV..
Tutorial 7 Working with Multimedia
HTML5 Level II Session II
Playing Audio (Part 2).
Audio and Video Chapter 10.
Integrating Multimedia: Sound, Video and More
Essentials of Web Pages
Playing Audio (Part 1).
Playing Video (Part 1).
HTML5 Media.
Client-Side Internet and Web Programming
Browser Support for HTML5
Basics of Web Design Chapter 11 Media and Interactivity Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
How to add audio and video to your website
HTML5 Audio & Video By Derek Peacock
Show your animation project. HTML5 video. Miro.
Presentation transcript:

Playing Video (Part 2)

Complexities of Video Video is a complicated topic and even some seasoned web designers do not fully understand many of the details. Contributing to the confusion is that there are always multiple formats that go into a single video file, including: File Format (also known as Container Format) – This is indicated by the file extension. Examples include .mp4, .avi, .flv, .ogv, .webm, and .mov. Video Compression Format (also known as Video Codec) – This is the method by which the visual portion of the video is encoded digitally. Examples include MPEG-4, H.264, Sorenson, Theora, and VP8. Audio Codec – The method used to digitally encode the audio portion of the video. Examples include MP3, PCM, AAC, and Vorbis. Luckily, there is no need for us to experiment with and learn all of these platforms. Instead, we will focus on just those necessary to deliver videos to our web audience.

Common Video Formats These are the video format combinations most commonly used to provide video in HTML5 web pages: Video Codec: H.264 Theora VP8 Container Format: .mp4 .ogv .webm The closest thing we have to an "industry standard". YouTube uses this format, as do many electronic devices, such as Blu-ray players. Patented and might require licensing fees. An open format that requires no licensing fees. Created by the same group that made the Ogg Vorbis audio format. Often referred to as "Ogg" format. Sponsored by Google, this newest format is thought to be the preferred standard in the future. Many sites are switching to this platform, though the patent status is still unclear.

Browser Support for Video Types Just as with audio, each major browser has its own level of support for the different video formats: Video File Format Support .mp4 .ogv .webm IE 9.0+ No Firefox 21.0+* 3.5+ 4.0+ Chrome 4.0+** 6.0+ Safari 3.2+ Opera 10.5+ 10.6+ *Firefox supports MP4 only for some operating systems. **Chrome announced plans to remove MP4 support in future versions. No single video format is supported by all major browsers. If we use just one format on our site, a significant portion of our audience will not be able to play the video.

Example Browser Support Problem Our previous video example worked fine in IE and Chrome (which support the MP4 format) but now let's see how the same page looks in Firefox: <video src="video/rmnp.mp4" width="480" height="321" controls></video> Hardly what we want our web visitors to see. We'll use the same strategy to deal with the video issue as we did with audio: a fallback system to accommodate multiple formats. Firefox 19.0

Setting Up the Fallback System Let's offer video to the browser in multiple formats. If a user's browser doesn't support the first format offered, it will continue through the list until it discovers a format it can play: <video width="480" height="321" controls> <source src="video/rmnp.mp4"> <source src="video/rmnp.ogv"> <source src="video/rmnp.webm"> </video> We removed the src attribute from the <video> element and used the new HTML5 <source> element. Firefox skips over the MP4 file and loads the OGV format instead. Note that we could have omitted the WEBM file format and still had nearly 100% coverage for browsers currently in use. Since WEBM is gaining momentum very quickly on the web, we are including it to prepare for the future. Firefox 19.0

Adding MIME Type Definitions Again, it's good practice to define the MIME type for all video files: Video Format MP4 OGV WEBM MIME-type type="video/mp4" type="video/ogg" type="video/webm" <video width="480" height="321" controls> <source src="video/rmnp.mp4" type="video/mp4"> <source src="video/rmnp.ogv" type="video/ogg"> <source src="video/rmnp.webm" type="video/webm"> </video> Once more, don't get these confused. The "video/rmnp.webm" in the src attribute refers to an actual file on the web server, while the "video/webm" in the type attribute is the string of text that tells the browser which file format to expect but doesn't refer to an actual location.

Creating the Fallback Video Files Assuming our original video file is in H.264/MP4 format, we'll need to create Ogg and WebM formats for each of our videos. Special software is available to convert a large batch of video files, but for our purposes, we can use one of the online tools to convert individual files. Let's use the same site as we did with the audio conversion: Notice that the site can convert video files to and from a large number of formats. Let's use the .mp4 video on our local drive to create a version in the .ogv and .webm formats.

Final Fallback We still need to address those users with older browsers that don't support the <video> element. Using the same method as we did with <audio>, we can "trick" these older browsers into playing our videos, either by using Flash or embedding a YouTube window: <video width="480" height="321" controls> <source src="video/rmnp.mp4" type="video/mp4"> <source src="video/rmnp.ogv" type="video/ogg"> <source src="video/rmnp.webm" type="video/webm"> <embed width="480" height="321" src="http://www.youtube.com/v/njjAYlxGzzQ" type="application/x-shockwave-flash"></embed> </video> Visitors still using IE 8.0 will be able to play the video in a YouTube window. To offer this final fallback, we'll need to upload our video to YouTube and get the individual embed code. IE 8.0