Skip navigation
john_vh
Currently Being Moderated

Non standard stream urls... am I missing something?

Jul 27, 2010 2:00 PM

Given stream url:

 

rtmp://some.server.in.my.cdn.com/a/b/c/video

 

The "standard"/default way says:

fmsHost: rtmp://some.server.in.my.cdn.com/a

vidPath: b/c/video

 

OSMF handles that case, as well as including instance name in host.

 

What if my cdn is not in any way standard, and I need:

fmsHost: rtmp://some.server.in.my.cdn.com

vidPath: a/b/c/video

 

Is there an easy way to handle this in OSMF? What am I missing?

 

Seems like everything in OSMF assumes the "standard" case. I don't see an easy way to handle this without extending 1. NetConnectionFactory (everything is a private field in there, is that even worth it?) and 2. NetStreamPlayTrait (where everything is private as well, and this class is excluded from lib/swc).

 
Replies
  • Currently Being Moderated
    Jul 27, 2010 3:01 PM   in reply to john_vh

    Most of url path in OSMF assumes the standard as it covers most of cases.   As you said you can take the approach to extend the NetConnectionFactory (also look at FMSUrl class) or you might write your own plugin to interpret your own server/video path.

     

    curious, Is any reason behind you wanted to do non standard way?

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2010 10:49 AM   in reply to john_vh

    John,

     

    Thanks for your input.  Your feedback would a great help in evaludating our OSMF netStream work flow.

    Can you file this as request enhancement with your details (why you would need the net stream trait to be flexibla and how make it easier for you) ?

     

    https://bugs.adobe.com/jira/browse/FM

     

    Have you considered to make it into a plugin? It might be helpful to look at AkamaiStreamingPlugin from perspective of yours.

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 29, 2010 1:37 PM   in reply to john_vh

    Thanks John for taking time to detail this out.

    I'll have the team look at your concern to see what we can improve in custom stream urls.

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 29, 2010 9:38 PM   in reply to rshin

    I would add that it's just as "painful" (or even impossible) to (nicely) extend the behavior for regular urls (like http).

    My use case is like a custom "protocol" that get resolved into an http url (think YouTube with a preliminary phase of loading more params for the final url to be constructed and loaded).

     

    I ended up extending NetLoader, putting most of the logic in executeLoad(). The rest (of NetLoader) is then useless to me. It seems like extending LoaderBase would seem more appropriate (but can't because of the constructor signature for VideoElement)

     

    I like the architecture a lot (with traits, clear separation of concerns, event based, etc.) but it seems the implementation is a little "off".

    1. VideoElement taking a NetLoader? Why not a LoaderBase?
    2. NetLoader assuming LoadTrait are of type NetStreamLoadTrait (created by LightweightVideoElement)
    3. Can't extend NetLoader.processFinishLoading() because NetStreamLoadTrait (the param) is "invisible" (excluded)
    4. NetStreamPlayTrait is also invisible
    5. NetLoader.executeLoad() could call a function to deal with the "default" in the switch. This way, custom behavior could be easily implemented while keeping the standard (rtmp, http, etc.) logic in place.

     

     

    What took me 10 minutes to code similar logic in other players (Flowplayer, JWPlayer) took me hours in OSMF...but I'm not giving up yet

     

    Luc.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2010 11:33 AM   in reply to lpezet

    Luc,

     

    Thanks for the constructive feedback.  I think we put thoughts / discussion around those areas (you've pointed when the framework was being built.

    That's why now it is important to hear what your experience is.   I added your comment to FM-996 however, if you'd like, please log your enhancement request as a new bug so that we can give more details to your point for consideration.

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2010 4:12 PM   in reply to rshin

    Logged separately but linked to FM-996 here: https://bugs.adobe.com/jira/browse/FM-1000

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2010 4:49 PM   in reply to rshin

    Thank you Ryan.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2010 7:54 AM   in reply to rshin

    Is it going to be OSMF Project standard to adjust code for any CDN?

    Even Internal independent corporate CDNs?

     

    When I posed the same question about a different international CDN I was told that non-standard URI/Stream combinations should be adjusted at the CDN level and not at the OSMF Project Code level - and that I should report the problem to my CDN.

     

    http://forums.adobe.com/thread/670942

     

    Should I post a bug report as well?

    Thanks.


    -Will

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 27, 2010 11:18 AM   in reply to lpezet

    Luc,

     

    If the use case is to convert one URL (with custom protocol) into another URL, then I wouldn't solve it at the NetLoader level.  Instead, I would use a proxy that can convert the original URL to the desired URL as a preflight operation.  We have exactly such an example in the ExamplePlayer sample app, see VideoProxyElement, VideoProxyLoader, and VideoProxyLoadTrait here:

     

    http://opensource.adobe.com/svn/opensource/osmf/trunk/apps/samples/fra mework/ExamplePlayer/org/osmf/examples/loaderproxy/

     

    Since I don't have the exact details of your use case, I'm not sure if this is exactly what you're looking for.  So let me know how it works out (or if it doesn't, why not).

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 27, 2010 5:39 PM   in reply to Brian Riggs

    Ipzet,

     

    closing FM-1000 as Brian suggestion seems to address it.  If your findings differ from what Brian's comment (using ProxyElement), please re-open the bug and add the comment there, please.

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 27, 2010 11:02 PM   in reply to Brian Riggs

    Looks like the perfect solution Brian.

     

    Thanks,

    Luc.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 9, 2012 4:01 PM   in reply to john_vh

    John_vh, sir, you saved my weekend. (I know this thread is OLD, but I really wanted to thank you)

     

    I overrided the NetConnectionFactory and was struggling with the PlayTrait.

    But then I read your post about the processReadyState() method, and everything became clear =)

     

     

    Just to add another annoyance about overriding the NetConnectionFactory:

    - I needed to put the file inside the package org.osmf.net, because I'm using the NetNegotiator class (which is INTERNAL and cannot be used from other packages).

     

    It really bugs me how many things are private and "hidden" from the user.

    As of today, I did'nt even realize how on earth I can get the number of dropped frames (or dropped frames per second).

     

    Anyway, thank you.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points