Share
Embed
Multi-Bitrate and Multi-Screen Streaming With Flash Media Server 4.5
The latest edition of Flash Media Server supports multi-bitrate streaming over a wider variety of protocols — not only to Flash Player and AIR, but to iPads and iPhones as well. New features in FMS 4.5 such as server-side HLS transcoding and adaptive bitrate (set-level) manifest support provide more flexibility than ever. In addition to introducing you to new features and best practices, this session provides you with examples of cross-platform video players that put them into action — detecting the viewer’s bandwidth and operating system and delivering the appropriate format stream at the optimal bitrate.
Lisa Larson-Kelley
May 15, 2012
Transcript
26 slides
-
1 Multi-‐Bitrate and Multi-‐Screen Streaming with
Flash Media Server 4.5 Lisa Larson-‐Kelley LearnFromLisa.com @lisamarienyc -
who is this session for? * Web Developers
* Content Publishers * Project Managers * ...anyone responsible for making sure video content gets to the largest possible audience -
what we`ll cover * Getting to know Flash Media
Server 4.5 * Understanding protocols * How to stream VOD and Live via: • RTMP • HTTP Dynamic Streaming (HDS) • HTTP Live Streaming (HLS) to iOS * Additional features to explore • Protected HDS and HLS -
* Flash Media Streaming Server 4.5 -‐ $995 •
Reach complete audience on every device * Flash Media Interactive Server 4.5 -‐ $4,500 • Protect, record media • Real-‐time communication • Limited to 500 RTMFP * Flash Media Enterprise Server 4.5 -‐ $45,000 • Full features, higher connection limits • SIP support * Flash Media Development Server 4.5 -‐ FREE • Limited to 10 RTMP, 10 RTMFP getting to know FMS 4.5 BEPCFDPNHPGNT -
* Multiple video delivery methods * Reach Flash, AIR,
Android, iOS * Real-‐time packaging of streams • HDS for Flash, HLS for iOS * Integrated Real-‐time interactivity * Share data, webcam streams * Content protection * Stream and file encryption * Tracking and logging what can you do with FMS 4.5? -
* HTTP Live Streaming (HLS) to Apple iOS *
On demand packaging for HTTP (Flash + iOS) * Audio extraction for HLS Apple iOS * Protected HTTP Streaming (Flash + iOS) * SIP Gateway support * Multicast ingest and recording * 64-‐bit OS only what`s new in FMS 4.5? -
* Live video capture in Flash Player * Server-‐side
recording * Custom server-‐side ActionScript * Logging and administration features * Real-‐time communication integration * Robust content protection * RTMP traffic sometimes blocked * No iOS support Real Time Messaging Protocol | RTMP -
* Live and on demand * HD video support
* Uses standard HTTP connections * Cheaper hosting * New Protected HTTP Dynamic Streaming * Need video player logic * Flash Player 10.1 and later HTTP Dynamic Streaming | HDS -
* Supported on iOS devices, Safari, QuickTime (Mac) *
Live and on demand * HD video support * Uses standard HTTP connections * Cheaper hosting * New Protected HTTP Live Streaming * No interactive features, video stream only HTTP Live Streaming | HLS -
* Multicast Fusion • Video delivery within the enterprise
• Requires special network configuration * Peer to Peer • Similar uses to RTMP • Massive scale • Complex to develop Multicast/Peer to Peer | RTMFP -
choosing a protocol )%4 )-4 35.1 1SPHSFTTJWF -JWF )%4USFBNJOH
POMZ 9 9 *OHFTU 1MBZCBDL OB -JWF *OUFSBDUJWF 4USFBNJOH $BOCFDPNCJOFE XJUI35.1 /PSFBMUJNF JOUFSBDUJWJUZ *OHFTU 1MBZCBDL OB 70% )%4USFBNJOH POMZ 9 9 9 9 70% *OUFSBDUJWF 4USFBNJOH $BOCFDPNCJOFE XJUI35.1 /PSFBMUJNF JOUFSBDUJWJUZ 9 $BOCFDPNCJOFEXJUI 35.1 CVUNBZBTXFMM TUSFBNJUBMM -
* WPE service • applications/vod/media * Multibitrate: manifest.f4m
RTMP | streaming VOD <manifest xmlns="http://ns.adobe.com/f4m/1.0">! !<id>Dynamic Streaming</id>! !<baseURL>rtmp://localhost/vod</baseURL>! !<mimeType>video/mp4</mimeType>! !<streamType>recorded</streamType> ! !<media url="mp4:explore_500.f4v" bitrate="500"/> ! !<media url="mp4:explore_1000.f4v" bitrate="100"/> ! !<media url="mp4:explore_1500.f4v" bitrate="1500"/> ! </manifest>! -
RTMP | streaming LIVE * MJWFservice • applications/live/
* Multibitrate: rtmp-‐live.f4m <manifest xmlns="http://ns.adobe.com/f4m/1.0">! !<id>Dynamic Streaming</id>! !<baseURL>rtmp://localhost/live/</baseURL>! !<mimeType>video/mp4</mimeType>! !<streamType>live</streamType>! !<media url="mp4:livestream200" bitrate="200"/>! !<media url="mp4:livestream500" bitrate="500"/>! !<media url="mp4:livestream800" bitrate="800"/>! </manifest> -
* Old way = Pre-‐process with command-‐line utility *
New way = Set it and forget it. • H.264 video codec • F4V file * Place F4V files in the FMS webroot/vod directory * Create Set-‐level manifest (.f4m) with F4M Configurator Utility HDS | streaming VOD -
* Set-‐level manifest (http://localhost/vod/hds_sme.f4m): HDS | streaming
VOD <manifest xmlns="http://ns.adobe.com/f4m/2.0">! !<media href="http://localhost/hds-vod/sample1_150kbps.f4v.f4m" bitrate="150"/>! !<media href="http://localhost/hds-vod/sample1_500kbps.f4v.f4m" bitrate="500"/>! !<media href="http://localhost/hds-vod/sample1_700kbps.f4v.f4m" bitrate="700"/>! !<media href="http://localhost/hds-vod/sample1_1000kbps.f4v.f4m" bitrate="1000"/>! !<media href="http://localhost/hds-vod/sample1_1500kbps.f4v.f4m" bitrate="1500"/>! </manifest> -
* Enable Stream Synchronization in FMLE config.xml * Set FragmentDuration=4000,
SegmentDuration=16000, DiskManagementDuration=3 in livepkgr/events/_definist_/liveevent_Event.xml file * Delete Manifest.xml file from the liveevent folder (if needed) LAUNCH FLASH MEDIA LIVE ENCODER * Adobe-‐recommended settings: * High Bandwidth (800 Kbps) — H.264 PRESET * Advanced Encoder Settings: • Baseline Profile (to play on widest range of devices) • Level 3.0 • Keyframe Frequency 4 sec • Bitrates 150, 500, 700 HDS | streaming LIVE -
* Connect to rtmp://localhost/livepkgr OR rtmp://192.168.1.6/livepkgr * Stream name:
livestream%i?adbe-‐live-‐event=liveevent * http://localhost/hds_sme_live.f4m -‐> Flash Player/AIR HDS | streaming LIVE <manifest xmlns="http://ns.adobe.com/f4m/2.0">! <media href=http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream1.f4m bitrate="150"/>! <media href="http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream2.f4m" bitrate="500"/>! <media href="http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream3.f4m" bitrate="700"/>! </manifest>! -
* Set-‐level manifest http://localhost/vod/hls_sme.m3u8: HLS | streaming VOD
#EXTM3U! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=150000,! /hls-vod/sample1_150kbps.f4v.m3u8! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=500000,! /hls-vod/sample1_500kbps.f4v.m3u8! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=700000,! /hls-vod/sample1_700kbps.f4v.m3u8! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000000,! /hls-vod/sample1_1000kbps.f4v.m3u8! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000,! /hls-vod/sample1_1500kbps.f4v.m3u8! -
You just did it! Setup for HDS will also
package for HLS * http://localhost/hls_sme_live.m3u8 -‐> iOS HLS | streaming LIVE #EXTM3U ! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=150000, ! http://localhost/hls-live/livepkgr/_definst_/liveevent/livestream1.m3u8 ! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=500000, ! http://localhost/hls-live/livepkgr/_definst_/liveevent/livestream2.m3u8 ! #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=700000, ! http://localhost/hls-live/livepkgr/_definst_/liveevent/livestream3.m3u8! -
protected HTTP streaming PHDS (Flash Player 11+ & AIR
3+) PHLS (iOS) * Embeds DRM metadata into stream * 24-‐hour limited * Option to use HW protection, if available * lLow,zlMedium,zlHighz encryption levels * Configure in Application.xml, Event.xml or Apache httpd.conf depending on app * All files at that level will automatically be encrypted or... Adobe Flash Access -
26 thanks! visit my blog and subscribe to my
newsletter at LearnFromLisa.com for news, tips, code, ramblings about web video, dealing with change, and other somewhat important stuff. !MJTBNBSJFOZD