RTMP url port changes switching to next video

Hi.
I am pushing the video to wowza streaming engine by rtmp based on the time. Switching to next video, player stops playing. We need to play manually. But I need to play continuously. I found that, switching to next video, rtmp last 5 digit port number changing in the incoming streams. Please do needful. TIA

How do you push the stream currently ?. Have you seen this.? Is this what you are trying to build ?

I am pushing the video to wowza streaming engine by rtmp method in node js platform with the help of ffmpeg package

So that is where the issue is. You should use server side publishing instead using wowza api for uninterrupted stream. With ffmpeg you can only do preplanned playlists. If you try to stop a stream and start another it will be treated as a breakage in source stream by wowza. This post I believe addresses your issue as well.