Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Media cache

  1. #1
    Join Date
    Sep 2013
    Posts
    8

    Default Media cache

    Hi Guys
    I'm using Media Cache to stream video, but link with token&key not working, log
    WARN server comment - MediaCacheItemBase.init: Item does not exist: http/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4
    link which i'm using is:
    http://123.29.73.83/video/201309/332...decff8bbb74caf
    thanks for support

  2. #2

    Default

    Can you explain your set up?
    Where are the files located?
    Also, what does your MediaCache configuration look like?

    Salvadore

  3. #3
    Join Date
    Sep 2013
    Posts
    8

    Default

    Hi
    my wowza server (with mediacache add on) is used to cache video on server 123.29.73.83 and re stream this video, but the server required authentication, so you can see link with token & key. When i playback using link http://[my-wowza-ip]:1935/mediacache...own2011vcd.mp4, i received the warning and i could not playback. My Mediacache.xml is default
    also, help me re stream this video
    thanks

  4. #4

    Default

    What client are you testing playback in?
    Depending on the playback client the URL should look something like this:
    Flash rtmp;
    Server: rtmp://[wowza-address]/mediacache
    Stream: mp4:http/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4
    
    Flash HTTP;
    http://[wowza-ip-address]:1935/mediacache/_definst_/mp4:http/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4/manifest.f4m
    
    IOS;
    http://[wowza-ip-address]:1935/mediacache/_definst_/mp4:http/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4/playlist.m3u8
    Salvadore

  5. #5
    Join Date
    Sep 2013
    Posts
    8

    Default

    Hi Slvadore
    I'm confusion, client testing with flash rtmp (user example in C:\Program Files\Wowza Media Systems\Wowza Media Server 2.2.4\examples\SimpleVideoStreaming\client)
    Flash rtmp;
    Server: rtmp://[wowza-address]/mediacache
    Stream: mp4:http/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4
    so, what can i do to solve this issue
    thanks

  6. #6
    Join Date
    May 2013
    Posts
    680

    Default

    You'll need to first url encode the stream name and then use the urlDecodeStreamName property such that your token/key are passed with each request from MediaCache.

    Please use the following configuration in MediaCache.xml:

                  <MediaCacheSource>
    			<Name>http1</Name>
    			<BasePath>http://xxx.xxx.xxx.xxx/</BasePath>
    			<Prefix>http1/</Prefix>
    			<BaseClass>com.wowza.wms.plugin.mediacache.impl.MediaCacheItemHTTPImpl</BaseClass>
    			<ReaderClass></ReaderClass>
    			<DefaultBlockSize>256K</DefaultBlockSize>
    			<MaxTimeToLive>1200000</MaxTimeToLive>
    			<MinTimeToLive>600000</MinTimeToLive>
    			<ReadAhead>true</ReadAhead>
    			<ReadAheadThreshold>50</ReadAheadThreshold>
    			<IsPassThru>false</IsPassThru>
    			<Properties>
                              <Property> 
                                <Name>urlDecodeStreamName</Name> 
                                <Value>true</Value> 
                                <Type>Boolean</Type> 
                              </Property>
    			</Properties>
    		</MediaCacheSource>
    Then format your playback as follows:

    Server: rtmp://[wowza-address]/[application]
    Stream: mp4:http1/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4%3Ftoken%3DoH4r2bDcHBqlGr_STNPupA%26time%3D1379067874%26ke y%3Db1d46f5b21347f74f7decff8bbb74caf

    I've tested this and it works on my end.
    Last edited by roger_l; 09-13-2013 at 05:23 AM.

  7. #7
    Join Date
    Sep 2013
    Posts
    8

    Default

    Hi
    it worked!, thanks for support.

  8. #8

    Default

    Dear Wowza support

    We have do the same setting for mediacahce evaluation (port 80 is used instead of 1935), and rtmp work properly as above. Would I know the setting of iphone, hds, or rtsp. Below 2 did not work

    rtmp is ok

    mp4:http1/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4%3Ftoken%3DoH4r2bDcHBqlGr_STNPupA%26time%3D1379067874%26ke y%3Db1d46f5b21347f74f7decff8bbb74caf

    while below all not ok, and show not found in log
    e.g.

    iphone
    http://192.168.65.59:80/mediacache/_...379067874%26ke y%3Db1d46f5b21347f74f7decff8bbb74caf/playlist.m3u8

    hds
    http://192.168.65.59:80/mediacache/m...379067874%26ke y%3Db1d46f5b21347f74f7decff8bbb74caf/manifest.f4m

    rtsp
    rtsp://192.168.65.59:80/mediacache/mp4:http1/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4%3Ftoken%3DoH4r2bDcHBqlGr_STNPupA%26time%3D1379067874%26ke y%3Db1d46f5b21347f74f7decff8bbb74caf

    Kindly help a look

    Bst/Rgds

  9. #9

    Default

    Hi,

    A better way will be to base64 encode the stream name and use that in the player. In the Media Cache configuration, you set the following property fro your MediaCacheSource

    <Property>
        <Name>base64DecodeStreamName</Name> 
        <Value>true</Value> 
        <Type>Boolean</Type> 
    </Property>
    You must remove the urlDecodeStreamName property as it will conflict with this one.

    When you encode the stream name in the player, you must not encode the stream type prefix or the media cache prefix. These must be in plain text. You must have a stream type prefix as Wowza will not be able to detect it automatically from the encoded stream name.

    mp4:http1/MTIzLjI5LjczLjgzL3ZpZGVvLzIwMTMwOS8zMzI5N19uZXZlcmJhY2tkb3duMnRoZWJlYXRkb3duMjAxMXZjZC5tcDQ/dG9rZW49b0g0cjJiRGNIQnFsR3JfU1ROUHVwQSZ0aW1lPTEzNzkwNjc4NzQma2V5PWIxZDQ2ZjViMjEzNDdmNzRmN2RlY2ZmOGJiYjc0Y2Fm
    will decode to
    mp4:http1/123.29.73.83/video/201309/33297_neverbackdown2thebeatdown2011vcd.mp4?token=oH4r2bDcHBqlGr_STNPupA&time=1379067874&key=b1d46f5b21347f74f7decff8bbb74caf
    To make the base64 strings shorter, you should use a more specific BasePath for your MediaCacheSource. Setting the BasePath to http://123.29.73.83/video/ will mean that the base64 string would be
    mp4:http1/MjAxMzA5LzMzMjk3X25ldmVyYmFja2Rvd24ydGhlYmVhdGRvd24yMDExdmNkLm1wND90b2tlbj1vSDRyMmJEY0hCcWxHcl9TVE5QdXBBJnRpbWU9MTM3OTA2Nzg3NCZrZXk9YjFkNDZmNWIyMTM0N2Y3NGY3ZGVjZmY4YmJiNzRjYWY=
    Roger
    Last edited by roger_l; 03-13-2014 at 02:45 AM.

  10. #10

    Default

    Dear Wowza support

    I have tried the said approach, when I enter the link in the test player using rtmp

    mp4:http2/MTIzLjI5LjczLjgzL3ZpZGVvLzIwMTMwOS8zMzI5N19uZXZlcmJhY2tkb3duMnRoZWJlYXRkb3duMjAxMXZjZC5tcDQ/dG9rZW49b0g0cjJiRGNIQnFsR3JfU1ROUHVwQSZ0aW1lPTEzNzkwNjc4NzQma2V5PWIxZDQ2ZjViMjEzNDdmNzRmN2RlY2ZmOGJi Yjc0Y2Fm

    but below error is found in access log

    Bad Base64 input character at 200: 46(decimal)
    WARN server comment - MediaCacheItemBase.init: Error: Length is zero[-1]: http2/MTIzLjI5LjczLjgzL3ZpZGVvLzIwMTMwOS8zMzI5N19uZXZlcmJhY2tkb3duMnRoZWJlYXRkb3duMjAxMXZjZC5tcDQ/dG9rZW49b0g0cjJiRGNIQnFsR3JfU1ROUHVwQSZ0aW1lPTEzNzkwNjc4NzQma2V5PWIxZDQ2ZjViMjEzNDdmNzRmN2RlY2ZmOGJi Yjc0Y2Fm.mp4


    Any idea?

Page 1 of 2 12 LastLast

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. Ndvr with media cache
    By asaf32 in forum AddOn: Wowza nDVR
    Replies: 2
    Last Post: 03-05-2013, 01:59 AM
  4. FileRandomAccessReader & Media cache
    By octchristmas in forum Server-side Modules and Code Samples Discussion
    Replies: 5
    Last Post: 11-08-2012, 07:10 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
  •