How to play a video on demand file

I am trying to setup wowza media server in Centos Linux. I have tried to follow the tutorial and server appears to be running. I get the following when i try http://serverip:1935/

Wowza Media Server 2 Developer 2.1.2 build24878.

I do have a question about this portion of the tutorial

To play using Adobe Flash player:

Double-click [install-dir]/examples/SimpleVideoStreaming/client/simplevideostreaming.html, enter the information below and click the Play button.

Code:

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

Stream: mp4:Extremists.m4v

now, if i double clik, i get few option, Run (nothing happens), Run in terminal (nothing happens) or display (firefox opens up and asking to install the flash plugin.

And after that I am stuck. nothing happens - rtsp://serverip:1935/vod/mp4:Extremists.m4v shows page can not be displayed error.

http://[wowza-address]:1935/vod/mp4:Extremists.m4v/Manifest

shows the following (only few lines displayed here)

<?xml version="1.0" encoding="utf-8" ?>

The objective is host and serve some flash video in Wowza server and people will connect using browser to play the video, nothing fancy.

Here are some lines from error log

#Fields: x-severity x-category x-event date time c-client-id c-ip c-port cs-bytes sc-bytes x-duration x-sname x-stream-id x-spos sc-stream-bytes cs-stream-bytes x-file-size x-file-length x-ctx x-comment

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

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

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

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

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

Any help will be highly appreciated. I am sorry if it is too newbie question.

Thank you for the reply and it works now. I do have another newbie question, I have uploaded some files to content folder (test.flv) and i can play those going thru ]/examples/SimpleVideoStreaming/client/simplevideostreaming.html and changing the file name for the stream to flv:test.flv and it is working.

Now i would like to embed that video to a webpage so users can just play it by clicking it rather than entering the server info and stream name.

Thanks again for all your help.

I am really confused about how to acheive the objective of allowing users to be able to play a video (flv) by clicking a link. for exmaple i have test.flv, test1.flv, test3.flv in the wowza server. I would like to have user clicking a link and play a video, for example:

http://[wowza-address]:1935/vod/flv:test.flv

http://[wowza-address]:1935/vod/flv:test1.flv

http://[wowza-address]:1935/vod/flv:test3.flv

Can I do that using JW player or flowcontrol? The more I am reading, the more confused I am becoming.

I installed Wowza Media Server 2 Developper Edition and tried to watch sample.mp4.

HTTP streaming such that clientOSMF, clientSilverlight, and watiching on iOS devices, starts at once after I click play button. There is no problem.

But RTMP streaming such that client, clientAS2, and clientFlex, starts later.

It always takes 74 seconds to start after I click play button.

Thank you for replying my question.

I’m sorry that I forgot to write changing conf/VHost.xml.

I changed conf/VHost.xml for binding IP address and using port 80.

That is because our server has 4 IPs and using port 80 is easir to go through our company firewall than using port 1935.

So the beginning of conf/VHost.xml is as follows.

4

xxx.xxx.xxx.xxx

80

xxx.xxx.xxx.xxx is real IPv4 address.

Only that part is not default.

Anyhow I tried

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

Stream: mp4:sample.mp4

Then connection failed.

I returned

80

to

1935

and I tried

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

Stream: mp4:sample.mp4

Then there is no problem in both RTMP and HTTP

As a result, I found

when I changed

80

I had to try

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

Stream: mp4:sample.mp4

Having a bit of trouble getting iPhone / iPad to work per the tutorial instructions. I’ve opened ports 1935 and 80 so far. I can get the sample video to play in Safari on the iPad using:

http://[wowza ip address]:80/vod/mp4:sample.mp4/playlist.m3u8

but not when I designate port 1935, which it should, shouldn’t it?

I can’t get either to work on the iPhone.

Also, just a note, but the tutorial says “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).” Safari downloads an m3u8 playlist and saves it… is there something that I’m missing here?

Sorry if these are very basic questions, but I’m just trying to get the sample files playing per the quickstart instructions before I move on to configuration and whatnot.

Thanks.

The HTML5

And yes, I have played through the flash player locally, and on my web server using a JW player pointing to the vod app / sample.mp4

