internet technologies streaming media - and an exercise allan hammershøj research assistant, cmi...
TRANSCRIPT
![Page 1: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/1.jpg)
Internet Technologies
Streaming Media
- and an exercise
Allan HammershøjResearch Assistant, [email protected]
Thursday, April 23, 2009
![Page 2: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/2.jpg)
Preparation Each group should have at least one computer with the following
software installed: VLC 0.8.6i
http://www.videolan.org/mirror-geo.php?file=vlc/0.8.6i/win32/vlc-0.8.6i-win32.exe
MP4box for streaming (the file has to be hinted) http://www.videohelp.com/download/MP4Box-0.4.5.zip
Darwin Streaming Server (patched by me to work with all Windows versions)
available for download here: http://imi.aau.dk/~allan/dss.rar Unpack it (using WinRAR), so the path to the software is: c:\Program Files\
Darwin Streaming Server In this folder run: Install.bat (on Vista run it is as administrator)
Perl interpreter- For windows, choose: http://downloads.activestate.com/ActivePerl/Windows/5.10/ActivePerl-5.10.0.1004-
MSWin32-x86-287188.msi
Remember to restart Windows afterwards
2
![Page 3: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/3.jpg)
Agenda Streaming terms
Streaming
Examples of streaming
The exercise
A little help
3
![Page 4: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/4.jpg)
4
Hardware for interpreting digital content Television
DVB-(C/S/T)
IP-TV
Handheld devices Mobile phone
3G
DVB-H
![Page 5: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/5.jpg)
5
Streaming
o Streaming: A client logs onto a server and requests a video/audio stream
o Prerecorded & Liveo Takes up no disk space (memory buffering)o No problem with Digital Right Managements
(no local storing)
o Content must be adapted to bandwidth
![Page 6: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/6.jpg)
6
Streaming (cont.)
o Streaming servero Interactivity
o Stored content (if hinted) can be fast forwarded to the wanted timecode
o Adapting to bandwidtho Depending on the clients network, the datastream can be
adapted to the bandwidtho Rely on QoS
o Quality of Service (QoS) refers to the capability of a network to provide better service to selected network traffic over various technologies
o Dedicated bandwidtho Controlled jittero Reduced latencyo Priority for one or more flows does not make other flows fail
![Page 7: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/7.jpg)
7
Streaming (cont.)
Content delivery On-Demand Live
Unicast (one server where all clients connect to) Splitting (one server send to other servers where clients
connect to) Multicast (standardized way of distributing data to a large
network like the Internet by routing the same packages to all users)
Simulated live Like the three options in live but with prerecorded material
![Page 8: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/8.jpg)
8
The protocols of Streaming Streaming also is based on a bunch of protocols like
everything else relating to the Internet RFC 2326 – RTSP: Real Time Streaming Protocol RFC 4566 - SDP: Session Description Protocol RFC 2974 – SAP: Session Announcement Protocol RFC 3261 - SIP: Session Initiation Protocol RFC 3550 - RTP: Real-Time Transport Protocol RFC 3550 – RTCP: Real-time Transport Control Protocol RFC 3551 - RTP Profile for Audio and Video
Conferences with Minimal Control The RFC’s can be found on: http://www.faqs.org/rfcs/
![Page 9: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/9.jpg)
9
Network structure (the real ”layer cake”)
Layer definition Layer 1 is not included because it is simply the raw copper,
radio frequency or optic fiber
![Page 10: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/10.jpg)
10
RTSP – Real-Time Streaming Protocol The streaming ”remote control”
Method Description
Options Get available methods
SETUP Establish transport
ANNOUNCE Change description of media object
DESCRIBE Get description of media object
PLAY Start playback, reposition
RECORD Start recording
REDIRECT Redirect client to new server
PAUSE Halt delivery, but keep state
SET-PARAMETER Device or encoding control
TEARDOWN Remove state
![Page 11: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/11.jpg)
11
SDP – Session Description Protocol The ”menu card” from the server
![Page 12: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/12.jpg)
12
RTP – Real-time Transport Protocol The ”data stream” but more than just plain data
![Page 13: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/13.jpg)
13
RTCP – Real-time Transfer Control Protocol Used in both RTP & SDP
Overview:
![Page 14: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/14.jpg)
14
Single streaming session
Streaming server
Client
Client request file info (RTSP)
Server send SDP-file (RTSP)
Client initialize and send connection info
Option: Send one or more possible suggestions
Server send connection accept Option: Look through
suggestions and accept one of the solutions. Then the client can send an connection accept. If none can be accepted then server sends connection refused
Client send RTP-request (RTSP)
Server send RTP accept (RTSP) and streams RTP on configured port
Option: Client send information on RTCP
(statistics on connection)
RequestSend SDPRequest RTPRTPRTCPConnection info
Connection accepted
![Page 15: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/15.jpg)
15
Live streaming (ex. video conference)
RTSP/SIP/SAP/RTP
RecorderPresentation
Capture/encodingStreaming server
Clients
RTSP/SIP/SAP/RTP
RTSP/SIP/SAP/RTP
Picture/Sound
Unicast (RTP)
![Page 16: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/16.jpg)
16
Multicast streaming
In many ways the same as single sessions
SIP – Session Initiation Protocol SIP invitations used to create sessions carry session descriptions that
allow participants to agree on a set of compatible media types
SIP makes use of elements called proxy servers to help route requests to the user's current location, authenticate and authorize users for services
SIP is an agile, general-purpose tool for creating, modifying, and terminating sessions
SAP – Session Announcement Protocol Info of the session being broadcasted is periodically sent to a known
address and port to subscribers within the same scope of the broadcast
![Page 17: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/17.jpg)
17
A little calculus Video:
Frame rate (frames/s) frame width (pixels) frame height (pixels) color depth (bits/pixel) duration (s) = total video file size (bit)
Sound: Sampling resolution (bit/sample) sampling frequency
(Hz) no. of channels duration (s) = total audio file size (bit)
Total media file size Video + Sound
![Page 18: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/18.jpg)
Questions
Thank you for your attention
18
![Page 19: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/19.jpg)
The exercise 1. Step – Try Darwin Streaming Server (DSS) with Quicktime/VLC using rtsp
Use the example files from DSS in the folder: “Movies”
2. Step - Play with VLC and transcode non-live/live video to H.264/AAC Experiment with different frame rates and bit rates. Identify the lowest acceptable
setting to be used with a mobile phone (352x288 resolution)
3. Step – Create a batch-script to transcode to a file using VLC with chosen settings from step 2
4. Step – Insert a semi transparent group logo in the top right corner
5. Step – Prepare it for streaming with the container format 3gp using MP4box
6. Step – Use DSS to stream the file from step 4 to a client (if possible a mobile phone using WIFI) (mandatory)
7. Step – Generate an SDP-file with live input using VLC (optional)
8. Step – Stream the live content to a mobile phone (if possible) using DSS (optional)
19
![Page 20: Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009](https://reader036.vdocument.in/reader036/viewer/2022070406/56649de95503460f94ae4818/html5/thumbnails/20.jpg)
A little help Using VLC in command line mode:
http://www.videolan.org/doc/play-howto/en/ch04.html
Common errors: Using VLC command line with spaces in names, remember ”” Be sure that you use {} in the right amount On the streaming server computer, open port 554 (and 1220 to remote control the streaming
server) in the firewall
Using MP4box: mp4box -hint -flat -add “<source filename>#1:fps=15.000" -add "<source filename>#2" -
3gp -new “<dest filename>.3gp“ The fps means frames per second and has to be edited to match the actual fps in the file
being prepared for streaming. In the example above the video is encoded with 15 fps
Encoding to H.264/AAC using VLC: vcodec=h264,vb=320,venc=x264{keyint=50,no-
cabac,bframes=0,level=13,ref=1,me=hex,subme=5,no-b-adapt,ratetol=10,aq-mode=0,aq-strength=0.75,partitions=none,direct=auto},fps=25,maxwidth=320,maxheight=176,deinterlace
acodec=mp4a,ab=64,channels=1,samplerate=22050
Generating an SDP-file with VLC and put it in the main folder of DSS: :rtp{dst=127.0.0.1,port-video=11030,port-audio=11032,ttl=3,mp4a-latm,sdp="file://C:\
Program Files\Darwin Streaming Server\Movies\vlc_live.sdp"}
20