Results 1 to 7 of 7

Thread: Should i create smil file for each 200 video?

  1. #1
    Join Date
    Jul 2013
    Posts
    15

    Question How can i create smil file for each video?

    Hi everyone.
    i set up wowza media server two days ago, i think stream 200 video file on this server with different resolution(filename1280x720, filename640x360,...) on same jwplayer. i know i should create smil file for each video but i can't create smil file for 200 video. How can i solve this problem?

    This's my smil code
    <smil>
    <head>
    <meta base="rtmp://Wowza Adress/vod/" />
    </head>
    <body>
    <switch>
    <video src="Filename1280x720" height="720" system-bitrate="2000000" width="1280" />
    <video src="Filename640x360" height="360" system-bitrate="800000" width="640" />
    </switch>
    </body>
    </smil>

    This's my html code
    <html>
    <head>

    <script type="text/javascript" src="jwplayer/jwplayer.js"></script>
    <script type="text/javascript">// <![CDATA[
    jwplayer.key="Key";
    // ]]></script>

    <div id="player_362"></div>
    <script type="text/javascript">// <![CDATA[
    jwplayer('player_362').setup({
    width: "800",
    height: "450",
    image: "jwplayer/preview.png",
    file:"http://Wowza Adress/vod/smil:manifest.smil/jwplayer.smil",
    primary: "flash",

    });
    // ]]></script>

    </body>
    </html>



    i can stream my videos this code but i have to create smil file each of 200 video. it's to hard, is there another way to solve this?
    Last edited by kayasey; 07-24-2013 at 02:31 AM. Reason: How can i create smil file for each video?

  2. #2
    Join Date
    Mar 2011
    Posts
    12

    Default

    you server is linux you can create one script via bash for read the videos and create the files smil.

  3. #3
    Join Date
    Jul 2013
    Posts
    15

    Default

    yes my server os is linux.i read all of wowza forum but i cant found anything. please give that script link.

  4. #4
    Join Date
    May 2013
    Posts
    680

    Default

    One solution may be to create a module (if you are programmatically inclined). Take a look at the following:

    How to use Java API Calls to Resolve SMIL File Requests

  5. #5
    Join Date
    Jul 2013
    Posts
    15

    Default

    how can i use this code?

    package com.wowza.wms.plugin.test.module;

    import com.wowza.wms.medialist.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.stream.*;
    import com.wowza.wms.application.*;

    public class ModuleAMLSTTestLive extends ModuleBase
    {
    class MyMediaListProvider implements IMediaListProvider
    {
    public MediaList resolveMediaList(IMediaListReader mediaListReader, IMediaStream stream, String streamName)
    {
    MediaList mediaList = new MediaList();

    MediaListSegment segment = new MediaListSegment();
    mediaList.addSegment(segment);

    MediaListRendition rendition1 = new MediaListRendition();
    segment.addRendition(rendition1);

    rendition1.setName(streamName+"_400");
    rendition1.setBitrateAudio(128000);
    rendition1.setBitrateVideo(400000);
    rendition1.setWidth(320);
    rendition1.setHeight(240);
    rendition1.setAudioCodecId("mp4a.40.2");
    rendition1.setVideoCodecId("avc1.66.12");

    MediaListRendition rendition2 = new MediaListRendition();
    segment.addRendition(rendition2);

    rendition2.setName(streamName+"_800");
    rendition2.setBitrateAudio(128000);
    rendition2.setBitrateVideo(800000);
    rendition2.setWidth(640);
    rendition2.setHeight(480);
    rendition2.setAudioCodecId("mp4a.40.2");
    rendition2.setVideoCodecId("avc1.77.31");

    return mediaList;
    }
    }

    public void onAppStart(IApplicationInstance appInstance)
    {
    appInstance.setMediaListProvider(new MyMediaListProvider());
    }

    }

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

    Default

    This creates a MediaList (which is generic term for this and smil files) on the fly and only in memory. In won't help write smil files because this only runs when amlst: prefix is used in playback client... I suppose you could find a way to trigger this programatically and iterate through your asset data if in a database or structured file, then write out smil files. It would take some work. If you need help, you can post your requirements in the Find a Consultant forum, or write to support@wowza.com and ask for the list of independent consultants..

    Richard

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

    Default

    Also, the way to trigger this is with playlist.m3u8 (or other http stream types) url.

    http://[wowza-address]:1935/vod/amlst:sample/playlist.m3u8

    You could write a simple php or asp script to load urls like this and that would trigger your "ModuleAMLSTTestLive" if it is in place, then you can connect to db, get info, then write a file instead of emitting a MediaList.

    Richard

Similar Threads

  1. 200 responses for missing SMIL files
    By Snapster in forum General Forum
    Replies: 1
    Last Post: 02-07-2014, 06:53 AM
  2. One VOD application with 200 user subfolders, or 200 applications?
    By pburke in forum Performance Tuning Discussion
    Replies: 16
    Last Post: 05-13-2013, 10:55 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
  •