Looked at the server logs, and it’s binding successfully to 1935, 80, and 8086

Thanks for all the help so far!

Good info, I’m going to need to change my encoding workflow a bit then, as we’re AAC.

The sample video should have the right type of mp3 audio though, right?

I’m just trying to play the BigBuckBunny sample that comes packaged with Wowza. Should I even need to check this?

Yeah, still just getting playback on iPad only, port 80 only. Nothing on iPhone for the same link: http://video.uncc.edu/testing/cupertino.html

Not sure what the deal is.

Okay, I think we’re getting somewhere, thanks!

I can definitely see the version/build at that address, but only on my desktop, not WiFi. If I change to port 80, wiFi works on both iPad and iPhone. I did find out that our IT dept blocks 1935 on the wireless routers - so that makes sense. I was also previously attempting to access iphone video via 3G and not logged in to wifi. Still not sure what the deal is there, but I now have a place to start with my IT guys.

Big thanks for all your help, Richard!

The tutorial says:

"Enter the following URL into the Safari web browser on the device:

Code:

http://[wowza-address]:1935/vod/mp4:Extremists.m4v/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.

I’m having a similar issue.

I’m using xuggler to convert a flash-encoded webcam stream, and am encoding it back to the wowza server. The server sees the stream, and creates a new application instance for it, packetizing it for cupertino, and republishing the stream in all formats.

For example here’s some log output:


