Red5 / red5-server

Red5 Server core
Apache License 2.0
3.33k stars 982 forks source link

Server side playlist using IServerStream does not work #231

Open rajdeeprath opened 7 years ago

rajdeeprath commented 7 years ago

Issue

Short Description

Creation of server side stream via IServerStream using playlist api doe snot work. When I run the code, i see red5 reading the file and generating meta file properly but then there is nothing more. If i try to subscribe i get nothing. I have tried using different flvs even the ones that came with red5.

Code


/**
 * initializes a server side stream
 * 
 * @param scope
 * @param name
 */
private void initServerSidePlaylist(IScope scope, String name){

    IServerStream serverStream = StreamUtils.createServerStream(scope, name);

    String filename = "BladeRunner2049.flv"; // this should be in the streams directory
    SimplePlayItem item = SimplePlayItem.build(filename);
    serverStream.addItem(item);

    serverStream.setRewind(false);
    serverStream.start();   
}

The entire example is here: https://github.com/rajdeeprath/red5-development-series/tree/master/code-examples/server-side/red5-stream-examples/stream-serverside-demo

Even flv file is included in streams directory. All you need to do is download the app and run it on Red5.

Environment

[] Operating system and version: : Windows Professional 10 64 Bit

[] Java version: java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

[] Red5 version: : 1.0.9 (Tested in Red5Pro though)

Expected behavior

Once the server side stream starts publishing, i should be able to subscribe to it using a flash client. I am using this client for testing: http://rajdeeprath.github.io/red5-server/demos/publisher.html

Actual behavior

The stream should play on the client side like a live stream.

Steps to reproduce

  1. Start the red5 server with the application in it. In a few seconds, the server stream is initialized. Server app: https://github.com/rajdeeprath/red5-development-series/tree/master/code-examples/server-side/red5-stream-examples/stream-serverside-demo

  2. Open the test client in a new browser window & connect to the appropriate rtmp address Client app: http://rajdeeprath.github.io/red5-server/demos/publisher.html

  3. Enter streamname as 'tv' and hit play

  4. There is no playback of the 'tv' stream

Logs

When you run the application you see this in the console:

[INFO] [Timer-0] org.red5.streams.examples.serverstream.Application - W3C x-category:stream x-event:publish c-ip:0.0.0.0 x-sname:tv x-name:tv

When you connect with the flash client and try to playback 'tv' stream, you get the following logging:

[INFO] [NioProcessor-2] org.red5.streams.examples.serverstream.Application - W3C x-category:session x-event:connect c-ip:127.0.0.1 c-client-id:0
[INFO] [Red5_Scheduler_Worker-17] org.red5.streams.examples.serverstream.Application - W3C x-category:stream x-event:play c-ip:127.0.0.1 x-sname:75e64689-bb52-4228-a691-0a59a6d78d5b
[INFO] [Red5_Scheduler_Worker-18] org.red5.streams.examples.serverstream.Application - W3C x-category:stream x-event:play c-ip:127.0.0.1 x-sname:75e64689-bb52-4228-a691-0a59a6d78d5b x-name:tv
jasonelqu commented 7 years ago

Hello, Could you explain me how to install stream serverside-demo, where i have to put the files, how to start the aplication can all explain to me in details please. I am a novice in the field ... thanks for everything

jasonelqu commented 7 years ago

I would like to create a webtv and it would make me a huge service