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

Thread: JWPlayer tutorial does not show how to publish stream ?

  1. #1

    Default JWPlayer tutorial does not show how to publish stream ?

    This tutorial
    http://www.wowza.com/forums/content....reaming-Engine
    does not show the following, help please. Thank you.

    1) How to publish stream from webcam + mic
    2) How to do Apple HLS streaming for LIVE stream


    The following code in the tutorial shows how to play a live stream
    <script type="text/javascript">
    jwplayer("player").setup({
    sources: [{
    file: "rtmp://[wowza-ip-address]:1935/live/myStream"
    },]
    });

    jwplayer("player").onError ( function(event) {
    setTimeout(function()
    {
    jwplayer("player").play(true);
    },2000);
    }
    );

    </script>

  2. #2

    Default

    Hello there.

    You will need an encoder to send the live stream to Wowza. If you are using an Flash Media Live Encoder, or some other RTMP encoder you can follow this guide:
    How to set up live streaming using an RTMP-based encoder

    Regards,

    Salvadore

  3. #3

    Default

    That is not the questions I am asking. I dont have any problems with set up live streaming using an RTMP-based encoder. What I am asking is how to use JW Player in code to publish the stream, the tutorial Wowza provided ( http://www.wowza.com/forums/content....reaming-Engine ) does not show JW Player code for these two questions:

    1) How to publish stream from webcam + mic
    2) How to do Apple HLS streaming for LIVE stream

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

    Default

    Hi,
    The JW player is not a publishing client it's a playback client. To play a live stream from Wowza first you must publish the stream to Wowza which can be done using an encoder.
    To play the stream via Apple HLS once it's been successfully published, please follow the Simple RTMP and Apple HLS streaming section of the JW player article.

    You'll need to replace the application name and stream name as required.
    Current example (for video on demand):
    http://[wowza-ip-address]:1935/vod/sample.mp4/playlist.m3u8
    Live example:
    http://[wowza-ip-address]:1935/live/myStream/playlist.m3u8
    This example assumes you're using the application called "live" and that you're publishing a stream called "myStream".

    Regards,
    Jason

  5. #5

    Default

    Thank you for telling me that The JW player is not a publishing client it's a playback client. Yesterday, before your answer, I have guessed and put playlist.m3u8 at the end of the string for HLS live. A problem occured. It is the delay of the HLS stream. Then, I have changed the configuration according to this article http://www.wowza.com/forums/content....ameters-%28iOS I have set cupertinoChunkDurationTarget to 2000, cupertinoMaxChunkCount to 10,
    cupertinoPlaylistChunkCount to 1 , cupertinoRepeaterChunkCount to 1. And in my Flash publish encoder, I use cam.setKeyFrameInterval (2);

    Then, The delay is about 6,7 seconds. I tried to put cupertinoChunkDurationTarget lower, 1000, but the test shows that the video looks not responding in this case. So, I put it back to 2000.

    Can you tell me how to make the delay <=3 seconds ? Thank you very much.

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

    Default

    Hi,
    The cupertinoPlaylistChunkCount needs to be a minimum of 3, this is due to the clients (Apple HLS compatible) require a minimum of 3 chunks to begin playing the stream. When setting this Property lower than 3 this defaults back to 3 so the stream is playable on your devices/players. I'm glad you found the correct article on how to reduce the delay, the chunks (set by cupertinoChunkDurationTarget) can only be created on keyframes so with a keyframe interval of 2 seconds the chunks can only be 2 seconds or greater and should be an interval of 2 (2, 4, 6, 8 or 10).

    The chunks are currently 2 seconds each and 3 chunks are required making your total of 6+ seconds delay. A keyframe interval of 2 seconds is the ideal settings on the encoder but you could make a keyframe every second if you choose. If you adjust the encoder so that you're creating a keyframe every second you should be able to set cupertinoChunkDurationTarget: 1000.

    After editing, a restart of the application is required for the changes to take effect.

    Regards,
    Jason

  7. #7

    Default

    Thank you for your answer. I set cupertinoChunkDurationTarget: 1000 and in the encoder : cam.setKeyFrameInterval (15) (means the 15th frame is the keyframe means 1 keyframe in 1 sec because I set 15fps with cam.setMode (w,h,15,true) ) Earlier the number 2 I used in cam.setKeyFrameInterval (2) maybe too small key frame interval.

    I use HLS for mobile streaming. After that, the delay is about 3, 4 seconds. In many loads, the video works okay with delay of 3, 4 sec. However, in some load, the video stops responding after 10 sec (but it is probably okay, only few times - However after some hours, I checked again and the number of stop responding times increased --> I have the feeling that 1 sec is not as reliable as 2 secs. The bad thing is that JW Player does not play again when it stops, it just stops forever and need a reload ).

    This is not as good as RTMP streaming. RTMP streaming the delay is only around 1 sec.

    Another problem related to the SOUND occurred so please help me to resolve this. I would appreciate.

    - There is no sound in the HLS streaming but the RTMP player (JW Player) on desktop browser can hear the sound of the video. Do I have to make any configuration for the sound to appear for HLS?

    After a while, I found out the solution is to use Wowza Transcoder. I enable Wowza Transcoder but that is not enough for the audio to work and I can not find out a document to make the translation from Speex to AAC ON THE WOWZA STREAMING MANAGER . I would like to use the Wowza Streaming Manager. Not the create files in folder way.

    - So is there any way to make delay 1 sec with HLS? With 1 sec, it already looks not very reliable.
    - The code in the tutorial
    jwplayer("player").onError ( function(event) {
    setTimeout(function()
    {
    jwplayer("player").play(true);
    },2000);
    does not work when I disconnect from the Internet and reconnect again to the Internet. The JW player does not keep playing as expected. (this test was made in an easy environment- a desktop browser).

    Thank you.
    Last edited by todafuture; 05-28-2015 at 04:21 AM.

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

    Default

    Hi,
    A delay is something that can't be avoided using HTTP based players due to how HTTP streaming works. The device/player needs 3 chunks meaning you're always behind real time by 3 chunks at a minimum. As for the audio behaviour you're reporting, Speex is not supported for Apple HLS so transcoding the audio from Speex to AAC is required if you wish to hear the audio using an Apple HLS playback client.

    You can use the Wowza Streaming Engine Manager to configure the transcoder and create/edit the transcoding templates.
    Please see the Wowza transcoding article for more information and configuration details.

    I think you're confused with what you're expecting the JW player to do when you disconnect and reconnect to the internet. If you're referring to an auto-play function I believe this happens when the player is loaded which requires you to refresh the page which the player is on as if you where opening it for the first time to play the stream. The stream should then play without the need to hit the play button.

    Please confirm if this is what you're referring to.

    Regards,
    Jason

  9. #9

    Default

    - Thank for your article about Wowza transcoder. I choose video codec passthrough (because I already got H.264 in the source stream) anđ AAC in the audio settings. What is the correct Audio Bitrate I should use ? Valid values range from 3000 to 1000000 bps. But what are the correct and suitable ones ?

    - About JW Player article, I am not referring to autostart. I am talking about the Internet disconnect case as I describe. The video is playing then I disconnect my Internet connection --> video stops playing . Then I connect to the Internet again --> the video does not keep playing (it should keep playing). The code
    jwplayer("player").onError ( function(event) {
    setTimeout(function()
    {
    jwplayer("player").play(true);
    },2000);
    does not work

    The video should play again and this code does not do that.
    Last edited by todafuture; 06-01-2015 at 12:33 AM.

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

    Default

    Hi,
    I would not expect a player to behave as you have described. If you're having issues with the configuration of the JW player and it's functionality then please see the JW player support team.

    Regards,
    Jason

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 09-02-2016, 02:25 AM
  2. Replies: 4
    Last Post: 05-22-2015, 05:39 PM
  3. is there a (video) tutorial available to show setting up EC2 wowza for large audience
    By yarekc in forum Wowza Streaming Engine in the Cloud
    Replies: 1
    Last Post: 09-26-2014, 02:01 AM
  4. MediaCache does not work http URL ( Item does not exist )
    By huge123 in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 12-19-2011, 05:43 PM

Posting Permissions

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