# 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:** 3

<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, 8:07pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/41 "2010-05-28T20:07:06Z")

</div>

Try reducing the video bitrate, probably significantly

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: [July 24, 2010, 1:16pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/42 "2010-07-24T13:16:31Z")

</div>

Your 2nd example is correct:

rtsp://server:1935/vod/mp4:test.3gp

or just:

rtsp://server:1935/vod/test.3gp

Take a look at the file 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: [August 26, 2010, 7:36pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/43 "2010-08-26T19:36:52Z")

</div>

You probably have “cupertinostreamingpacketizer” in Application.xml /Streams /LiveStreamPacketizers. For vod it should be empty, like this:

```auto
<LiveStreamPacketizers></LiveStreamPacketizers>

```

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: [August 27, 2010, 7:09pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/44 "2010-08-27T19:09:41Z")

</div>

This all looks right. Are you on cellular connection? Try wifi.

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: [September 1, 2010, 1:48pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/45 "2010-09-01T13:48:50Z")

</div>

To use any of the examples, copy all the files in the example’s client folder to a web site and open the html page in a browser:

```auto
http://[web-server-addresss]/webfolder/simplevideostreaming.html

```

Or, for testing you can copy all the files to your computer and open from a file explorer by double clicking the html file.

This error means that Wowza is already running and you are trying to start it again, or you have another program using port 1935 (FMIS or Red5 perhaps):

> WARN vhost comment 2010-08-31 00:00:03 - - - - - 37473.471 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use

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: [September 3, 2010, 5:09pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/46 "2010-09-03T17:09:15Z")

</div>

Your website can have a link to click to open a page that has a player configured to connect to Wowza and play that stream.

In JW player, you use the Flashvars “streamer” to set a **rtmp** connection to Wowza and “file” is the stream name.

Flashvars = “streamer=rtmp://[wowza-address]:1935/vod&file=flv:test.flv&provider=rtmp”

You can also have a client-side playlist in JW Player and Flowplayer. That is where there is a list of videos next to the player that the user can click. In JW player that is implemented by making the “file” flashvar point to an xml file. See their tutorials for more details on that if you are interested. Flowplayer has a similar feature.

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: [September 22, 2010, 4:09am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/47 "2010-09-22T04:09:56Z")

</div>

These lines are Wowza logs not validator output, and it is good, not indicating any problem.

You are playing a smil file in the I phone, and this is the video and audio codec for the item that is playing being reported.

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: [October 1, 2010, 5:19pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/48 "2010-10-01T17:19:04Z")

</div>

Did you add this property to Application.xml HTTPStreamers Properties list?

```auto
<Property>
	<Name>chunkDurationTarget</Name>
	<Value>10000</Value>
	<Type>Integer</Type>
</Property>

```

Is it modified? If so, try removing or setting to default.

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: [October 5, 2010, 4:51pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/49 "2010-10-05T16:51:56Z")

</div>

One thing, the LiveStreamPacketizer cupertino Properties you have set are not relevant for vod.

If you remove a Property you can remove the Property tags.

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: [October 6, 2010, 1:07am UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/50 "2010-10-06T01:07:25Z")

</div>

Your results are very close at this point actually. Warn lines for some segments is to be expected when using VBR encoding. What counts is the summary at bottom, and this line in particuar:

> Average segment bitrate: 444.72 kbit/s (10.06 % of target)

You want to be less than within 10% of the target, and you are just over that.

To improve this more, using the particular sample you are using (bigbuckbunnyiphone\_300.mp4), try making the Application.xml /HTTPStreamer ChunkDurationTarget value “9000”. And apply Patch 5, which will improve the accuracy of the bandwidth calculation for the playlist item, against which the bitrate of each segment is compared.

Before applying patch 5, check your Wowza version in a browser:

```auto
http://[wowza-address]:1935

```

Then see if you need to apply one or both patches on the devbuild page, starting from the bottom. You apply the oldest patch, then newer patches.

