Skip to main content
Known Participant
August 6, 2010
Question

Streaming 2 x H264 live videos using smil file?

  • August 6, 2010
  • 1 reply
  • 1405 views

Hi,

I want to be able to stream a live video using Flash Media Live Encoder 3 using two options of 300 kbps and 150 kbps.

I want to give users a choice of stream quality depending on their available bandwidth to maintain the live feed.

I have set it up so that the Bit Rates are 300 and 150 and tick marks on: 1 and 2

my FMS URL is correct

The stream names are test1 and test2

in the Stream: box I have written: test1;test2

Yet I have also tried : mp4:test1.f4v;mp4:test2.f4v and other combinations.....

The SMIL file has the following:

<smil>
    <head>
        <meta base="rtmp://live" />
    </head>
    <body>
    <switch>

          <video src="mp4:test1.f4v" system-bitrate="150000"/>
          <video src="mp4:test2.f4v" system-bitrate="300000"/>
    </switch>
    </body>
</smil>

The SMIL file is in the same root level as the web page.

It does not work, I have tested this with prerecorded videos and it works fine, so I thought it should work with 2 live streams also.

I believe one of the issues might be the Stream: test1;test2

in Flash Media Live Encoder 3?

Second related questions:

Also using Dreamweaver CS5 what is the correct setting to stream an FLV with h264?

I also tried mp4:test1.f4v in the stream name but it comes back with anerror that the name is wrong.

any solutions to what I am doing wrong would be appreciated

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    August 7, 2010

    Answer to your first question is that you are not putting stream names correctly, you just need to put test%i as stream name if you want to publish test1 and test2 as streams.

    Your URL in FMLE should be : rtmp://<serverip>/live

    Stream name : test%i

    In order to stream H264 content you need to choose codec as H264 (Video -> Format - H264)

    For live streams you need not prefix mp4 and suffix extension.

    So in your smil file can look like below

    <smil>
        <head>
            <meta base="rtmp://<servername>/live" />
        </head>
        <body>
        <switch>

              <video src="test1" system-bitrate="150000"/>
              <video src="test2" system-bitrate="300000"/>
        </switch>
        </body>
    </smil>

    Now coming to your second question, to be frank i did not get it correctly. I would like to let you know that FLV file format does not support H264 content - so there is no way you can have H264 data in FLV file - it needs to be .mp4 or .f4v file.

    Known Participant
    August 9, 2010

    Thanks for the response.

    With respect to the second query I had, I do understand that FLV does not support H264, I just used the term FLV to mention it was a flash video I was refering to rather tahn the codec used.

    The first part, I did actually try that option previously, but it still returned an error of "Cannot Connect".

    I used the code generated by the FMS dynamic video page to create the video object.

    I simply changed it in Dreamweaver to: ( Bold text are my edits to the original. ) The original generated vod instead of live.

    <object width='640' height='377' id='videoPlayer' name='videoPlayer' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ><param name='movie' value='swfs/videoPlayer.swf' /> <param name='quality' value='high' /> <param name='bgcolor' value='#000000' /> <param name='allowfullscreen' value='true' /> <param name='flashvars' value= '&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=dynamicStream.smil&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&rtmp://servername/live/test1.f4v&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=dynamicStream.smil&DS_Status=true&streamType=live&autoStart=true'/><embed src='swfs/videoPlayer.swf' width='640' height='377' id='videoPlayer' quality='high' bgcolor='#000000' name='videoPlayer' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer'   flashvars='&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=dynamicStream.smil&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=rtmp://servername/live/test1.f4v&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=dynamicStream.smil&DS_Status=true&streamType=live&autoStart=true' type='application/x-shockwave-flash'> </embed></object>

    I think something in this code is causing the connection error.

    Regards

    Adobe Employee
    August 9, 2010

    Hi,

    I think there is something wrong in your autoStart url, just see "rtmp://servername/live/test1.f4v" below here you need to have "rtmp://servername/live/mp4:test1.f4v".

    <param name='flashvars' value= '&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serve rURL=dynamicStream.smil&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitiv ity=100&rtmp://servername/live/test1.f4v&DS_Status=true&streamType=live&autoStart=true&videoWidth=0&videoHeigh t=0&dsControl=manual&dsSensitivity=100&serverURL=dynamicStream.smil&DS _Status=true&streamType=live&autoStart=true'/>

    Regards,

    Amit