Page 1 of 1

duplicating a stream after encoding

Posted: 13 Apr 2018 16:53
by StCyr
Hi,

I would like to provide 2 live streams with 2 different resolutions (720p and 480p) from 1 single input (with resolution = 1080p).

I wonder if it's possible to duplicate the input stream after having it encoded.

Something like that:

Code: Select all

'#transcode{vfilter=canvas{width=1080,height=720},vcodec=h264,venc=x264{profile=baseline,level=3,preset=ultrafast,tune=zerolatency,keyint=50},acodec=aac,ab=128,channels=2,samplerate=44100}:#duplicate{dst="rtp{sdp=rtsp://:9090/kodi720.sdp}",dst="#transcode{vfilter=canvas{width=852,height=480}}:rtp{sdp=rtsp://:9090/kodi480.sdp}"'
The goal is to achieve the following pipeline:

input(1080p) -> downscaling to 720p -> h264 encoding -> downscaling to 480p

One of the streams would be output directly after h264 encoding, while the second stream would be output after being downscaled further to 480p.

Do you know if it's possible? And, is it a good idea?

Best regards,

Cyrille

Re: duplicating a stream after encoding

Posted: 13 Apr 2018 19:59
by Rémi Denis-Courmont
It is possible but it is a stupid idea, since it will incur a useless extra decoding step before the down-scaling.

Re: duplicating a stream after encoding

Posted: 14 Apr 2018 06:05
by maddhin
It is possible but it is a stupid idea, since it will incur a useless extra decoding step before the down-scaling.
I'm also a total noob trying to get help here, I think it would be more productive if the experienced members give concrete advise on how to do it right instead of bashing (potentially bad) ideas. I personally e.g. have big difficulties understanding how to dublicate a stream and are grateful for every bit and piece of info I can collect to solve my own problem.

Re: duplicating a stream after encoding

Posted: 14 Apr 2018 08:26
by Rémi Denis-Courmont
You asked if it was possible, and if it was a good idea. I answered both questions.

But considering your attitude, I will just ignore from now on.

Re: duplicating a stream after encoding

Posted: 16 Apr 2018 09:21
by StCyr
Hi,

I'm not the person who replied to your answer :-)

Indeed, I had asked 2 questions and you answered both. Thank you.

On the other hand, I'm inline with maddhin when he reports "big difficulties understanding...". Let's try to stay constructive :-)

Best regards,

Cyrille