comment server  INFO    200     -       MyModule::onConnect(): client.getClientId()=1927546256  _defaultVHost_  videochat       _definst_       78605.606       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
connect session INFO    200     127.0.0.1       -       _defaultVHost_  videochat       _definst_       0.04    [any]   1935    rtmp://localhost:1935/videochat 127.0.0.1       rtmp    -       LNX 9,0,124,2        1927546256      3292    3073    -       -       -       -       -       -       -       -       -       -       -       -       -       rtmp://localhost:1935/videochat -
comment server  INFO    200     -       MyModule::onConnectAccept(): client.getClientId()=1927546256    _defaultVHost_  videochat       _definst_       78605.609       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MyModule::onStreamCreate(): stream.getClientId()=1927546256, adding a new ClientListener(MyMediaStreamListener instance).       -       -       -       78605.65     -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
create  stream  INFO    200     -       -       _defaultVHost_  videochat       _definst_       0.0     [any]   1935    rtmp://localhost:1935/videochat 127.0.0.1       rtmp    -       LNX 9,0,124,21927546256      3325    3413    1       0       0       0       -       -       -       -       -       -       rtmp://localhost:1935/videochat rtmp://localhost:1935/videochat -       rtmp://localhost:1935/videochat -
comment server  INFO    200     -       MyModule::play(): playName=testingBo    -       -       -       78605.69        -       -       -       -       -       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -
play    stream  INFO    200     testingBo       -       _defaultVHost_  videochat       _definst_       0.293   [any]   1935    rtmp://localhost:1935/videochat 127.0.0.1       rtmp    -       LNX 9,0,124,2        1927546256      3388    3454    1       0       0       0       testingBo       -       -       -       -       -       rtmp://localhost:1935/videochat/testingBo       rtmp://localhost:1935/videochat/testingBo       -   rtmp://localhost:1935/videochat  -
comment server  INFO    200     -       MyMediaStreamListener::onPlay(): stream.getName()=testingBo     _defaultVHost_  videochat       _definst_       78605.944       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
connect-pending session INFO    100     127.0.0.1       -       _defaultVHost_  videochat_converted     _definst_       0.039   [any]   1935    rtmp://localhost:1935/videochat_converted       127.0.0.1    rtmp    -       FMLE/3.0 (compatible; Lavf52.48.0)      391217943       3253    3073    -       -       -       -       -       -       -       -       -       -       -       -       -       rtmp://localhost:1935/videochat_converted    -
comment server  INFO    200     -       MyModule::onConnect(): client.getClientId()=391217943   _defaultVHost_  videochat_converted     _definst_       78608.042       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
connect session INFO    200     127.0.0.1       -       _defaultVHost_  videochat_converted     _definst_       0.039   [any]   1935    rtmp://localhost:1935/videochat_converted       127.0.0.1   rtmp     -       FMLE/3.0 (compatible; Lavf52.48.0)      391217943       3253    3073    -       -       -       -       -       -       -       -       -       -       -       -       -       rtmp://localhost:1935/videochat_converted   -
comment server  INFO    200     -       MyModule::onConnectAccept(): client.getClientId()=391217943     _defaultVHost_  videochat_converted     _definst_       78608.042       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
unpublish       stream  INFO    200     testingBo.sdp   -       _defaultVHost_  videochat_converted     _definst_       606.208 [any]   1935    rtmp://localhost:1935/videochat_converted       127.0.0.1    rtmp    -       FMLE/3.0 (compatible; Lavf52.48.0)      1191591696      5633537 3918    1       0       5629303 0       testingBo.sdp   -       -       -       -       -       rtmp://localhost:1935/videochat_converted/testingBo.sdp      rtmp://localhost:1935/videochat_converted/testingBo.sdp -       rtmp://localhost:1935/videochat_converted       -
comment server  INFO    200     -       MyMediaStreamListener::onUnPublish(): stream.getName()=testingBo.sdp    _defaultVHost_  videochat_converted     _definst_       78608.082       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MyModule::onStreamCreate(): stream.getClientId()=391217943, adding a new ClientListener(MyMediaStreamListener instance).        _defaultVHost_  videochat_converted  _definst_       78608.082       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
create  stream  INFO    200     -       -       _defaultVHost_  videochat_converted     _definst_       0.0     [any]   1935    rtmp://localhost:1935/videochat_converted       127.0.0.1       rtmp-FMLE/3.0 (compatible; Lavf52.48.0)      391217943       3398    3413    1       0       0       0       -       -       -       -       -       -       rtmp://localhost:1935/videochat_converted       rtmp://localhost:1935/videochat_converted    -       rtmp://localhost:1935/videochat_converted       -
publish stream  INFO    200     testingBo.sdp   -       _defaultVHost_  videochat_converted     _definst_       0.04    [any]   1935    rtmp://localhost:1935/videochat_converted       127.0.0.1   rtmp     -       FMLE/3.0 (compatible; Lavf52.48.0)      391217943       3453    3611    1       0       0       0       testingBo.sdp   -       -       -       -       -       rtmp://localhost:1935/videochat_converted/testingBo.sdp rtmp://localhost:1935/videochat_converted/testingBo.sdp      -       rtmp://localhost:1935/videochat_converted       -
comment server  INFO    200     -       MyMediaStreamListener::onPublish(): stream.getName()=testingBo.sdp      _defaultVHost_  videochat_converted     _definst_       78608.122       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MyMediaStreamListener::onMetaData(): stream.getName()=testingBo.sdp     -       -       -       78608.234       -       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSanJose.init[videochat_converted/_definst_/testingBo.sdp]: chunkDurationTarget: 10000       -       -       -       78608.234       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSanJose.init[videochat_converted/_definst_/testingBo.sdp]: chunkDurationTolerance: 500      -       -       -       78608.234       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSanJose.init[videochat_converted/_definst_/testingBo.sdp]: playlistChunkCount:4     -       -       -       78608.234       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: sanjosestreamingpacketizer:testingBo.sdp -       -       -       78608.234       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       SanJosePacketHandler.startStream[videochat_converted/_definst_/testingBo.sdp]   -       -       -       78608.235       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSanJose.handlePacket: Video codec: H264     -       -       -       78608.236       -       -       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.init[videochat_converted/_definst_/testingBo.sdp]: chunkDurationTarget: 10000     -       -       -       78608.236       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.init[videochat_converted/_definst_/testingBo.sdp]: chunkDurationTolerance: 500    -       -       -       78608.236       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.init[videochat_converted/_definst_/testingBo.sdp]: audioGroupCount: 3     -       -       -       78608.236       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.init[videochat_converted/_definst_/testingBo.sdp]: playlistChunkCount:3   -       -       -       78608.236       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: cupertinostreamingpacketizer:testingBo.sdp       -       -       -       78608.236   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       CupertinoPacketHandler.startStream[videochat_converted/_definst_/testingBo.sdp] -       -       -       78608.237       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: smoothstreamingpacketizer:testingBo.sdp  -       -       -       78608.237       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.handlePacket[videochat_converted/_definst_/testingBo.sdp]: Video codec:H264 isCompatible:true     -       -       -       78608.237    -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSmoothStreaming.startStream[videochat_converted/_definst_/testingBo.sdp]    -       -       -       78608.237       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.handlePacket[videochat_converted/_definst_/testingBo.sdp][avc1.66.13]: H.264 Video info: {H264CodecConfigInfo: profile: "Baseline", level: 1.3, frameSize: 640x480, displaySize: 640x480, frameRate: 15.0}     -       -       -       78608.237       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -   --       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerSanJose.handlePacket: Audio codec: AAC      -       -       -       78610.877       -       -       -       -       -       -       -   --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       LiveStreamPacketizerCupertino.handlePacket[videochat_converted/_definst_/testingBo.sdp]: Audio codec:AAC isCompatible:true      -       -       -       78610.877    -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
comment server  INFO    200     -       H264Transcoder::testRTMPPublishH264(): this.streamName=testingBo.sdp - it's already transcoded stream - so we exit to avoid the infinite looping        _defaultVHost_       videochat_converted     _definst_       78613.123       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -   --       -       -


