![]() |
|
#1
|
|||
|
|||
|
Video On Demand Streaming
Below are the steps to set up an applcation named vod to stream video on demand content to the Adobe Flash player, the Microsoft Silverlight player and the Apple iPhone or iPod touch. For this tutorial we will use the Extremists.m4v sample video file that is located in the [install-dir]/content folder:
Multi-bitrate Video On Demand Streaming Multi-bitrate video on demand streaming to Flash, the iPhone/iPod touch and Silverlight requires that you have multiple files pre-encoded to the desired bitrates for streaming. For stream switching to occur properly, the key frames of each of the files must be aligned. This must be done at encoding time and can be achieved by setting the key frame interval and frame rate values the same for each encoded file. Once you have the files properly encoded, copy them to the [install-dir]/content folder and create a Synchronized Multimedia Integration Language (SMIL) file that links the files together for playback. For example, let's say we have four files encoded at different four different bitrates bigbuckbunny_15000.mp4 (1500kbps total bitrate), bigbuckbunny_11000.mp4 (1100kbps total bitrate), bigbuckbunny_750.mp4 (750kbps total bitrate) and bigbuckbunny_450.mp4 (450kbps total bitrate). Using a text editor create a SMIL file in the [install-dir]/content folder with the name bigbuckbunny.smil with the following content: Code:
<smil> <head> </head> <body> <switch> <video src="mp4:bigbuckbunny_450.mp4" system-bitrate="450000"/> <video src="mp4:bigbuckbunny_750.mp4" system-bitrate="750000"/> <video src="mp4:bigbuckbunny_1100.mp4" system-bitrate="1100000"/> <video src="mp4:bigbuckbunny_1500.mp4" system-bitrate="1500000"/> </switch> </body> </smil>
You can download the smil file and the videos referenced in this tutorial from these links: http://www.wowzamedia.com/_h264/bigbuckbunny.smil http://www.wowzamedia.com/_h264/bigbuckbunny_450.mp4 http://www.wowzamedia.com/_h264/bigbuckbunny_750.mp4 http://www.wowzamedia.com/_h264/bigbuckbunny_1100.mp4 http://www.wowzamedia.com/_h264/bigbuckbunny_1500.mp4 Here is an IPhone set also: http://www.wowzamedia.com/_h264/bigbuckbunnyiphone.smil http://www.wowzamedia.com/_h264/bigb...iphone_300.mp4 http://www.wowzamedia.com/_h264/bigb...iphone_400.mp4 http://www.wowzamedia.com/_h264/bigb...iphone_600.mp4 These sample mutiple-rate files where encoded with Microsoft Expression Encoder version 3 and are properly encoded with key frames aligned Note: Silverlight Smooth Streaming will only switch between the video portion of the files. The audio track of the first file listed in the <switch> container will be used. If you want to use a file other then the first file for the audio track, add an <audio> entry to the <switch> container for that item (Note: the <audio> item will be ignored by the iPhone/iPod touch). For example: Code:
<smil> <head> </head> <body> <switch> <video src="mp4:bigbuckbunny_450.mp4" system-bitrate="450000"/> <video src="mp4:bigbuckbunny_750.mp4" system-bitrate="750000"/> <video src="mp4:bigbuckbunny_1100.mp4" system-bitrate="1100000"/> <video src="mp4:bigbuckbunny_1500.mp4" system-bitrate="1500000"/> <audio src="mp4:bigbuckbunny_1500.mp4" system-bitrate="1500000"/> </switch> </body> </smil> Last edited by charlie; 08-25-2010 at 04:06 AM. |
|
#2
|
|||
|
|||
|
Hi,
I'd like to play a video on demand file, I read the appropriate tutorial and I run it using the Extremists.m4v file. but when i past my file "Fichier.mp4" to the folder "Content" and when I try to play the new file using the examples/SimpleVideoStreaming/client/simplevideostreaming.html sample, I receive the error in the Wowza Media Server Console: Code:
WARN server comment Fichier.mp4 MediaReaderH264.open[2]: java.lang.Exception: QT Utils.parseQTMediaContainer: File is missing 'moov' atom. thank you |
|
#3
|
|||
|
|||
|
It sounds like the file is not properly formatted. We can take a look at it. Send a copy to support@wowzamedia.com.
Charlie |
|
#4
|
|||
|
|||
|
Hi Charlie,
Does described method of Multi-bitrate Video On Demand Streaming supported by latest Flowplayer (3.1.5)? Here is a part of code from flowplayer.smil-3.1.3 plugin. It seems to be very primitive. Code:
private function parseSmil(smilFile:String):Array {
log.debug("parsing SMIL file " + smilFile);
var smil:XML = new XML(smilFile);
return [smil.children()[0].children()[0].@base.toString(), smil.children()[1].children()[0].@src.toString()];
}
|
|
#5
|
|||
|
|||
|
Hello,
I have tired the Multi-bitrate Video On Demand Streaming as per your instructions but it gives following error in log file ERROR server comment 2010-01-11 06:36:55 - - - - - 1583442.288 - - - - - - - MediaReaderFactory: getInstance: Missing definition for smil Please let me know the solution to fix this issue. |
|
#6
|
|||
|
|||
|
Alexy,
For Flowplayer, you have to try it out, but I think the answer (at this moment) is no. But I am not sure. JW player 4.7 is supposed to work for multi-bitrate, and they are working on multi-bitrate for JW player 5. Richard |
|
#7
|
|||
|
|||
|
Nandakumar,
Please provide more details. You should be using Wowza Server 2. What player technology are you using? If Flash, which player system? Are you prepending "smil:" to stream name? Richard |
|
#8
|
|||
|
|||
|
The tutorial says:
"Enter the following URL into the Safari web browser on the device: Code: http://[wowza-address]:1935/vod/mp4:.../playlist.m3u8 Note: This stream can also be played using the Safari Browser or QuickTime 10.x on a computer running OSX version 10.6 or greater (Snow Leopard). This works very well on an iPod Touch and using the Get URL function in QuickTime Player. However in Safari it downloads the playlist part of the command as an iTunes file with the following content: "#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000 http://161.77.180.51:1935/vod/mp4:Extremists.m4v/playlist.m3u8?wowzasessionid=1565372152" It does not play the movie. What can I do to make this work - I ultimately need to be able to place a command in an html document which will play the movie. Thanks for your advice. |
|
#9
|
|||
|
|||
|
On the IPhone, go to Settings > Safari > Plugins. It's probably "OFF". Switch it on and it should work.
Richard |
|
#10
|
|||
|
|||
|
I should have been clearer. When I described my experience with Safari, I should have said that I meant Safari on a desktop computer. The same result (that download of a file with an iTunes icon) occurs when I use FireFox or Chrome on either of the computers which I have used (Mac Pro and MacBook Pro). If I play the dowloaded file (titled playlist.m3u8) using QuickTime, it makes a brief buzzing sound and then plays the next file in my iTunes music directory. I have also tried this http:// command as suggested in the Tutorial on my wife's Windows computer. It does have iTunes installed and its behavior is the same as on my two Macintosh computers.
I am sorry that I was not clearer in my prior message. I hope this helps. By the way, my Macintosh computers are both running SnowLeopard and my wife's Windows machine is using WindowsXP. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|