Title: Streaming Media Best Practices
1Streaming Media Best Practices
- Streaming Media East, May 10th 2004
- Steve Mack, LUX Media
- smack_at_luxmedia.com
2Todays Agenda
- Creation (2 hours)
- Audio
- Video
- Encoding (1 hour)
- Encoding choices
- Processing
- Platform specific examples
- Authoring (1 hour)
- Metafiles
- Advanced Authoring (embedded players)
- Live Broadcasts (1 hour)
3Lets do it.
- Audio gear
- Video gear
- A laptop
- An internet connection
- Some software
- Push a few buttons
- Voila.
4But Wait
5The Next Frontier
6Internet Access Devices, Worldwide
1 Billion
Sources Cahners In-Stat Group
7What Does It All Mean?
- Streaming media is a new mass medium
- Currently in its second wave
- New platform(s) for media delivery
- Huge audience
- Huge opportunity
- Entertainment, business, education, you name it
- The opportunity wont last forever line between
traditional broadcasting and streaming will
continue to blur as technology becomes more
transparent - The time is now
8We believe you.
- Get to the point.
- Okay, I will.
- Lets start at the beginning
9Tools of the Trade
- Audio
- Good source good microphone, mixing desk
- Signal processing compressor, EQ unit
- proper recording environment
10Tools of the Trade (contd)
- Video
- Good camera DV is most cost-efficient, FireWire
option - Buy the best tripod you can afford!
- Lighting 3-point lighting kit
11Tools of the Trade (contd)
- Computer Hardware
- No such thing as too much CPU/RAM/storage
- Professional sound cards sound better
- USB audio interfaces a new option
- FireWire cards best bet for video capture
- Software
- Audio and video editing software, encoding
software
12Remember Bandwidth is Everything
- Typical dial-up user connects at 37kbps
broadband users can expect 2-300kbps - Uncompressed audio 1400Kbps
- 44.1Khz16bits2 channels
- Uncompressed NTSC video 30MBps
- 720480pixels24bits30frames/second
- thats roughly 237,000bps, folks!
- We need to reduce the data rates while
maintaining as much quality as possible - Codec compressor-decompressor or coder-decoder
13How Codecs Work
- Codecs use complex perceptual models to reduce
the file size of media files - Perceptual models approximate how we perceive,
i.e. how we interpret what we see and hear - Audio what we hear
- 20 20,000Hz over 120dB dynamic range
- Our ears are most sensitive in the midrange loud
sounds mask quiet sounds - Video what we see
- Full spectrum, 180 degree field of vision
- Our eyes are most sensitive to motion and color
14Audio Creation Tips
- Use good equipment and solid audio engineering
practice - Good equipment, microphone technique
- Set up a proper gain structure
- Use signal processing to optimize your source for
encoding - Our ears are most sensitive to the midrange
(where speech resides), and loud sounds mask
quiet sounds - Codecs therefore concentrate on whatever is
loudest, and discard sounds that are potentially
masked - Compression and EQ can be used to optimize as
needed
15Audio Equipment
- Use good quality microphones
- Directional hand-held mics for reporting
environments - Lavaliere mics for stationary talent
- Shotgun microphone on a boom for location work
- Dont forget your windsock(s) for outdoor work
- Avoid using the on-camera mic
- Not high-quality
- Many cameras have AGC (Automatic Gain Control)
built-in which brings up background noise - Use balanced cables
- XLR or TRS
- Use Professional XLR adapter if necessary
- More noise resistant
- Better signal level
16Audio Audio Equipment - Location
- Large, Quiet, Isolated Locations are best
- Small rooms sound small
- Need room to move
- Keep noisy machinery away from microphones
- Treat Reflective Surfaces
- Hard flat surfaces reflect sound
- Acoustic foam, curtains, tableclothsare all
extremely helpful - Outdoors
- Additional challenges, but can be overcome with
some forethought - Directional mics, windsocks
17Audio Engineering Setting Up A Gain Structure
- Make sure each piece of equipment is operating in
its optimal range - Start with first piece of equipment and work
through the signal chain, set the input and
output gain for each - Peaks at 0dB for analog, -3dB for digital
- Once set, should need little adjustment
18Signal Processing - Compression
- Remember Codecs treat loud signals as most
important - Compression evens out audio levels by turning
down louder sections - Protects your equipment from spikes in audio
level, thereby providing protection against
distortion - By turning down loud sections, enables overall
signal level to be turned up - Fattens your audio, giving it a professional
feel - Can be done in software, but for live production
a hardware compressor is essential
19How Compression works
- Set a threshold, a ratio, and a post-compression
gain - Start with a threshold of 10db, 41 ratio, and
set gain to match original signal level - Voice is much more compression tolerant than music
Compression in action
20Signal Processing Equalization
- Remember ears are most sensitive to midrange
- EQ is turning up or down certain frequencies in
your audio signal - Use EQ to improve the tonal quality of your audio
- Add sparkle, air, warmth, presence
- Remove rumble, hiss, clutter, harshness
- How?
- Find the right frequency, and turn the knob!
- Just like adjusting your car stereo or clock
radio
EQ example
21Useful EQ Frequencies
22Video Creation Tips
- Video codecs have a tough job to do
- Inter-frame as well as intra-frame compression is
used to achieve desired data rates - Objects that change or move are encoded, so
- Avoid unnecessary motion/changes
- Use a tripod, use a tripod, use a tripod
- Avoid moving objects in the background
- Avoid special effects
- When editing, simple splices encode the best
- Keep the number of cuts to a minimum
- Framing
- Smaller screen, so frame tighter
23Video Production Tips
- First and foremost, use good video engineering
practice - Good equipment, proper technique
- Lighting
- Essential to get it right nearly impossible to
correct using software - Though modern cameras can operate in low-light
conditions, the picture quality is not as high
24Video Engineering
- White balancing
- Cameras need to be set correctly depending on
whether youre shooting indoors or outdoors - Best to set manually
- Camera filters
- UV filters can make outdoor shoots less hazy
- Fluorescent filters can make indoor office shoots
look less anemic - Diffusion filters can soften the image and make
it look less harsh, more film-like - Amount of diffusion to use depends on your camera
- http//videosystems.com/ar/video_curse_digital_vid
eo/index.htm
25Video Lighting
- The 3-point Lighting system
- The basis of virtually all lighting
- Key light
- The main light for the scene
- Generally 15 - 60 from camera
- Fill light
- Fills in the hard shadows of the key light
- On opposite side of camera from key light
- Back light
- Separates the subject from the background
- Above behind the subject
26Video Processing Techniques
- VGA vs. Television displays
- VGA screens are far more detailed
- Traditional video tends to look dark washed out
- Adjust Brightness
- Add gain to match screen to a TV monitor
- Be careful if youre going back out to the
broadcast world! - Adjust Contrast
- Adding a small amount is good be careful though
- Too much contrast adds grain (bad for codecs)
- Color
- Increasing saturation a bit can be helpful
Show Me How
27Working With Video
- Be sure to use the correct pixel aspect ratio
- TV pixels are slightly taller than wide VGA
pixels are square - TV resolution is approximately 720 x 480, but
when displayed appears to be 43 - You must resize to a 43 aspect ratio if a VGA
screen is your final destination - 640x480, 400x300, 320x240, 240x180, etc.
28Quick Break
- Steve Mack, LUX Media
- smack_at_luxmedia.com
29The Streaming Media Bible Workshop
- Encoding
- Steve Mack, LUX Media
- smack_at_luxmedia.com
30Agenda Encoding
- Encoding Basics
- Audio
- Video
- Advanced Encoding Techniques
- Limiting frame rate
- 2-Pass, VBR
- Advanced Encoding Filters
- De-interlace, Inverse Telecine
- Noise Reduction
- Examples
31Encoding
- Remember Bandwidth is Everything
- Make choices depending on audience bandwidth
- Total bit rate
- Audio bits vs. video bits
- Optimizing your encoding settings
- Audio
- video
32Audio Encoding Choices
- Total bit rate for audio
- 8kbps - minimum
- 16kbps good quality
- 32kbps - FM quality
- 64kbps CD quality
- Stereo vs. Mono
- Most program content is mono
- Mono codecs have better fidelity since they dont
have to worry about two channels - Music can benefit from stereo encoding
- Use mono below 32kbps
33Audio Encoding Choices
- Music vs. speech codecs
- Speech has limited dynamic frequency range
- Speech sounds decent through a music codec music
sounds horrible through a speech codec - When in doubt, stick to a music codec
- Windows Media 9 Series has a new hybrid codec
(cool!) but - Not entirely backwards compatible
- New codec install available for legacy players,
but not automatic must be installed
34Video - Encoding Choices
- Allot the correct amount for audio
- Audio tells the story
- People will tolerate less than optimal video
provided it has good sounding audio the inverse
is not true - Choose the right screen size (resolution)
- Codecs will attempt to encode to whatever
specifications you provide - High action video content implies a smaller
resolution low action content can be larger
35Video - Encoding Choices
- Choosing a Frame Rate / Frame Quality
- Less frames at better quality, or more frames at
a degraded quality? - Default encoder settings attempt to strike a
balance, but you can tinker with it - Rule of Thumb Its better to reduce the
resolution rather than the frame rate - Less frames more differences between frames
- More differences more to encode
- QuickTime/Windows Media
- set frame rate quality
- RealMedia
- Choose video quality (sharp/normal/smooth)
36Cropping Resizing
- Always be sure to maintain the correct aspect
ratio when resizing or cropping - Resizing
- DV/TV content is 720x480, which is NOT 43, but
appears 43 when displayed on TVs - Always resize to a 43 aspect ratio for VGA
displays - Cropping
- Overscan garbage around edge of screen usually
hidden by TVs crop! - Safe to crop up to 10 (title safe area)
- Widescreen content remove the black bars
- Resize first, then crop
- Resize to 43, then crop to 169
37Suggested Encoding Settings
38Advanced Encoding Techniques
- Limiting the frame rate
- Choose factors of the native frame rate
- 29.97, 15, 10, 7.5, 6, 5 for NTSC video (30fps)
- 25, 12.5, 8.67, 6.25, 5 for PAL video (25fps)
- 24, 12, 8, 6 for film (24fps)
- 2-Pass Variable Bit Rate (VBR) encoding
- Codecs do a better job if they know whats ahead
- 2-Pass encoding is beneficial but takes longer
- VBR improves quality but can be unsuitable for
streaming - High data peaks can lead to re-buffering
- Sorenson V3 has a new 1-pass VBR that improves
quality and streams well (limits peaks)
39Advanced Encoding Filters
- De-Interlacing
- Artifacts arising from the difference between
interlaced (TV) and non-interlaced (VGA) displays
40Interlacing Artifacts
- Can be interpolated, blended, or discarded
41Advanced Encoding Filters
- Inverse Telecine
- Artifacts arising from the process where film
content (24fps) is transferred to video (30fps) - Extra frames should are removed
42Advanced Encoding Filters
- Noise Reduction (actually a blur filter)
- Codecs interpret grain (noise) as motion by
blurring the frame slightly you can reduce the
graininess
43Encoding Examples
- QuickTime
- Use QuickTime Pro
- Simply open up a raw media file, and save it as a
streaming file - RealSystem
- Use RealProducer
- Session based
- Windows Media
- Use Windows Media Encoder
- Session profile based
44The Streaming Media Bible Workshop
- Authoring
- Steve Mack, LUX Media
- smack_at_luxmedia.com
45Authoring
- Simplest method use a metafile
- A browser will download or choke on protocol if
linked directly - A metafile is a small file that contains
information about another file, including its
location easy to deliver via HTTP - Metafiles facilitate handoff between browser and
media player
4
46Authoring - Metafiles
- QuickTime .qtl files
- RealSystem .ram files
- Windows Media .asx files
rtsptext rtsp//your.quicktimeserver.com/YourStrea
m.mov
rtsp//your.realserver.com/YourStream.rm
ref"mms//your.wmserver.com/YourStream.wmv" /
47Authoring - Embedded Players
- Use special HTML code to include the media player
in the web page - Different code required depending on which
browser youre authoring for - IE uses ActiveX control (except on Mac)
- Netscape-based browsers use a Plug-in
- You can get even fancier with JavaScript or
VBScript, but beware - Cross browser incompatibilities
- Netscape Plug-in vs. ActiveX controls
- Cross platform incompatibilities
- No NS plug-in for WM9S
- IE on Mac uses NS plug-in
48Embedded Players
- IE-based browsers use the tag
- Netscape-based browsers use
88ABDDC6B" codebase"http//www.apple.com/qta
ctivex/qtplugin.cab width"160"
height"136" value"YourRefMovie.mov"
height"136"
pluginspage"http//www.apple.com/quicktime/downlo
ad/"
You can use both for cross-browser compatibility
sort of.
49Embedded Players QuickTime
- Use both for cross browser compatibility
- IE ignores the tags
- Netscape-based browsers ignore the tags
- NS 6.x is broken
88ABDDC6B" codebase"http//www.apple.com/qta
ctivex/qtplugin.cab width"160"
height"136" value"YourRefMovie.mov" src"YourRefMovie.mov" width"160" height"136"
pluginspage"http//www.apple.com/quicktime/
download/"
50Embedded Players - RealPlayer
- Each part of the RealPlayer is embedded
separately, I.e. - ImageWindow the video display
- All all the controls, or can be embedded
individually - Each part requires code
- All tied together with the console parameter
51Embedded Players RealPlayer
classid"clsidCFCDAA03-8BE4-11cf-B84B-0020AFBBCCF
A" width"240" height"180" NAME"controls" VALUE"ImageWindow" / NAME"console" VALUE"one" / NAME"src" VALUE"media/MyMovie_240x180.rpm"/
width"240" height"180"
controls"ImageWindow" console"one"
/ classid"clsidCFCDAA03-8BE4-11cf-B84B-0020AFBBCCF
A" width"375" height"100" NAME"controls" VALUE"All"/ NAME"console" VALUE"one"/ src"media/MyMovie_240x180.rpm" width"375"
height"100" controls"All" console"one"
/
52Embedded Players Windows Media
- It gets tricky for a number of reasons
- Windows Media discontinued support for the
Netscape plug-in with the 7.0 player - The 6.4 plug-in doesn't work on some Netscape
browsers (NS6, NS7.0) - IE on Mac uses the Netscape plug-in
- Windows Media now offers a Java Applet for 9
Series - Requires WM9S
- Dependent on Java environment
- WM9S resumed support for the plug-in!!
- Requires WM9S
- Netscape 7.1 now supports the ActiveX control!
53Embedded Players Windows Media
- If you want to support the widest possible
audience
Netscape 7.1 now supports the Windows Media
ActiveX control Java Applet solution is
dependent on user environment
54Embedded Players Windows Media
- Use nested tags
- Different players have different sized controls
- 6.4 46px 7.0 40px 9.0 45px.
- Tricky to predict which player is installed
- Player will squeeze video window into available
space - height"244"
- classid"CLSID6BF52A52-394A-11d3-B153-00C04
F79FAA6" -
-
- src"media/wmv9.asx" width"240"
height"226" -
-
55Embedded Players - tips
- Keep it simple
- Dont forget to leave room for the control bar in
your display window - QuickTime 16 pixels
- RealPlayer 36 pixels for controls, 30-55 more
for additional info (suggested will scale) - Windows Media depends on player
- Dont forget the codebase and/or pluginspage
parameters so users can get the player if they
dont have it installed
56Break?
57The Streaming Media Bible Workshop
- Live Broadcasts
- Steve Mack, LUX Media
- smack_at_luxmedia.com
58Live Concerns
- You only get one shot no room for error
- Redundancy is key you need two of everything
- Any processing must happen in real time, so you
should consider hardware, such as an audio
compressor - You may want to be conservative with your
encoding settings to increase your chance of
success
59Live Broadcast Decision Tree
- Connectivity on site?
- Can connectivity be installed in time?
- Has Permission been granted?
- Call all partied involved (talent, venue, label,
etc) - Sufficient Budget?
- Suitable Location
- Audio?
- Video?
- Power?
- All of the above must be satisfied
60Live Concerns - Connectivity
- Send raw media back to Broadcast Operations
Center (BOC) - Satellite
- Vivyx (fiber)
- Wireless
- Send encoded streams back to BOC
- Need IP connectivity on site
- Minimum 8 week install window
61Live Concerns - Creation
- Redundancy demands lots of additional equipment
- At least one backup of all critical hardware
- Additional crew required
- Remote locations put a strain on equipment and
are not easily controlled - May need additional a/v for pre- post-show
- Need communication between crew members, on site
BOC - Don't rely on cell phones
- Land lines are best
- AIM a great tool
62Live Concerns - Encoding
- Longer events imply longer listening times
- May want to be conservative with bit rate
- Faster machines required to encode highest
quality in real-time - Backup machines required
63Live Concerns - Authoring
- Simplify web sites to speed up access to stream
- Nobody likes having to register
- Don't make them traverse entire site
- Complicated pages with lots of graphics/animation
might cause the web server to fail - If you must use an embedded player, at least
offer a link to a metafile
64Live Concerns Serving
- Vastly increased bandwidth demands
- Increased server licensing demands (RealSystem
only) - Need more servers
- Load balancing system is crucial
65Live Encoding Examples
66Where to Find More Information
- Buy the book!
- Streaming Media Bible, published by Wiley
- Over 1000 pages of streaming media tips tricks
- Companion Web Site
- http//www.streamingmediabible.com
- Trained Audio Engineers Videographers
- The best possible resource
- Can be friendly if treated well
- Generally need the work
- Ask me
- smack_at_luxmedia.com
67Thank You
- Streaming Media Bible Workshop
- Steve Mack, LUX Media
- smack_at_luxmedia.com
68Glossary
69Glossary (contd)
70Glossary (contd)
71Glossary (contd)
72Glossary (contd)