If I’m not mistaken, this implies that the stream is properly being converted from videochat/testingBo to videochat_converted/testingBo.sdp.

Since the conf/videochat_converted/Application.xml specifies to packetize for cupertino http stream, this should be available through html5 such as:

<div style="width:640px; height:480px; background-color:#cccccc; border-style:solid; border-color:#ff0000;">
				<video 
					width="640"
					height="480"
					src="http://[wowza-address]:1935/videochat_converted/testingBo.sdp/playlist.m3u8"
					type="video/mp4"
				>
				</video>
			</div>

However, what’s returned from the server is simply:

(1st request’s response:)

HTTP/1.1 200 OK
Date: Wed, 13 Jul 2011 13:09:41 GMT
Content-Type: application/vnd.apple.mpegurl
Server: FlashCom/3.5.5
Cache-Control: no-cache
Content-Length: 167

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=328296
http://[wowza-address]:1935/videochat_converted/testingBo.sdp/playlist.m3u8?wowzasessionid=1541025097

(2nd request’s response:)

HTTP/1.1 200 OK
Date: Wed, 13 Jul 2011 13:09:42 GMT
Content-Type: application/vnd.apple.mpegurl
Server: FlashCom/3.5.5
Cache-Control: no-cache
Content-Length: 165

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=328296
http://[wowza-address]:1935/videochat_converted/testingBo.sdp/playlist.m3u8?wowzasessionid=38103941

And then no more requests are made, and no video is streamed.

I can, however, see the stream via rtmp flash connection such as:

host: rtmp://[wowza-address]/videochat_converted
stream: testingBo.sdp

Can anyone assist on a test for iOS/html5?

Thanks for getting back to me on this, Richard.

Got anyone in mind? Another support guy, possibly?

Hello,

I faced the issue when I tried to setup video-on-demand Cupertino streaming.

I am having Wowza Media Server 3 Developer Edition deployed locally. When I access http://localhost:1935/vod/mp4:sample.mp4/playlist.m3u8 the response is

#EXTM3U

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=572079,CODECS=“avc1.66.30, mp4a.40.2”,RESOLUTION=424x240

playlist.m3u8?wowzasessionid=1176379876

No segments are presented in response, so, clients cannot receive stream.

Server log seems normal:

INFO cupertino connect 1362960016 -

INFO stream create sample.mp4 -

INFO stream destroy sample.mp4 -

INFO cupertino disconnect 1362960016 -

Application definition does not contain any modification, StreamType is default HTTPStreamers are cupertinostreaming,smoothstreaming,sanjosestreaming.

Thanks in advance!

Gennady

Richard,

Thank you for so fast response!

Gennady