Top Banner
Audio and Video Audio and Video Streaming Streaming - Anil Kumar Panigrahi
16

Audio and Video Streaming

May 11, 2015

Download

Technology

Seminar Presentation on Audio and Video Streaming by Anil Kumar on 27th June, 2009 at Nyros Technologies, kakinada.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Audio and Video Streaming

Audio and Video Audio and Video StreamingStreaming

- Anil Kumar Panigrahi

Page 2: Audio and Video Streaming

What is streamingWhat is streamingIntroduction to streamingIntroduction to streamingWhy do we need for streamingWhy do we need for streamingWhat is the process to do streaming filesWhat is the process to do streaming filesHow does the streaming files workHow does the streaming files workRelevant players to run the streaming files (for the web)Relevant players to run the streaming files (for the web)Complete example with how to create ,run and converting Complete example with how to create ,run and converting to different formats. to different formats.

Page 3: Audio and Video Streaming

What is streaming What is streaming

In streaming video and audio, the traveling information is a stream of data from a In streaming video and audio, the traveling information is a stream of data from a server. The decoder is a stand-alone player or a plugin that works as part of a Web server. The decoder is a stand-alone player or a plugin that works as part of a Web browser. The server, information stream and decoder work together to let people watch browser. The server, information stream and decoder work together to let people watch live or prerecorded broadcasts. live or prerecorded broadcasts.

The success of streaming media is recent days, but the idea behind it has been around The success of streaming media is recent days, but the idea behind it has been around as long as people have. Information travels toward you in the form of a sound wave. as long as people have. Information travels toward you in the form of a sound wave. Your ears and brain decode this information, allowing you to understand it. This is also Your ears and brain decode this information, allowing you to understand it. This is also what happens when you watch TV or listen to the radio Information travels to an what happens when you watch TV or listen to the radio Information travels to an electronic device in the form of a cable signal, a satellite signal or radio waves. The electronic device in the form of a cable signal, a satellite signal or radio waves. The device decodes and displays the signal.device decodes and displays the signal.

Page 4: Audio and Video Streaming

Introduction to streaming files.Introduction to streaming files.

Person A is having a book , the Person B wants it. There is two options to sends The book from Person A to Person B. 1) Sends the total book at a time

2) Sends the page by page with speed of Person B reads that page.

The option 1 may be failed while transferring the data. The option 2 is called the Streaming.

Page 5: Audio and Video Streaming

Why we need StreamingWhy we need Streaming

If there is small file transfer from one point to another , there is no need of streaming. Suppose we having the file with having 5 minutes as duration And it having the 59 MB, We want to play that file in the web site. We having the Dial-up connection internet connection , to loading that file in the browser take more and more time.

There we want the steaming concept to reduce the file size and we want to play that file in the browser. While uploading the file into server that will convert into flv format to run that file In the flash player.

The 5minutes file will be converted into 10 MB file with small change in the quality and it will be load in the browser to play the file with very span of time depends upon speed of internet.

Page 6: Audio and Video Streaming

What is the process to streamingWhat is the process to streamingStreaming means reduce the quality of pictures and ultimately reduce the size of the file to run at the web.

Make the picture smaller: Most streaming videos don't fill the whole screen on a computer. Instead, they play in a smaller frame or window. If you stretch many streaming videos to fill your screen, you'll see a drop in quality.

Reduce the frame rate: A video is really a series of still images. The frame rate is how quickly these images move from one to the next. A lower frame rate means fewer total images and less data needed to recreate them. The reduction in frame rate is why some streaming videos.

According to bitrate that files are steamed, the software that compressed and decompressed that is codec.

Page 7: Audio and Video Streaming

How the streaming file works How the streaming file works 1.11.1

1) Basic Streaming Process: User visits a web page hosted on a web server and finds a file he would like to

see or hear.

2)Web Server: The web server sends a message to a streaming media server, requesting the

specific file.

Page 8: Audio and Video Streaming

How the streaming file works How the streaming file works 1.21.2

3) Media Server : The streaming server streams the file to the user’s computer, bypassing

the web server.

4)Client: The client software on the user’s computer decodes and plays the file

(The browser plugin, standalone player or Flash application on your computer decodes and displays the data as it arrives.)

Page 9: Audio and Video Streaming

Relevant players for to play the streaming filesRelevant players for to play the streaming files1) QuickTime, from Apple, plays files that end in .mov.

2) RealNetworks RealMedia plays .rm files.

