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

Issues with rpos fork and OnvifRtspLauncher #1

Closed
noomSik opened this issue Dec 13, 2022 · 23 comments
Closed

Issues with rpos fork and OnvifRtspLauncher #1

noomSik opened this issue Dec 13, 2022 · 23 comments
Assignees

Comments

@noomSik
Copy link

noomSik commented Dec 13, 2022

Hello, I was using the previous version of the rpos fork and had some problems with the hardcoded references in gst-rtsp-launch.sh, but I see they have disappeared in the last commit. However, when trying the last versions, I get numerous errors with autogen.sh, like missing files, directories...

Do I have to assume it's still being worked on and not usable? Or should it be fully usable as of now? Because I was interested on the new server option but it does not seem to be working.

If I don't try to use the new server option, I always get the same error no matter the configuration, even with testsrc:

_

Snapshot exec error: Error: Command failed: /usr/bin/python3 python/gst-rtsp-snapshot.py -v -u rtsp://127.0.0.1:8554/h264 -o /dev/shm/snapshot.jpg
DEBUG:root:rtspsrc location="rtsp://127.0.0.1:8554/h264" ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! pngenc snapshot=true ! appsink sync=false max-buffers=2 drop=true name=sink emit-signals=true
INFO:root:Creating Pipeline...
INFO:root:Extracting buffer from appsink...
DEBUG:root:Set to playing
DEBUG:root:pull sample

at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {

killed: true,
code: null,
signal: 'SIGTERM',
cmd: '/usr/bin/python3 python/gst-rtsp-snapshot.py -v -u rtsp://127.0.0.1:8554/h264 -o /dev/shm/snapshot.jpg'
}

_

@Quedale
Copy link
Owner

Quedale commented Dec 22, 2022

Thanks for this feedback!

This error is generated from the snapshot command and isn't directly tied to the streaming features.

The Fork's ONVIF snapshot command is using a replacement implementation (python) over the original (FFmpeg).
I originally replaced it for performance reason, but that was before I started working in C with static libraries.
(FFmpeg was a lot slower to take a screenshot compared to gstreamer)

Without seeing the full error, it's hard to pinpoint the cause, but I'm assuming you didn't install gstreamer's package.
(Sorry, I forgot to document this dependency)
Unfortunately I didn't get to implement the snapshot feature using in C yet. (It's on my radar)

This error should go away if you install the gstreamer packages from the distro's repository. (See README for the list of package).

In regards of autogen.sh errors, can you provides some additional details?
I'll definitely try to make the script more robust if I can help it.

Do I have to assume it's still being worked on and not usable? Or should it be fully usable as of now? Because I was interested on the new server option but it does not seem to be working.

The changes applied to rpos are relatively superficial in order to allow an ONVIF client to discover Profile-T features, so it should be stable.
The real changes lies in the new server option #4 (OnvifRtspLauncher) to add backchannel support.

It's currently working well on RPi4 (legacy), My laptop (Lenovo P52).

The option is not exposed in rpos yet, but onvifserver optionally accept an encoder option.
camera.ts can be updated to add "-e openh264enc" to enforce software encoding on raspbian bullseye.
I may add a new rposConfig.json option to support this.

I also updated the project's README.

@noomSik
Copy link
Author

noomSik commented Dec 22, 2022 via email

@Quedale
Copy link
Owner

Quedale commented Dec 22, 2022

I realized last night that I didn't document the build tools dependencies.
I added a section in the README for that.

This was most likely the cause of the errors you were seeing in autogen.sh.

Keep me posted.

@Quedale Quedale self-assigned this Dec 23, 2022
@noomSik
Copy link
Author

noomSik commented Jan 9, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 9, 2023 via email

@Quedale
Copy link
Owner

Quedale commented Jan 11, 2023

The key error here is this : ../autogen.sh: line 529: meson: command not found

You don't have meson installed which is required to build gstreamer from source. (which is my preferred method running ubuntu 22.10)

I added a new section in README.md - Build Dependencies, which didn't exist when you reported this issue.

Make sure you pull the latest changes as I also updated the autogen script to include additional build dependencies.
The autogen script will now also attempt to build the following libraries if missing : libasound2-dev, libpulse-dev and libgudev-1.0-dev.

Regarding E: Package 'python-gi' has no installation candidate, you can use the alternative "python3-gi", but this is not required for this project. It is only required if you use RTSPServer Type #3 in "rposConfig.json.

The gstreamer package dependencies are documented for the RTSPServer Type #3 and not meant for development purposes. In order to avoid building from source, you can simply find the lib**-dev alternative packages. (e.g. libgstreamer1.0-dev )
I didn't bother documenting distro package dependencies yet, since I'm personally working from source.

@noomSik
Copy link
Author

noomSik commented Jan 11, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 11, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 11, 2023 via email

@Quedale
Copy link
Owner

Quedale commented Jan 13, 2023

You are still getting the following error, which causes the chain of failures:

../autogen.sh: line 516: meson: command not found
../autogen.sh: line 527: meson: command not found
../autogen.sh: line 529: meson: command not found

Was your installation of meson successful?

You can confirm the installation with the command meson --version.

If you installed the latest version through PIP, remember to add the following to your PATH variable:

export PATH=$PATH:$HOME/.local/bin

I'll improve the autogen.sh script's error handling to be more descriptive.

@noomSik
Copy link
Author

noomSik commented Jan 13, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 13, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 13, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 13, 2023 via email

@Quedale
Copy link
Owner

Quedale commented Jan 14, 2023

Thanks for this feedback! It looks like I missed a dependency.

I'm currently revamping autogen.sh to include it and to add error handling.
I'm also testing it from a minimal ubuntu 22.10 install.
It should be ready really soon.

Until then, you can simply install nasm using the package manager. sudo apt install nasm.

@Quedale
Copy link
Owner

Quedale commented Jan 16, 2023

I updated the autogen.sh script to include the build of nasm if it's not found on the system.
I also added error handling, so it should abort on failure.

Give it a shot when you get a chance!

@noomSik
Copy link
Author

noomSik commented Jan 16, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 16, 2023 via email

@noomSik
Copy link
Author

noomSik commented Jan 16, 2023 via email

@Quedale
Copy link
Owner

Quedale commented Jan 16, 2023

This project [OnvifRtspLauncher] is for Step 5d of the rpos project.

You are trying to follow "5.c.1a" which isn't related to this project.
Nonetheless, python-gi is for Python2 which is no longer supported. Try to install python3-gi instead.

"STEP 5 - PICK YOUR RTSP SERVER" are all mutually exclusive, since you can only choose one when launching the rpos service.

Note that I'm not the original author or rpos (original repo). I simply forked the original project to add a new RtspServer option.

Please let me know if you have an issue using RTSPServer #4 in rposConfig.json.
Otherwise this issue can be considered resolved. (rpos issues should be reported on the rpos repository)

@noomSik
Copy link
Author

noomSik commented Jan 16, 2023 via email

@Quedale
Copy link
Owner

Quedale commented Jan 16, 2023

Although I don't own rpos, I'll make the adjustments in my fork's the documentations.
I'll also look at issue submission for it.

Thanks for all your feedback.

Feel free to open another issue if you encounter anything else.

@Quedale Quedale closed this as completed Jan 16, 2023
@Quedale
Copy link
Owner

Quedale commented Jan 16, 2023

I just enabled "Issues" under my rpos fork for future reference.

Cheers!

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

2 participants