Wowza Community

RTSP/RTP improvements including video on demand support (patch15 or greater)

Well, first of all thanks for implementing vod support!

I tested it today and it works quite well so far.

I had only some troubles with the request URIs.

If I use

server:1935/vod/mp4:path/file.mp4

as in your examples the error log complains about

INFO server comment - Error creating object name javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

and the path is shortened to the first “/”

If I use

server:1935/vod/_definst_/mp4:path/file.mp4

everything works fine.

Am I doing something wrong?

Regards, MASHtm

http://www.wowza.com/mobile.html

seems to not work on my G1 (rooted, latest CyanoGen mod 5.07, Firmware version 2.1-update1, kernel version 2.6.33.3, build number EPE54B).

it just gives “Sorry, this video cannot be played.” message :frowning:

http://www.wowza.com/mobile.html

seems to not work on my G1 (rooted, latest CyanoGen mod 5.07, Firmware version 2.1-update1, kernel version 2.6.33.3, build number EPE54B).

it just gives “Sorry, this video cannot be played.” message :frowning:

Hm, I’ve just tested with local Wowza and it seems to work fine :slight_smile:

What API can be used to monitor stream pause/resume/seek ?

Hi! Two questions:

  1. IMediaStreamActionNotify2 has the following method

public void onPlay(IMediaStream s, String streamName, double playStart, double playLen, int playReset)

… and what is convenient is that it has playStart

… and onSeek has location, like other methods

but when using IRTSPActionNotify I do not understand how to get needed info from (for example)

public void onPlay(RTPSession rtspSession, RTSPRequestMessage req, RTSPResponseMessages resp)

please suggest how to do it…

  1. Is there a bug with RTPSession class?

I call session.getServerIp(), however I get ip of my android device, but not ip of my Wowza server.

Thank you!

Thank you, Richard!

However, as you know, RTSP allows seeking (as RTMP), so definitely there should be some way to guess to what point of video the player has seeked in IRTSPActionNotify (probably on in onPlay, bun in some other method).

When player does seek, Wowza in some way gets the new play position from player request, so technically there is nothing hard to give that position to code that uses Wowza API.

Please advice…

String rangeStr = req.getHeader(“range”);

Thank you, Charlie! It was what I wanted.

http://www.wowza.com/downloads/WowzaMediaServer-2-2-3/WowzaMediaServer2.2.3-patch7.zip

It should fix the rtpSession.getServerIp() bug.

It is a bit strange, but it seems that it returns null now…

I use Motorola Defy (Froyo) and connect to local Wowza over WiFi.

Am I doing something wrong?

Thank you! It worked!

Next question - how to stop the RTSP session/stream correctly (I mean in something like Pay-per-minute model, when after some play time stream should be automatically closed).

I used:

  • rtpsession.rejectSession();

  • rtpsession.shutdown();

  • rtpsession.getRTSPStream().shutdown(new RTPRequestStatus(403, “Forbidden”));

  • rtpsession.getRTSPStream().getStream().close();

… but all these methods have bug: in player audio and video stop, but timebar continues moving. Instead, logically there might be some total disconnection with window or msg like “Connection was closed”.

This was reproduced with Android player, QuickTime(Windows).

VLC sometime crashes, and sometimes totally stops as needed :slight_smile:

I suppose I need to send some message to the player in my code so it will close connection.

Please advice…

RTPContext.shutdownRTPSession(RTPSession rtpSession);

thank you, Charlie! However, I see player still does not stop…

I suppose some shutdown request should be sent to the player.

It seems that it is really a player “bug”, probably it is based on UDP nature or something like this… Same results I’ve got by simply closing Wowza.

I tried some other hacks, but still with no luck…

Any ideas?

Hi Guys,

I can download this file from some place: BigBuckBunny_175k.mov

Thanks,

Ale

Thanks Charlie!!

Hi,

If your server is not behind a NAT you need put in all this places the PUBLIC IP.

If your Wowza server is not behind NAT (network address translation) then it is suggested that all these of these values should be set to the external ip address of your Wowza server.

Regards,

Alejandro

You have some error? the logs show something? works this if you use VLC for play the stream? what is the URL you is using?

The link http://www.wowza.com/mobile.html doesn’t work for me with QuickTime Version 10.0 (113), on Mac OS 10.6.3. It hangs at “getting info”.

