Results 1 to 4 of 4

Thread: Transcoder doesn't stop when I reject connection

  1. #1
    Join Date
    Mar 2014
    Posts
    11

    Default Transcoder doesn't stop when I reject connection

    My problem is that when I broadcast with ffmpeg aplication I can't stop the transcoder.

    I mean, I have a logic to check if user is allowed to broadcast or not. And if the result is false, i shutdown stream and reject client.
    With wirecast it works fine, users only can broadcast when the result is true, if it's false they don't broadcast.

    But with ffmpeg even the result of logic function is false, it broadcasts like nothing happens. At least transcoder still on, and when I close connection in ffmpeg the original video gets corrupted, but transcoded videos are fine.

    I'm using the follow code to broadcast:
    ffmpeg -re -i sample.mp4 -vcodec copy -acodec copy -f flv -y  rtmp://localhost:1935/live/myStream
    To shutdown client I'm using:
    if(stream.getClient()!=null){
    		stream.getClient().rejectConnection("NetConnection.Connect.Closed");
    		stream.getClient().rejectConnection("NetConnection.Connect.Rejected");
    		stream.getClient().rejectConnection("NetStream.Play.UnpublishNotify");
                    stream.getClient().shutdownClient();
    		sendClientOnStatusError(stream.getClient(), "NetStream.Play.UnpublishNotify", "The publisher was rejected, Unauthorized");
    		sendClientOnStatusError(stream.getClient(), "NetConnection.Connect.Closed", "shutdown your stream");
    	}
    
    	stream.stopPublishing();
    	stream.shutdown();
    	stream.close();
            stream.flush();
    	sendStreamOnStatusError(stream, "NetStream.Play.UnpublishNotify", "The publisher was rejected, Unauthorized");
    	sendStreamOnStatusError(stream, "NetConnection.Connect.Closed", "shutdown your stream");
    What could be the problem?

    Thank you,
    Jose

  2. #2

    Default

    Hi there, the way to shutdown an RTMP connection is to use IClient.setShutdownClient(true)

    Salvadore

  3. #3
    Join Date
    Mar 2014
    Posts
    11

    Default

    Quote Originally Posted by salvadore View Post
    Hi there, the way to shutdown an RTMP connection is to use IClient.setShutdownClient(true)

    Salvadore
    Hi Salvadore,

    Wow!! It works like a charm...

    Thank you so much and sorry for inconveniences!!

  4. #4

    Default

    No need to apologize, glad I could help!

    Salvadore

Similar Threads

  1. Manually start/stop transcoder
    By kaktus in forum AddOn: Transcoder
    Replies: 1
    Last Post: 07-29-2013, 08:55 AM
  2. Connection with wowza server automatically stop sending frames
    By sunnychandel in forum Live Streaming and Encoder Discussion
    Replies: 7
    Last Post: 05-16-2013, 04:29 AM
  3. Transcoder not working and stop working live streaming
    By silas_i in forum AddOn: Transcoder
    Replies: 5
    Last Post: 03-18-2013, 04:55 PM
  4. Transcoder stop randomly with error
    By steveitl in forum AddOn: Transcoder
    Replies: 2
    Last Post: 09-05-2012, 01:59 PM
  5. Wowza not breaking connection with Push Publish & Transcoder Modules
    By jpollard in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 12-28-2011, 07:06 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
  •