switching h264 streams fails when picture size changes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

switching h264 streams fails when picture size changes

russ
I want to send h264 video to an rtmp server, selecting between two input streams. I am using input-selector to switch between the sources. The problem is that if the picture size is different, the switch over works the first time, but when I switch back, the player fails to detect the size change, and decoding fails. There are periodic key frames and sps/pps from the sources so the size information is available and is reflected in caps events. I dont see any pipeline errors and data is still flowing.

However, this works if I use mpegts as the muxer, instead of flvmux/rtmp, or if there is no size size difference between the input streams. It also works if I decode, select then re-encode, but I want to avoid having to do that if possible.
Is there a way to make this work with rtmp without re-encoding?

Thanks,

Russ.