transcode a stream to video only

sulphur

Member
Hi,

I need to transcode my stream so that the output of the original steam has no audio. I tried adding "hasAudio": false to transcoder startup params but it won't work. When I list all transcoders via API the hasAudio is set to true in my transcoded stream and of course when i play the transcoded stream I hear the sound. Is it a bug ? or it is simply impossible to achieve in the current version?

Here is the transcoding comand i useed to startup the transcoder:
Code:
curl -v -H "Content-type: application/json" -X POST -d '{"uri": "transcoder://tcode1", "remoteStreamName": "cd17863c-b3a7-4179-a2b5-b84fc243b4a6_789b3452-55c6-4a50-8f0a-0089ca70548d", "localStreamName": "toto1", "hasAudio": false}' https://local-edge.toto.com:8444/rest-api/transcoder/startup
 

Max

Administrator
Staff member
Hello

There are two transcoding API versions

/transcoder and /transcoder2

Both versions do not support hasVideo parameter for /startup request. Just for /find request.

So you can't suppress audio using transcoder API.

Though you can try /mixer API instead of /transcoder

Mixer supports mute operations for feeding streams

Test

1. /mixer/startup
2. /mixer/add
3. /mixer/setAudioVideo {"audioLevel":"0"...}

 

sulphur

Member
I tried out the mixer it works as expected. I was wondering if it is possible somehow to skip the video transcoding and copy the video stream? For example, if I set the same width/height of mixer as input stream and remove all paddings etc.

btw. this mixer funciton is great!
 

Max

Administrator
Staff member
I was wondering if it is possible somehow to skip the video transcoding and copy the video stream
It is not possible in mixer because mixer always decodes incoming stream to separate frames and then encodes outgoing one.
 

sulphur

Member
Hi, again @Max. So I've setup the mixer with setAutoLevel: 0
It works as expected when I play the stream via WebRTC. However, via HLS I have the audio stream ;( should this method work for HLS ? or is it webRTC only?
 
Top