Unable to switch between streams using input-selector
Nirbheek Chauhan
nirbheek.chauhan at gmail.com
Wed Apr 13 15:43:32 UTC 2022
Hi,
On Wed, Apr 13, 2022 at 6:30 PM Eg Gloor via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> wrote:
> I'm trying to switch between two streams and publish it to a RTMP server using input-selector as follows:
>
I am assuming that the stream works if you do not switch at runtime?
It's not so simple to switch between two h264 streams like this. You
need to account for the following:
1. Video frames can only be decoded with a reference frame, so you can
only switch streams on a keyframe.
2. Both streams must have the same characteristics (resolution,
framerate, level, profile, etc), or downstream must be able to
renegotiate
3. If reneg is needed, then you must resend the SPS/PPS with every
switch (config-interval=-1 on h264parse should do that for you)
4. If reneg is needed, some endpoints may only be able to handle a
subset of stream characteristics changes dynamically
(1) and (3) are probably what you are missing here.
Cheers,
Nirbheek
More information about the gstreamer-devel
mailing list