Results 1 to 7 of 7

Thread: MediaCache AddOn: two vod applications with different media source path

  1. #1

    Default MediaCache AddOn: two vod applications with different media source path

    On my main server, I have two vod services defined:
    1. vod1
    2. vod2

    Each sourcing media from a different storage. I would like to have another server (server2) with MediaCache. My question is:

    Is it possible to source media from two different filesystem path' at server2 using MediaCache? According to MediaCache docs I can define a MediaCacheSource entry, but I cannot associate it with each application. So I cannot have something like:
    1. vod1: source media from /path1/
    2. vod2: source media from /path2/

    Am I getting something wrong?

    (I use mounted NAS at server2, so all media comes from local filesystem).

    Thanks.

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Yes, you can do that. You can have many MediaCacheSources defined in the /conf/MediaCache.xml file. Each application that is configured to use MediaCache can use any of them.

    Richard

  3. #3

    Default

    Thanks. Well, it is still not clear. How can I say to vod1 to use path1? I do not want vod1 to use or try with path2, as media files overlap. I do not want vod1 to accidentally provision files from vod2.

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    What you can do is enable StreamNameAlias in each application and limit what each can do in the aliasMapFilePlay file. You will configure each application to point to a different aliasMapFilePlay (see readme.html in package).

    You will see a a "default rule": in the example aliasMapFilePlay:

    *=${Stream.Name}

    for your purpose it is important to remove that, so you have control of what plays. Then you might have just one line in each of the file, something like this:

    http1*=:${Stream.Name}

    Where "http1" is a MediaCachePrefix allocated to the application. All streams that start with "http1" will play. In the aliasMapFilePlay for the 2nd application you might have

    http2*=:${Stream.Name}

    Richard

  5. #5

    Default

    It seems like hacking. I do not use any prefix with MediaCache. Since I am a bit confused, I give you more details.

    1. As mentioned I want to build a cache server with the same application name and file path as on main server. Only server domain names will differ like server1.example.com and server2.example.com, app path would remain the same. It would look like this on both servers: vod1/mp4:recID/recID.mp4 or vod2/mp4:recID/recID.mp4.

    2. I have vod1 and vod2 services. One of them is a developer site, so file structure is the very same, but media is different.

    3. On my cache server, I use SSHFS to mount main server's storage. I have two paths, one for each application:
    - /srv/mainsite/recordings/ - vod1
    - /srv/devsite/recordings/ - vod2

    4. With MediaCache I use "/srv/mainsite/recordings/" as BasePath and I left Prefix empty as it would modify file path for Flash Player.

    Thanks.

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You can use StreamNameAlias to preserve the application and file path. For example, make "recID/recID.mp4" an alias that resolves to a MediaCache source. But I don't know another way beside the security aspect of StreamNameAlias to meet the basic requirement to segregate MediaCache resources per application. The example I gave was simple, in your case you will need more detailed mapping. There is a StreamNameAlias api that might be useful to you:

    http://www.wowza.com/forums/content....der2-interface

    Richard

  7. #7

    Default

    I have hundreds of recordings. The media file path is originated from recording ID, so recID/recID.mp4 changes per recording. I cannot make so many rules for prefix translation... this is my problem.

Similar Threads

  1. Replies: 3
    Last Post: 03-02-2014, 03:56 AM
  2. Mediacache addon via rtmp
    By arpan_synapse in forum AddOn: Other AddOns
    Replies: 2
    Last Post: 03-05-2013, 09:59 AM
  3. Problem with the path to vod file
    By domarack in forum Video On Demand Streaming Discussion
    Replies: 2
    Last Post: 01-18-2012, 08:02 AM
  4. Replies: 1
    Last Post: 11-24-2011, 06:32 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
  •