Can a transcoder pull from the output of another transcoder?

How can I configure a transcoder to source from the output stream of another transcoder? I’d like to use two transcoders in sequence:

RTMP "in1" -> Transcoder A-> "in2" -> Transcoder B-> "in_720"

When I configure as follows:

  • Transcoder A: name is “in1”, outgoing stream name is “mp4:in2”
  • Transcoder B: name is “in2”, outgoing stream name is “mp4:in_720p”
  • “Match source stream name to template name” checked

I can run transcoders A or B by sending rtmp “in1” or “in2” But the output of transcoder A does not feed into transcoder B. Is this possible?

On Transcoder A you can push the “in2” to Transcoder B by means of a Stream Target. Or, on Transcoder B, you can pull “in2” from Transcoder A with a “.stream” file.

These articles may help you. Remember that it must not be another Engine instance, it can also be another Application on the same Engine instance, or even the same Application, e.g. if you use different stream templates.

Another thing is that it’s not too common to transcode twice; and maybe if you present your use case, someone in the forums here can tell if and how it’s possible to only transcode once.

Re. Method 2: I’m not sure what you mean by “create transcoder”. You don’t really create a transcoder; you create an Application and push/pull streams in this Application. You MAY enable the transcoder for that Application, but it’s not obligatory, you can also simply pass the stream through.

a. Push your stream to Wowza, which will be listed under “Incoming streams” as “in1”

b. Create a stream file “in2.stream” that has as source “wowz://localhost/[application-name]/in1”

c. Start that stream file, use MediaCaster type “liverepeater”

d. You will now have an incoming stream called “in2.stream”

e. You can create a transcoder template with name “in2.stream” so that this stream will be transcoded

I see that you already have a long discussion in the other forum thread, and it’ll probably be confusing to start another discussion here. Generally, it helps to explain the case rather than ask for specific technical solutions, so that the experts can help you find for the best practice. So the question is: why do you at all need a 30s delay, and why must it be added before you add any overlays?

I’m sure it can be solved by development of a custom plug-in, but if you can solve it by chaining streams and setting a sortBuffer parameter, then that may be preferable over any custom development.

You may also decide to hire an expert to help you to architect and implement a solution. In that case, you can post a message in the “Find A Consultant” forums (https://www.wowza.com/community/spaces/26/find-a-consultant.html) or in the #hire channel on Wowza’s Slack (https://www.wowza.com/slack)

Thank you. You presented two methods for daisy-chaining transcoders.

Method 1: On Transcoder A you can push the “in2” to Transcoder B by means of a Stream Target.

I was able to do this successfully using your instructions. Thank you!

Method 2: Or, on Transcoder B, you can pull “in2” from Transcoder A with a “.stream” file.

I wanted to try your other method as well, but was unable to make it work. I think I am supposed to do the following:

a. Create transcoder “in1” which outputs to “mp4:in2”.

b. Create transcoder “in2.stream” which outputs to “mp4:in_720p”.

c. Create a stream file named in2.stream which has a URI pointing to in2.

First, are these steps correct? Second, what should the URI be – is it rtmp://localhost:1935/<app_name>/in11_out , wowz://, or ?? Third, what does it mean for a stream file to connect when the underlying stream is not active?

Comment: Why does the OP want to do this?

I need to create a 30s video delay buffer that PRECEDES the application of overlay images. Using SortBuffer / sortPackets does adds a delay buffer, but AFTER after the overlay has been applied.

The only way I know how to accomplish this is to make the first transcoder a passthru with 30000ms SoftBuffer, and have the second transcoder do the “real” overlays and transcoding. Is there a better way?

Partial thread: http://community.wowza.com/community/questions/55371/how-can-i-add-a-pre-transcode-delay-buffer.html

Thank you for the clarification. I was able to successfully use the push (stream target) and pull (.stream file) methods to daisy chain transcoders. I have accepted your answer.

Just a note to anyone who might be looking at this: For my specific application I found the push method to work better. The persistent names caused by the stream file method were tripping up my use of stream targeting to CDN.