• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster Pro
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • General Forum /
avatar image
Question by Graeme Bull · Apr 07, 2016 at 08:44 PM ·

Detect failure of mediacaster stream?

I'm wondering how to detect the failure of a mediacaster stream while it's being played, or even just the failure to connect up initially. I've tried the "addMediaCasterListener" method on the application object, but nothing catches it. I can see in the logs this:

Successful connection for mediacaster: 2 - - -

ShoutCastDecoder.checkHeader[mystream.stream]: HTTP response: 404

The first line is from the class I'm using to detect connections etc for the listener, the second is from some internal class I guess. As you can see, the connection success is firing but the HTTP response is 404.. How do I grab that?

More importantly though, I need to know when a mediacaster stream fails part way through. Any ideas?
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by Matt Young · Apr 27, 2016 at 07:36 AM

Hello

One option would be to check the streams last packet to see if there is an associated timecode. You could do this twice (~200ms apart) and compare the timecodes. You can check the timecode similar to the following:

// Example only 
IApplication app = vhost.getApplication("live"); 
IApplicationInstance instance = app.getAppInstance("_definst_"); 
IMediaStream stream = instance.getStreams().getStream("myStream");
if (stream != null && stream.getLastPacket() != null)
{
    if (stream.getLastPacket().getAbsTimecode() > 0)
   {
      // looks like stream is valid
   }
} 


Thanks,

Matt
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Graeme Bull · Apr 27, 2016 at 07:55 AM 0
Share
Thanks Matt. I was really hoping for the event like the internal Wowza runtime gets (as log entries go by like crazy for the "switch") and not have to brute force check it and run my own event. I'll see what I can do with this then.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Transcode's options and actual resoltions 1 Answer

Wowza Media server Sizing for 3000 attendees 1 Answer

Capture parameters from RTMP URL 1 Answer

HLS Security For 1 Domain Can Only Embed My Link to Player 1 Answer

How to running wowza license checking in intranet? 1 Answer

Hot Topics
  • Streaming Protocols
  • Wowza SDKs
  • AWS Hosting
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Partners
  • Partners Overview
  • Find a Reseller
  • Channel Partner Program
  • OEM Program
  • Wowza Reseller Portal
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Contact Us
Stay Connected
Sign Up for Our Blog
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster Pro
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges