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

New install, couple issues #3

Open
prodiac1 opened this issue Aug 9, 2020 · 10 comments
Open

New install, couple issues #3

prodiac1 opened this issue Aug 9, 2020 · 10 comments

Comments

@prodiac1
Copy link

prodiac1 commented Aug 9, 2020

I just installed MotionEyeOS for the first time, using a Raspberry Pi install (non Docker), and discovered your script, once I found out the system itself did not support audio. I installed it last night and ran in to a few issues.

The first issue is that each ffmpeg command was failing because it was looking for camera-.conf. It was failing the command that retrieves the camera ID. Here is the error:

File "", line 1
import motioneye.motionctl; print motioneye.motionctl.motion_camera_id_to_camera_id(/data/media/motioneye_192_168_1_99_securitycamera_chris_prodiac_net/2020-08-08/00-36-39.mp4)
^
SyntaxError: invalid syntax
grep: /data/etc/camera-.conf: No such file or directory
grep: /data/etc/camera-.conf: No such file or directory
grep: /data/etc/camera-.conf: No such file or directory

I temporarily -fixed- this by just commenting this line out and putting "camera_id=1".

The second issue, which I can not seem to find any error for, is that it does not seem to always get the audio. I record by motion, not continuous. About half of my recordings have audio, half do not.

I am running the latest release of motioneye

@DeadEnded
Copy link
Owner

DeadEnded commented Aug 10, 2020

From the error, it appears that instead of getting the motion thread ID it is getting the config file path. This looks like you have the wrong parameter order being passed in.

Can you please paste in the Extra Motion Options and the Run a Command that you are using?
It is getting the second parameter as %f instead of %t so something is messed up I would guess.

Lets fix this part, and then take a look at the missing audio - it could be the same issue as if Motion starts with a different thread # it could miss the audio as well.

Cheers!
DeadEnd

@DeadEnded
Copy link
Owner

FYI another user has had the same issues, it looks like it is a difference between MotionEye and MotionEyeOS.
I am working with them to figure it out, and I expect once I have it fix your issue will be resolved as well.

Cheers!
DeadEnd

@prodiac1
Copy link
Author

prodiac1 commented Aug 12, 2020 via email

@DeadEnded
Copy link
Owner

I did try shinobi as well.
Very nice software - my issue was doing a high and low res feed simultaneously... couldn't get it to work.
Also recording lengths weren't consistent - would get random 10 second segments.

I have confirmed the issue is with the difference between MotionEye and MotionEyeOS.
I will be working on fixing this... for the initial, if you are using IP cameras you can just comment out line 9 and change line 5:

line 5:

camera_id=$2

comment line 9:

camera_id="$(python -c 'import motioneye.motionctl; ..... blah blah blah

But chances are you are using a camera designed for the PI and so the script doesn't handle that. I will be working to try and write a second script designed for MotionEyeOS but don't have any idea how long it will take if it is even possible.

Cheers!
DeadEnd

@prodiac1
Copy link
Author

Did you see the second issue I noted though? Half of my recordings had no audio, while half did. After I manually did comment out the line 9, and manually set camera_id=1 to get it working at all.

@DeadEnded
Copy link
Owner

how long are your recordings typically?
there could be some delay in the processing and so for short recordings it could be missed.

@prodiac1
Copy link
Author

My motion detection settings did not seem to be working properly and I was getting recordings for 45seconds-1min every couple of minutes, when I was noticing this.

@DeadEnded
Copy link
Owner

hmm... IDK to be honest.
it could be the script wasn't being called every time, but I can't say why. You could try digging through logs and see what you can find - needle in a haystack.

What camera are you using? Is it a Pi cam or an IP cam?

@prodiac1
Copy link
Author

It's a Sercomm ipcamera2, I had gone through my logs, couldn't find any indication of ffmpeg being triggered for the extra trigger on the times where I got no audio to be honest.

@DeadEnded
Copy link
Owner

Ok, then the existing script should work. A new script is going to need to be made for when the camera is a raspberry pi cam and they are using a separate mic. Since you are using an IP cam the first script should work with the small change that you've already done.

As to why the audio is being missed on some recordings, I am wondering if it is related to your issue with motion detection not working sometimes... IDK if there is a setup issue or a resource issue? Maybe rule out the resource by taking a look while its running (specifically when recording) and see how high the usage goes. If CPU is maxing out during recording it just might not have enough juice to keep up. Just an idea.

Or if you are liking Shinobi run with that - easier than hacking together something else 😄 .

Cheers!
DeadEnd

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