Works on HTC Magic, on Nokia e52 and 5800, though…

You can’t play the http://www.wowza.com/mobile.html URL directly in QuickTime. You need to play the RTSP address that is referenced in the HTML:

rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

Charlie

Well obviously you can’t play the HTML page directly into QuickTime, but the image on the page has the link to the rtsp stream and clicking on it opens QuickTime with that rtsp link.

Anyway, it works now, so whatever you did between my first post and now did the trick.

Thanks for this great work, I’ve been looking forward to this upgrade!

Question though… are there specific requirements for encoding the files? It seems like my previous encoded 3gp files (mpeg4 format) are unable to play. I’ve tried a few mobile devices as well as Quicktime players. The examples provided by you, however, play perfectly fine. They also play perfectly fine under Darwin Streaming Server.

Thanks for any assistance! :slight_smile:

Hi,

Is there a way to get the ‘time running’ information for a rtsp stream similar to the getTimeRunning() function for HTTPStreams? I see a getDuration() but no getTimeRunning().

Vijay

Thanks for the reply Richard. Unfortunately, that results in a null pointer exception.

ERROR server comment - invoke(onRTPSessionDestroy): java.lang.NullPointerException: com.xxx.wms.module.xxx.onRTPSessionDestroy(xxx.java:1449)
java.lang.NullPointerException
	at com.xxx.wms.module.xxx.onRTPSessionDestroy(xxx.java:1449)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at com.wowza.wms.module.ModuleFunction.invoke(Unknown Source)
	at com.wowza.wms.module.ModuleFunctions.invokeSpecial(Unknown Source)
	at com.wowza.wms.module.ModuleFunctions.onRTPSessionDestroy(Unknown Source)
	at com.wowza.wms.rtp.model.RTPSessions.notifySessionDestroy(Unknown Source)
	at com.wowza.wms.rtsp.RTSPRequestAdapter.closeSession(Unknown Source)
	at com.wowza.wms.server.ServerHandler.sessionClosed(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreaded.sessionClosed(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$2.sessionClosed(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$600(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(Unknown Source)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$600(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:613)

Tried it with both a Live and VoD RTSP request.

What I’d like to use it for is a custom wowza status page using the HTTPProvider class. What’s interesting is that when I loop through the RTP sessions for a particular instance in the code snippet below, I don’t get a null pointer exception. Instead the duration is returned as ‘com.wowza.util.ElapsedTimer@a07a6f’:

if (appInstance.getRTPSessionCount() > 0)
{
	List<RTPSession> rtpSessions;
	rtpSessions = appInstance.getRTPSessions();
	
	Iterator<RTPSession> rtpSessionIterator = rtpSessions.iterator();
											
	while (rtpSessionIterator.hasNext())
	{
		RTPSession currSession = (RTPSession)rtpSessionIterator.next();
		...
		...
		body.append( "    <tr>");
		body.append( "      <td align=\"left\" valign=\"middle\">Connection Duration</td>");
		body.append( "      <td align=\"left\" valign=\"middle\">"+currSession.getRTSPStream().getStream().getElapsedTime()+"</td>");
		body.append( "    </tr>");
	}
											
}
	

I was glad to see the new support for rtsp. I opened a new Wowza EC2 instance and tried to view Extremists.m4v in Quicktime using the link provided in an earlier post. After a few seconds I could hear audio but no video. I only saw the Quicktime symbol with the animated dotted line underneath. This went on for at least 30min. Finally, I tried to view the file on Longtail Video’s setup wizard and it showed up beautifully.

I did manage to change the Application.xml file as was suggested earlier, but authentication was the least of my worries.

I’ll keep looking foward to the new opportunities that abound from this kind of server. Thanks for all your support

Extremists.m4v file worked fine with Quicktime v7.6.6 player from Wowza EC2 instance using rtsp protocol. I had to adjust the Quicktime v7.6.6 preference settings to Safe mode in the Advanced tab. Thanks Charlie.

Very nice work guys. The example is working great indeed with QTplayer.

What are the requirements for the files I want to play?

H264 encoded i think, but some files give a ‘moov atom is missing’ error or something like that.

Only mp4/m4v/f4v supported atm?

Anyway thanks a lot Wowza team!