3) Microsoft Windows Media can play a few streaming file types: Windows Media Audio (.wma), Windows Media Video (.wmv) and Advanced Streaming Format (.asf).

4) The Adobe Flash player plays .flv files. It can also play .swf animation files.

The flow player We can download from below website URL : http://flowplayer.org/download/index.htmlIt having features like it can all supported formats like flv,mp3 and customization player

JW flv player We can download from the http://www.longtailvideo.com/players/jw-flv-player/It having the features like it can play the flv, mp4, mp3,aac,jpg and png files.

Page 10: Audio and Video Streaming

The complete example for streamingThe complete example for streamingTo implement it that we want the FFMpeg software files, We can download those Files from http://ffmpeg.orgIt will run at the command prompt , then it will gives the list out total formats which supports using ffmpeg ,1) To list out the total commands that is supports by the FFMpeg:

ffmpeg\ffmpeg –formats2) Converting video file to flv using FFMpeg:

ffmpeg -i video.dat -ar 22050 -ab 32 -f flv -s 320x240 video.flv

–i is input file name–ar is audio sampling rate in Hz–ab is Audio bit rate in kbit/s -f Output format-s Output dimension

Page 11: Audio and Video Streaming

The command at the command prompt and how it run at the command prompt

Page 12: Audio and Video Streaming

Creating Thumbnails while converting the file using FFMpeg:

ffmpeg\ffmpeg -i video\10806.avi -r 0.1 -sameq -f image2 thumbs\testing%02d.jpg

Here ffmpeg\ffmpeg is in the ffmpeg folder in that ffmpeg is exe file to run the command.video\10806.avi The source file which are going to converted into small thumbnails.thumbs\testing%02d.jpg Is the destination folder in which the thumbnails going to be saved.For every five seconds will be one fifth (1/5) or 0.2, so to grab ever 0.2 frame, this code is used.

-i Input file name-an Disable audio-r fps-y Overwrite file-s Output dimension

ffmpeg\ffmpeg -i AVSEQ01.mpg -an -ss 00:01:03 -t 00:00:30 -r 1 -y -s 320×240 %d.jpg

This command for create 320×240 sized images starting of the video 00:01:03 to next 30 seconds, creates the 30 images.

Page 13: Audio and Video Streaming

To convert the flv file to mpg format:ffmpeg\ffmpeg -i video\10806.flv -ab 56 -ar 22050 -b 500 -s 320×240 jokes.mpg-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)-ab bitrate: set the audio bitrate in kbit/s (default = 64)-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)-s size: set frame size. The format is WxH (default 160×128 )

ffmpeg can also make DVD video files using -target, where the target can be "vcd", "svcd", "dvd", "dv", "pal-vcd", "ntsc-svcd".

-VCD format file-ffmpeg\ffmpeg -i video\10806.avi -target ntsc-vcd vcd.mpg

- DVD format fileffmpeg\ffmpeg -i video\10806.avi -target ntsc-dvd dvd.mpg

- FLV file to VCD or DVD formatffmpeg\ffmpeg -i video\10806.flv -target ntsc-vcd vcd1.mpg

-FLV – mpg and mpg – flv-ffmpeg\ffmpeg -i video\vcd1.mpg -ab 256 Som_du_visnar2.flvffmpeg\ffmpeg -i video\Som_du_visnar2.flv -target ntsc-vcd Som_du_visnar2.mpg

Page 14: Audio and Video Streaming

To convert into video file into mobile version supported file format:ffmpeg\ffmpeg -i jokes.mpg -vcodec h263 -s qcif -r 15 -b 100k -acodec libfaac -ac 1 -ar 32000 -ab 64k output.3gp

The file size is 716 kb that is converted into 3gp file format with 512 kb.•H.263 video codec•QCIF video resolution (176×144)•15fps•100 kb/s video bitrate•AAC audio codec (through libfaac)•1 audio channel•32000 Hz audio sampling frequency•64 kb/s audio bitrate

How to splitting the video file:ffmpeg\ffmpeg -i vcd1.mpg -ss 00:00:10 -t 00:00:30 out1.mpg

-ss are the start point in hh:mm:ss from the beginning of your video file.

-t is the length of time in hh:mm:ss of your new segment.Here the video file from the 10 seconds to 30 seconds and it will store at the output video file.

Page 15: Audio and Video Streaming

Queries?

Page 16: Audio and Video Streaming

Thank You

- Anil Kumar Panigrahi