Results 1 to 5 of 5

Thread: Media Cache forcing /Media/

  1. #1
    Join Date
    Oct 2014
    Posts
    3

    Question Media Cache forcing /Media/

    I'm hoping someone has experienced this and my apologies if this is simple, I'm very new to Wowza still. I didn't find anything in the forums though. When I create a new Media Cache Source I am specifying the following:

    Prefix: http/ <-- that's the default, I'm still not sure why this is relevant
    Base Path: http://<hash for my CDN>.rackcdn.com

    The Validate Configuration and sample URL shows the following:
    http/mycompany.com/media/sample.mp4 and http://<CDN HASH>.rackcdn.commycompany.com/media/sample.mp4

    I would like to take that /media out of there and have it stay out so that it just uses the CDN HASh/sample.mp4.

    I've tried just deleting it from the Validate configuration field but when I save the server just adds it back in and I find nothing in the system files that forces it as a default. Nothing I do seems to take it out, is there a way to remove the /media option that Wowza is injecting?

    Thank you for the help.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi,
    The Prefix tells Wowza which Base Path to use so it knows where to look for the content as you can have multiple stores available.

    With a Base Path of "http://<CDN HASH>.rackcdn.com/content/" assuming that you have sample.mp4 in this directory and you're allowing playback with Flash HDS, you should be able to play using the URL below.
    http://[wowza-ip-address]:1935/mediacache/_definst_/mp4:http/sample.mp4/manifest.f4m
    I've just configured MediaCache with the following information:
    Name Base: disk2
    Path: G:/
    Prefix: path1/

    I can play this stream with VLC player using:
    rtmp://192.168.0.8:1935/MediaCache/_definst_/mp4:path1/sample.mp4
    Under "Validate Configuration" I can see the following:

    Enter a sample content file path/name you want to stream:
    path1/data/media/sample.mp4
    Using the Prefix, Base Path, and sample content you entered, the full address to your content is:
    G:/data/media/sample.mp4

    I'm not sure why the Validate Configuration says I have G:/data/media/sample.mp4 when I don't have a directory called data or media in this location but it can be ignored.
    You will need to restart Wowza each time you edit the MediaCache configuration for the changes to take effect. This is not something which con be done using an application restart.

    Hope this helps.

    Regards,
    Jason

  3. #3
    Join Date
    Oct 2014
    Posts
    3

    Default

    Thank you Jason. I've restarted Wowza after every change and bounced the server a few times to be certain. You validated how I thought that I understood the Prefix. I'm still stuck. Here's how my setup works. I'm using Rackspace Cloud Files (competitor to AWS S3) which makes an HTTP: link available via Akamai CDN in this case I have a container called wowza and in that container I have all of my mp4 content. So the http://<CDN HASH>.rackcdn.com/ link points direct to the wowza container (bucket if you're used to S3 nomenclature). Based on this I should create a meda cache source as follows:

    Prefix: http://<CDN HASH>.rackcdn.com/ (I'm theorizing that this should now point wowza to my http enabled wowza container)
    Base Path: /

    when I do that, the output of my Validate Configuration is this: http/mycompany.com/media/sample.mp4

    If I reverse things and do this:

    Prefix: http/mycompany.com/media
    Base Path: http://<CDN HASH>.rackcdn.com/

    Then my outpout in the validate configuration is this: http://<CDN HASH>.rackcdn.com/sample.mp4

    Obviously that link works for me when I paste it into a browser but then when I go into the Cloudfiles (VOD Edge) application and try to run the test players, then I get nothing.

    Interestingly if I don't modify the prefix to have the http/myocompany.com/media and use just a prefix of http then my Validate Configuration URL comes out as this: http://<CDN HASH>.rackcdn.com/mycompany.com/media/sample.mp4

    There may be a reason as to why that gets injected by Wowza but it I don't know what it is.

  4. #4
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi,
    If you have a directory called "Wowza" which is not included in the Base Path you will need to add this after the Prefix.
    Base Path: http://<CDN HASH>.rackcdn.com/
    Content is: http://<CDN HASH>.rackcdn.com/Wowza/sample.mp4

    URL should be:
    rtmp://[Wowza-IP]:1935/[AppName]/_definst_/mp4:http/Wowza/sample.mp4
    If you're certain that the configuration is correct, I recommend creating a new source using a Source Type of "File" and playing sample.mp4 (from the new location) using this MediaCache configured application.
    This will allow you to make any adjustments if required to play the content using MediaCache.

    Jason

  5. #5
    Join Date
    Oct 2014
    Posts
    3

    Default

    Quote Originally Posted by JasonH View Post
    Hi,
    If you have a directory called "Wowza" which is not included in the Base Path you will need to add this after the Prefix.
    Base Path: http://<CDN HASH>.rackcdn.com/
    Content is: http://<CDN HASH>.rackcdn.com/Wowza/sample.mp4

    URL should be:
    rtmp://[Wowza-IP]:1935/[AppName]/_definst_/mp4:http/Wowza/sample.mp4
    If you're certain that the configuration is correct, I recommend creating a new source using a Source Type of "File" and playing sample.mp4 (from the new location) using this MediaCache configured application.
    This will allow you to make any adjustments if required to play the content using MediaCache.

    Jason
    Jason, you're very spot on and I was planning to post that URL later today as the solution. It turns out that the application player tester wasn't adding the _definst_ to the URL which is why it wasn't streaming when I would try to start the stream. Tim Doughtery one of your Senior SE's called me late yesterday to help poke around and that's what it was that got everything working. Thank you for the help. It's the most obscure thing and I never would have figured that out on my own so thank you both for the help.

Similar Threads

  1. media cache
    By akaplan in forum General Forum
    Replies: 3
    Last Post: 07-22-2014, 01:55 AM
  2. Media Cache
    By Assuzza in forum On-Demand Streaming
    Replies: 1
    Last Post: 06-09-2014, 05:04 AM
  3. Media cache
    By anhnh45 in forum Video On Demand Streaming Discussion
    Replies: 15
    Last Post: 03-18-2014, 07:22 AM
  4. Ndvr with media cache
    By asaf32 in forum AddOn: Wowza nDVR
    Replies: 2
    Last Post: 03-05-2013, 01:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •