Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-transmit RTSP stream #14

Open
hijinkim opened this issue Jul 4, 2023 · 0 comments
Open

Re-transmit RTSP stream #14

hijinkim opened this issue Jul 4, 2023 · 0 comments

Comments

@hijinkim
Copy link

hijinkim commented Jul 4, 2023

I have modified the code as follows to add RTSP retransmission.

valkka-live/valkka/live/chain/multifork.py

def make_restream_branch(self):
        self.livethread2 = LiveThread(
            name = "live_thread2",
            verbose = False,
            rtsp_server = 8554+self.slot
        )        
        self.live_in_filter = self.livethread2.getFrameFilter()
        self.info_filter = core.InfoFrameFilter("info_filter", self.live_in_filter)
        self.fork_filter_main.connect("restreaming_" + str(self.slot), self.info_filter)

    def restream_client(self, inc = 0):
        if self.restream_client_count < 1 and inc > 0:
            self.out_ctx = core.LiveOutboundContext(core.LiveConnectionType_rtsp, "stream1", self.slot, 0)
            self.livethread2.registerOutbound(self.out_ctx)

        elif self.restream_client_count == 1 and inc < 0:
            self.livethread2.deregisterOutbound(self.out_ctx)
        
        self.restream_client_count += inc

After executing the code and checking with ffmpeg (ffmpeg -i rtsp://{ip_address}/stream1 -v verbose), I found a log stating that the connection to the address was established, but the stream could not be found. Can you help me identify what went wrong?

[tcp @ 0x5574f6708e40] Starting connection attempt to {ip_address} port 8561
[tcp @ 0x5574f6708e40] Successfully connected to {ip_address} port 8561
[rtsp @ 0x5574f6706b80] method DESCRIBE failed: 404 Stream Not Found
rtsp://{ip_address}:8561/stream1: Server returned 404 Not Found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant