-
Notifications
You must be signed in to change notification settings - Fork 86
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
Added simple RTSP support and custom video sink option #40
base: main
Are you sure you want to change the base?
Conversation
- Implement RTSP source handling in the GStreamer pipeline - Add command-line argument for specifying custom video sink - Update pipeline string generation to include RTSP source - Enhance flexibility by allowing user to choose video sink - Improve error handling for invalid network types - Refactor pipeline string generation for better readability
@chm10 Thanks for your input. The current code is hardcoded to support only H.265 videos. Please convert it to use auto-pluggers like decodebin. It should look something like this: rtspsrc location=rtsp://your_rtsp_stream_url ! application/x-rtp,media=video ! decodebin ! videoconvert ! autovideosink Once that's done, I'll be able to merge it. Thanks a lot for your contributions; they are highly appreciated. I'd be happy to merge your code here. |
I will change the code. I only have devices using H.265 rtsp for now. |
…into feature/rtsp-compatibility-39
…lo-ai#40) Update the GStreamer pipeline to use decodebin for RTSP video sources Remove hardcoded H.265 video decoding elements Automatically select the appropriate decoder based on the incoming video stream's codec Ensure compatibility with various video codecs without explicit specification Maintain existing functionality for other video sources (RPI, USB, file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See remarks.
Please add example for RTSP url with user and password.
After changes i'll run tests on RPi and x86 to make sure it works.
@@ -92,6 +92,7 @@ class GStreamerDetectionApp(GStreamerApp): | |||
def __init__(self, args, user_data): | |||
# Call the parent class constructor | |||
super().__init__(args, user_data) | |||
self.video_sink = args.video_sink if hasattr(args, 'video_sink') else 'autovideosink' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used please remove
@@ -216,6 +225,8 @@ def get_pipeline_string(self): | |||
default=None, | |||
help="Path to costume labels JSON file", | |||
) | |||
parser.add_argument('--video-sink', default='autovideosink', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used
source_element = ( | ||
f"rtspsrc location={self.video_source} name=src_0 ! " | ||
"application/x-rtp,media=video ! " | ||
"decodebin ! " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to add some queues between decodebin, videoconvert and videoscale. These are big tasks which can benefit if separated to multiple threads.
New feature #39
Disclaimer:
I am not the owner or maintainer of this project. This pull request is a suggested solution based on
the information available in issue #39. It is provided "as is", without warranty of any kind, express
or implied. The project maintainers should review and test these changes thoroughly before considering
implementation. I'm open to feedback and further modifications if needed.