Wowza Community

How to play a video on demand file

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

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

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

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

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

Richard

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

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:

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

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

http://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

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

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:

<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.

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

Richard

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

<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

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

Richard

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

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

Richard

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

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

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

Richard

I don’t, just saying others might.

Richard

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

Richard

Some questions about multibitrate VOD Streaming :

1/ SMIL works great on iPhone. Is there a quick way to see stream switch in action ?

Am I supposed to see an explicit log dealing with stream chosen by WMS regarding client bandwidth ?

2/ I quickly tried SMIL using Flowplayer but it does not work. Don’t know if it can work out-of-the-box by giving SMIL filename as source.

Wowza logs : “MediaReaderFactory: getInstance: Missing definition for smil”. Any idea ?

3/ Same question than for iPhone: is there a quick way to test stream switching using Flash ?

I’ve tried this but I don’t see anything in Wowza logs about stream switching.

The player runs a file from SMIL then nothing else happens. What is this sample supposed to do ?

4/ In first post, you only mention changing bitrates. Could it work if I also change width/height ? Audio bitrates ?

In other words, do the different files only need to share same framerate and same keyframe frequency ?

Thank you …

Here’s my SMIL file :

<smil>
  <head>
  </head>
  <body>
    <switch>
      <video src="SANY0034_1.mp4" system-bitrate="2700000"/>
      <video src="SANY0034_2.mp4" system-bitrate="1200000"/>
      <video src="SANY0034_3.mp4" system-bitrate="700000"/>
    </switch>
  </body>
</smil>

Changes made to MP4 files are only related to resolution and audio/video bitrates (same framerate and 2 ref frames).

I’ve tried this SMIL file on iPhone using WiFi, 3G and Edge. Whatever I’m using, the first file (SANY0034_1.mp4) is always chosen.

It works with WiFi and 3G but using Edge, nothing plays. Regarding bitrate, quite normal I guess …

Am I missing sth ?

Thank you Richard.

My main objective is to make it work on iPhone/iPad. I used Flash only for testing purpose, as Flowplayer has a bwcheck plugin.

What kind of encoder do you use to be sure keyframe timecodes are aligned in all files ?

I’ve used Handbrake, starting by setting highest profile then change frame resolution, bitrates, etc …

What kind of encoder do you use to be sure keyframe timecodes are aligned in all files ?

Any idea ? How did you produce the files you use for your tests ?

Aaaargh … Even if I really know how to use it, I never think to this one first …