Wowza Community

access LiveStreampacketizer Cupertino programmatically?

Hi,

if on application.xml i configure LiveStreamPacketizers as below:

cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer

this seems to do some useful analysis to the incoming stream ie. cupertinostreaming packetizer displays info on the wowza console like:

video codec:h264: IsCompatible true

is there away that i can get a refrence to the LiveStreampacketizerCupertino programmatically and check these conditions. ie:

LiveStreampacketizerCupertino.IsIphoneCompatible()

LiveStreampacketizerCupertino.GetBaseLineUsed() etc.

LiveStreampacketizerCupertino seems to now if the stream is Iphone/Ipad compatible but would be great if programatically i can read these properties.

thanks

You can get audio and video codec info from a stream when it starts with the IMediaStreamActionNotify3 interface:

https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info

Richard

The same method should work. I’m not sure how else.

Richard

You have enough info to do it. Set two Boolean variables to false, then set one to true if onCodecInfoAudio runs, and the other to true if onCodecInfoVideo runs. There might be a better way, but that can work

Boolean isAudio = false;
Boolean isVideo = false;

Richard

It is just Wowza 3. Everything new will be added to Wowza 3.

Richard

Yes, you can stream to iOS with Wowza 2.

Richard

I don’t think so. You need Wowza 3 and IMediaStreamActionNotify3

https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info

Richard

thanks richard, that was very helpful,

Is there a away of quering IMediaStream or any other object on the API of number of streams in a Container,

i.e if you are publishing video and audio than this property would return 2, but if there is only audio than this property would return 1

thanks

onCodecInfoAudio is triggered only if there is audio stream on the mediastream

onCodecInfoVideo is triggered only if there is video stream on the mediastream

so there must be code that knows in advance whether both onCodecInfoAudio onCodecInfoVideo should be notified

this value would allow me in advance to make a decision on what path to take:

if audio only take path 1

if video only take path 2

if audio and video handle the events differently

so when onCodecInfoVideo is called (i persume i have an audio too so i wait for the onCodecInfoAudio to be called )

but there is no audio so onCodecInfoAudio is never called.

one way to resolve this would be to add another method to IMediaStreamActionNotify3

that gets called after onCodecInfoAudio, or else i have to add another module on the pipeline that gets executed after this module to check wether both events have been triggered.

but this would no be the best way of handling this problem.

thanks Richard, it’s now working.

I just realized that IMediaStreamActionNotify3 is only available on wowza 3 is it possible to listen to onCodecInfoAudio and onCodecInfoVideo on wowza 2?

Is there any way of testing iphone/ipad compatiblity on wowza 2?

this would be helpful as upgrading to wowza3 on live systems can be a longer/riskier task than adding a new module on existing wowza2.

thanks

I meant programmatically check(on wowza 2, from within a module) if the stream that is being published is IOS compatible.