Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7674779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:48:50+00:00 2026-05-31T16:48:50+00:00

first I’m gonna try to explain what exactly I want to do: I have

  • 0

first I’m gonna try to explain what exactly I want to do:

I have an IP Camera which has a circular buffer from which I want to read the data. The communication between camera and my application takes place over RTSP, which means I have a TCP connection to the camera.
The camera itself is capable of streaming the data over RTP.

Now the important part is, that when the camera starts streaming it’s stuff, my application shall NOT read back the data. There is some kind of passive datalogger in the network which is responsible for recording the data.

The problem is, that as long as the camera is streaming, the Socket from my application needs to be opened, otherwise the camera will stop streaming.

So lets see what I have so far:

I open a socket, which connects to the camera and then sends the needed RTSP commands OPTIONS, DESCRIBE, SETUP and then PLAY. After this my socket remains open and the camera streams.

Now here comes the difficult part:

As I already said, I can not parse all the UDP data. But how can I then determine when the stream has ended? On wireshark I see that when the stream finishes I get a RTCP message which says Sender Report Goodbye.

This is the point where I would want to close my socket, but how can I determine that the camera has finished without parsing any UDP data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:48:51+00:00Added an answer on May 31, 2026 at 4:48 pm

    Okay it is possible to determine the end of the Stream.

    There are two lines of communication after the Stream has started.
    There is the RTP Stream, which contains all the raw data. Besides that there is some RTCP Data, which can be used to control the stream.

    The important part is, that the data is sent on different Ports. These ports are defined in the RTSP SETUP Request. Now while the camera is streaming, the data incoming on the RTP can just be ignored as intended, while you can open a socket to listen on the RTCP port. There you get some Sender Reports until the stream is finished ( with a last Sender Report Goodbye ). If you read this message you know you can close, since the stream has finished.

    Note: On some devices you may need to send some Receiver Reports as answer to theSender Reports otherwise the stream may stop, since the device thinks the client timed out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first take a look on this picture from localScope app : i have 2
first, sorry for my bad English. I try to rewrite url generated from Form
First I want to thank you guys here, because your posts have gotten me
First, I have a dbcontext factory which is defined public class DatabaseFactory : Disposable,
First of all, I have only worked with scaffolding in rails. What I want
First I want to say, I'm sorry if this question have be asked already
First off, I'm coming (back) to Java from C#, so apologies if my terminology
First, some context: I'm a Python developer who has written a medium-sized application using
First i selected images from photo library to ALAsset Library and after that i
First you should know I have looked into many questions and none of them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.