# How to play a video on demand file

**URL:** <https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64>\
**Category:** Wowza Streaming Engine\
**Created:** [October 21, 2009, 10:50am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64 "2009-10-21T10:50:42Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [February 2, 2010, 11:13am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/21 "2010-02-02T11:13:28Z")

</div>

Switching has to be done in the client in this system. You might store the smil server-side, but the stream options from it still must be loaded in the client somehow where switching is controlled using the Quality of Service metrics.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [February 27, 2010, 12:42pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/22 "2010-02-27T12:42:32Z")

</div>

Yes, in both cases.

Edit [wowza-install-dir]/conf/[applicationName]/Applicatoin.xml /StorageDir

Change to mount point or unc path or mapped drive.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 3, 2010, 6:09pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/23 "2010-03-03T18:09:34Z")

</div>

VOD streaming with Wowza Server and this device might not work. I don’t think it will.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 3, 2010, 7:29pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/24 "2010-03-03T19:29:53Z")

</div>

That post was deleted in a re-organization of the forum guides. I’m not sure which one that was but I don’t think it would help. I don’t know of a work-around. I have not heard of Wowza working with Windows mobile devices.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 16, 2010, 12:08am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/25 "2010-03-16T00:08:37Z")

</div>

They have to be H.264 Baseline 3 profile or lower. You can check with GSpot:

[http://community.wowza.com/t/-/62](http://community.wowza.com/t/-/62)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 16, 2010, 1:15am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/26 "2010-03-16T01:15:13Z")

</div>

Actually Gspot doesn’t have that info

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 22, 2010, 12:21am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/27 "2010-03-22T00:21:43Z")

</div>

You could determined which edge to use before you start playing the stream. Use the Wowza Dynamic Load Balancing package with its HTTP method to get the “least loaded server” from the middle tier.

[https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon](https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 30, 2010, 1:31pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/28 "2010-03-30T13:31:16Z")

</div>

Look at this tutorial

[https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder](https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder)

Note the FMLE (read EULA) seems to be the best option for producing streams that work.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 20, 2010, 3:51pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/29 "2010-04-20T15:51:06Z")

</div>

No, sorry, RTSP/vod is not supported yet.

> And now the VOD streaming, via mms://, is very slow during the protocol negotiation time. When I VOD a WM9 file, it takes 45 seconds to see the 1st picture. May this be an authentication problem? Any ideas? Thanks.

Is Wowza server involved in this?

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 21, 2010, 10:26pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/30 "2010-04-21T22:26:37Z")

</div>

There should be output in the console. You would see something like:

INFO smoothstreaming connect 1200151480 -

INFO stream create Extremists.m4v -

INFO stream play Extremists.m4v -

One approach at this point, that works for me all the time, is to start over. You have an application named “vod”, make one named “vod2” or delete the Application.xml in /conf/vod then copy in a new one, go over every step again with new files.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 22, 2010, 1:54pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/31 "2010-04-22T13:54:38Z")

</div>

Is that different from what is linked to at the top of this post? Do you have a link to that?

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 22, 2010, 4:37pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/32 "2010-04-22T16:37:01Z")

</div>

Well, whatever works is great. But it does work for me from the file system, on my Windows 7 machine.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 9, 2010, 3:06pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/33 "2010-05-09T15:06:48Z")

</div>

Keyframe timecodes have to be aligned for switching to occur. You will see logger statements indicating switching. If not the keyframe timecodes are probably not aligned. For live streaming you can debug this like this.

[https://www.wowza.com/forums/showthread.php?t=7942](https://www.wowza.com/forums/showthread.php?t=7942)

Server-side smil does not work with Flash. Read the Adobe articles referenced in the Live and Video on Demand tutorials. You can use the JW Player, and I think Flowplayer now also as a plugin for multi-bitrate dynamic switching. This is the JW Player tutorial:

[http://www.longtailvideo.com/support/jw-player/jw-flv-player-v4/27/bitrate-switching](http://www.longtailvideo.com/support/jw-player/jw-flv-player-v4/27/bitrate-switching)

Width and height can, and in many cases should, be different.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 10, 2010, 6:11pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/34 "2010-05-10T18:11:49Z")

</div>

ffmpeg is used to produce. For example:

bin\ffmpeg -i c:\projects\wms200\content\Extremists\_H264.mov -y -ss 6 -t 240 -s 560x320 -acodec aac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -vb 450k -vpre slow -vpre ipod640 -threads 64 c:\content\Extremists.mp4

Using the latest ffmpeg from here:

[http://ffmpeg.arrozcru.org/autobuilds/](http://ffmpeg.arrozcru.org/autobuilds/)

But we do not support ffmpeg, so you are on your own with this.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 10, 2010, 6:52pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/35 "2010-05-10T18:52:06Z")

</div>

Well, try your preferred encoder. Make sure to set the keyframe interval (GOP) the same on all versions. If each version has aligned timecodes, it should work.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 10, 2010, 7:59pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/36 "2010-05-10T19:59:34Z")

</div>

You might try adding “-g [number]” setting to the ffmpeg command.

[http://www.itbroadcastanddigitalcinema.com/ffmpeg\_howto.html#Encoding\_H.264\_Long\_GOP](http://www.itbroadcastanddigitalcinema.com/ffmpeg_howto.html#Encoding_H.264_Long_GOP)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 12, 2010, 3:24pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/37 "2010-05-12T15:24:40Z")

</div>

Do it like this:

```auto
http://[wowza-address]:1935/vod/[B]_definst_[/B]/SUBFOLDER/mp4:FILENAME.mp4/playlist.m3u

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 24, 2010, 6:49pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/38 "2010-05-24T18:49:41Z")

</div>

For the first issue, you might be able to fix this by re-building the server-side of the BWCheck example and change the module function checkBandwidth name to \_checkbw. Or the vice versa, change \_checkbw in the player to checkBandwidth

[http://community.wowza.com/t/-/31](http://community.wowza.com/t/-/31)

You will probably also have to reconcile onBWCheck and onBWDone with the client-side code.

On the silverlight issue, not sure. It is switching, so that’s good. But as far as it not doing what you expect, I’m not sure. But you might be making assumptions about your bandwidth that are not actual from the point of view of Wowza server’s connection to you.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 26, 2010, 4:12pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/39 "2010-05-26T16:12:20Z")

</div>

I don’t think we will be able to help. Smooth streaming is built-in to Silverlight. If it is not behaving as expected, it’s either a player issue or maybe your network is not as reliable as you think it is. I would try to run tests from other locations to compare.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 28, 2010, 3:38pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/40 "2010-05-28T15:38:38Z")

</div>

Great, thanks for the update.

Richard

[Previous page](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64.md?page=1)

[Next page](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64.md?page=3)