[http://wowza.com/devbuild.html](http://wowza.com/devbuild.html)

Here is Patch 5, and please see the IMPORTANT note below.

[https://www.wowza.com/downloads/WowzaMediaServer-2-1-2/WowzaMediaServer2.1.2-patch5.zip](https://www.wowza.com/downloads/WowzaMediaServer-2-1-2/WowzaMediaServer2.1.2-patch5.zip)

Carefully ready the IMPORTANT!!! notice in the README.txt file of the patch. Several core components have been upgraded:

* * *

IMPORTANT!!!

Several core components have been updraded to newer versions. Before

applying this patch, delete the following files from your Wowza Media Server

installation:

[install-dir]/lib/bcprov-ext-jdk15-143.jar

[install-dir]/lib/commons-lang-2.4.jar

[install-dir]/lib/log4j-1.2.15.jar

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: [January 21, 2011, 10:42pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/51 "2011-01-21T22:42:59Z")

</div>

Might be Flash doing port/protocol rollover. What happens when you add port 1935?:

Server: rtmp://[wowza-address]:1935/vod

Stream: mp4:sample.mp4

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: [January 23, 2011, 5:34pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/52 "2011-01-23T17:34:20Z")

</div>

That’s right. Port 1935 is the default port for RTMP, and port 80 is default port for HTTP and RTMPT (tunneling) protocol. To use non-default port, it must be explicit. So these can work:

rtmp://[wowza-address]:80/[app-name]

http://[wowza-address]:1935/[app-name]

In Wowza 2 you can bind to multiple ports. These are all nice to have:

```auto
<Port>1935, 80, 443, 554</Port>

```

Whenever you add a port like this, restart Wowza, then check the recent startup lines in the access log to ensure that Wowza was able to bind to the port(s) you added. If not, you will see many error lines because Wowza will keep trying to bind.

It is best practice to use ports explicitly even if it is the default port for that protocol.

```auto
rtmp://[wowza-address]:1935/[app-name]

```

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 1, 2011, 6:07pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/53 "2011-02-01T18:07:11Z")

</div>

Use this HTML5 in Safari on Mac instead of direct link:

```auto
<html>
<head> 
  <title>Cupertino Streaming</title>
</head>
<body>
<video controls src="http://[wowza-address]:1935/vod/sample.mp4/playlist.m3u8">
</video>
</body>
</html>

```

Reguard problem with port 1935, check your access log for errors binding to port 1935 when starting. You might have another instance of Wowza already running, or you are running FMS or another application that is already using port 1935.

Does this work in Wowza example SimpleVideoStreaming Flash player?:

Server: rtmp://[wowza-address]:1935/vod

Stream: mp4:sample.mp4

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 1, 2011, 9:20pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/54 "2011-02-01T21:20:16Z")

</div>

Another iOS snag is MP3 audio. It has to be Stereo 44100Hz. At least in some versions of IPhone.

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 1, 2011, 10:04pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/55 "2011-02-01T22:04:24Z")

</div>

AAC is better. Sorry, I should have made that point. MP3 has to be Stereo 44100Hz, but AAC is better. So, that is not the problem you are having. Stick with AAC.’

Make sure it is h.264 Baseline 3 profile. Main Profile will work in IPad but not IPhone. So that could be the problem.

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 2, 2011, 5:15pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/56 "2011-02-02T17:15:49Z")

</div>

BigBuckBunny sample video (sample.mp4) that ships with Wowza works on IPhone.

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 2, 2011, 8:03pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/57 "2011-02-02T20:03:28Z")

</div>

Maybe port 1935 is blocked in server firewall or router. Do you see Wowza version and build number in a browser at this address:

[http://152.15.100.193:1935](http://152.15.100.193:1935)

I can’t check because it is internal IP.

Is the IPhone connected to a wifi router that is on the same lan as the Wowza server?

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: [July 13, 2011, 10:19pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/58 "2011-07-13T22:19:12Z")

</div>

Wowza can’t support this. Someone else may have some insight.

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: [July 13, 2011, 11:16pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/59 "2011-07-13T23:16:14Z")

</div>

I don’t, just saying others might.

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: [November 11, 2011, 5:56pm UTC](https://community.wowza.com/t/how-to-play-a-video-on-demand-file/64/60 "2011-11-11T17:56:00Z")

</div>

Gennady,

You nee one more step, add the wowzasessionid=1176379876 above to the playlist.m3u8 URL and open in a browser, then you will download another file that lists the segments, which you can download one of in a 3rd step.

As here:

[https://www.wowza.com/docs/how-to-test-aes-encryption-for-apple-hls-streams](https://www.wowza.com/docs/how-to-test-aes-encryption-for-apple-hls-streams)

Richard

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

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