Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI Thursday, April 23, 2009.

Similar presentations


Presentation on theme: "Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI Thursday, April 23, 2009."— Presentation transcript:

1 Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI allan@cmi.aau.dk Thursday, April 23, 2009

2 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 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 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.rarhttp://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 http://downloads.activestate.com/ActivePerl/Windows/5.10/ActivePerl-5.10.0.1004- MSWin32-x86-287188.msi  Remember to restart Windows afterwards 2

3 Agenda  Streaming terms  Streaming  Examples of streaming  The exercise  A little help 3

4 4 Hardware for interpreting digital content  Television DVB-(C/S/T) IP-TV  Handheld devices Mobile phone  3G  DVB-H

5 5 Streaming o Streaming: A client logs onto a server and requests a video/audio stream o Prerecorded & Live o Takes up no disk space (memory buffering) o No problem with Digital Right Managements (no local storing) o Content must be adapted to bandwidth

6 6 Streaming (cont.) o Streaming server o Interactivity o Stored content (if hinted) can be fast forwarded to the wanted timecode o Adapting to bandwidth o Depending on the clients network, the datastream can be adapted to the bandwidth o 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 bandwidth o Controlled jitter o Reduced latency o Priority for one or more flows does not make other flows fail

7 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

8 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/

9 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

10 10 RTSP – Real-Time Streaming Protocol  The streaming ”remote control” MethodDescription OptionsGet available methods SETUPEstablish transport ANNOUNCEChange description of media object DESCRIBEGet description of media object PLAYStart playback, reposition RECORDStart recording REDIRECTRedirect client to new server PAUSEHalt delivery, but keep state SET-PARAMETERDevice or encoding control TEARDOWNRemove state

11 11 SDP – Session Description Protocol  The ”menu card” from the server

12 12 RTP – Real-time Transport Protocol  The ”data stream” but more than just plain data

13 13 RTCP – Real-time Transfer Control Protocol  Used in both RTP & SDP  Overview:

14 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) Request Send SDP Request RTP RTP RTCP Connection info Connection accepted

15 15 Live streaming (ex. video conference) RTSP/SIP/SAP/ RTP RecorderPresentation Capture/encoding Streaming server Clients RTSP/SIP/SAP/ RTP Picture/Sound Unicast (RTP)

16 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

17 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

18 Questions Thank you for your attention 18

19 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

20 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 “ #1:fps=15.000" -add " #2" - 3gp -new “.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,deinterl ace 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


Download ppt "Internet Technologies Streaming Media - and an exercise Allan Hammershøj Research Assistant, CMI Thursday, April 23, 2009."

Similar presentations


Ads by Google