• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • Wowza Transcoder /
avatar image
Question by Gustavo Villegas · Jan 28, 2014 at 02:49 PM · wowza transcoder

Selecting transcoder profile on server side API

Hi there .... I want to use something like mentioned on following post to select which stream to transcode ( http://www.wowza.com/forums/content.php?312-How-to-control-which-streams-get-transcoded-using-server-side-API)

Is there any way to select at same time, through server side API, which transcoder profile to use for each stream?

I want to tell which stream to transcode, and which profile of the 3 I will have to use for each stream

Thanks in advance
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by Roger Littin · Jan 29, 2014 at 01:19 PM

Hi,

The easiest way to do this will be to implement the ILiveStreamTranscoderActionNotify interface which has a method, onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder);, which is called right before the template is loaded. In this method, you can specify the name of the template that you want to load.

To implement the interface, you can do the following.

[PHP]

// Add a Transcoder listener to the appInstance.

appInstance.addLiveStreamTranscoderListener(new MyTranscoderCreateNotifier());

. . .

// Listener class that listens for transcoder create events and registers the transcoder action notifier class.

class MyTranscoderCreateNotifier implements ILiveStreamTranscoderNotify

{

@Override

public void onLiveStreamTranscoderCreate(ILiveStreamTranscoder liveStreamTranscoder, IMediaStream stream)

{

((LiveStreamTranscoder)liveStreamTranscoder).addActionListener(new MyTranscoderActionNotifier());

}

@Override

public void onLiveStreamTranscoderDestroy(ILiveStreamTranscoder liveStreamTranscoder, IMediaStream stream)

{

}

@Override

public void onLiveStreamTranscoderInit(ILiveStreamTranscoder liveStreamTranscoder, IMediaStream stream)

{

}

}

// Listener class that listens for transcoder actions. This class extends LiveStreamTranscoderActionNotifyBase which already implements all of the ILiveStreamTranscoderActionNotify methods so you only override the methods you need.

class MyTranscoderActionNotifier extends LiveStreamTranscoderActionNotifyBase

{

// get the templateName from somewhere and set it here.

@Override

public void onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder)

{

String templateName = "myStream.xml";

liveStreamTranscoder.setTemplateName(templateName);

}

}

[/PHP]

You can also use this along side the transcoder control interface to control what actually gets transcoded.

Roger.
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Johan Niemi · Feb 10, 2014 at 02:23 AM 0
Share
To expand this a little, can you specify the name of the template that you want to load in the stream name used on the encoder?

For example:

Server URL: rtmp://10.10.10.10/live
Stream name: myStream,transrate1


Results in rtmp://10.10.10.10/live/myStream being transcoded with the settings in transrate1.xml

Server URL: rtmp://10.10.10.10/live
Stream name: myStream,transrate8


Results in rtmp://10.10.10.10/live/myStream being transcoded with the settings in transrate8.xml

Is it doable?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Article: How to configure NVIDIA NVENC accelerated encoding on Amazon EC2 (G2, NVENC) 1 Answer

Replacing audio in H264 stream? 1 Answer

playlist.m3u8 missing values? (Playlist does not contain a TARGETDURATION tag) 3 Answers

Input with multiple audio streams 5 Answers

hardware recommended to transcode 4 video streams 1 Answer

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges