Code Monkey home page Code Monkey logo

motioneyeaudio's People

Contributors

deadended avatar walthowd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

motioneyeaudio's Issues

Stuck trying to get the script to work

I am running motioneyeOS (not on docker) on a raspberry pi 3. Currently I am using a usb camera (for testing currently) and attempting to use the built in microphone in the camera.

I started with the instructions in the readme following for meyeos. I created the motioneye-audio.sh file with vim in the /data/etc folder. I set the permissions with chmod +x for the script as mentioned in the instructions. Then I set the camera's options in the ui as this: on_movie_start /data/etc/motioneye-audio.sh start %t %f '%$' in Extra Motion settings and /data/etc/motioneye-audio.sh stop %t %f '%$' for Run a Command in file storage. I did not change any text for any of these.

I didn't see any sign that the script was doing anything. I've restarted several times, manually entered the camera id (1) in the motioneye-audio.sh file, tried to run directly from ssh, and followed many of the issues in github and the home assistant forum.

Running the command alone with the camera id specified I get the /etc/motioneye not found. I am running on motioneyeos so im not sure why it's looking there. It's actually in /data/etc/

Should I install docker with motioneye? Does this work on motioneyeos? Thanks!

New install, couple issues

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

Not working, is project dead?

I've followed instructions closely, using an Ubuntu 20.04 VM, and am having no luck with this. When I try to run it manually I get 'No such file or directory'.

Audio is ahead of video

The script works in my box in terms of generating aac and merging to the recording clip (mp4). However the audio is way ahead of the video after merging into 1 mp4 file. It is like 4 seconds ahead. Could you please help?

PiZero & USB Mic... Unable to identify audio input stream (camera ID blank & no netcam information)

I've recently installed a fresh MotionEyeOS 20200606 on a Raspberry Pi Zero W, hooked it up to the native Raspberry Pi camera and a basic USB microphone. The motioneye-audio.sh file doesn't cause audio to be captured, so I've done a few investigations helped by my fork of the repo, in which I've added some debug lines for each of the variables. You may wish to take a look here... https://github.com/lapsedtheorist/MotionEyeAudio

My Video Device > Extra Motion Options says on_movie_start /data/etc/motioneye-audio.sh start %t %f '%$', and my File Storage > Run a Command says /data/etc/motioneye-audio.sh stop %t %f '%$'.

The script definitely runs when it should, however the camera_id variable remains empty, so the config file is not found. If I attempt to manually run the command that would populate it (from a root SSH session), I see the following terminal output. Note I've hardcoded the "1" in the example, which is the value that comes through from the command line into the motion_thread_id variable.

# python -c 'import motioneye.motionctl; print motioneye.motionctl.motion_camera_id_to_camera_id(1)'
ERROR:root:failed to list config dir /etc/motioneye: [Errno 2] No such file or directory: '/etc/motioneye'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/motionctl.py", line 28, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/mediafiles.py", line 38, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/config.py", line 2085, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/boardctl.py", line 23, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/streameyectl.py", line 563, in <module>
  File "/usr/lib/python2.7/site-packages/motioneye/streameyectl.py", line 174, in _get_streameye_enabled
  File "/usr/lib/python2.7/site-packages/motioneye/config.py", line 294, in get_camera_ids
OSError: [Errno 2] No such file or directory: '/etc/motioneye'

Does this help?

Also in the config file /data/etc/camera-1.conf there are no lines containing the word 'netcam'... maybe the native Raspberry Pi camera doesn't present itself that way, I'm not sure?

Anecdotally, I'm looking at variants of the audio capture such as arecord as well as ffmpeg -y -i default:CARD=Device ... and have had a little success with the latter however the output is noisy and the CPU is high. I'll keep on with that and will contribute back if I get something working.

where to put settings

Hi,
Thanks for all your efforts.
I seem to be to stupid to find out where to put the start command: on_movie_start /data/etc/motioneye-audio.sh start %t %f '%$'

Do i need to add it to the camera-*.conf of each camera?
There i can't find the "In your camera settings, under the Video Device section add the following to Extra Motion Options:"

br
Michael

Audio missing in some videos

Hi there!
I am using audio enabled IP camera RTSP streaming for video recording. i have set motioneye video recording on 1 minute interval. it is recording audio in some of the videos and mostly videos don't have any audio. even no separate audio file is made for videos those don't have merged audios.

Script motioneye-audio.sh for Home Assistant Generic x86-64? / Скрипт motioneye-audio.sh для Home Assistant Generic x86-64?

Script motioneye-audio.sh for Home Assistant Generic x86-64?
Please tell me where to put the script motioneye-audio.sh in the installed Home Assistant Generic x86-64?
Thank you.

Скрипт motioneye-audio.sh для Home Assistant Generic x86-64?
Подскажите пожалуйста, куда в установленном Home Assistant Generic x86-64 кинуть скрипт motioneye-audio.sh?
Спасибо.

Could you help, audio-modul...

Sorry, I'm New. I would like to use:
"ReSpeaker 2-Mic Pi HAT V1.0 for Raspberry Pi Zero and Zero W, Raspberry Pi B+, Raspberry Pi 2B and 3B"
for MotionEyeAudio, is it easy possible?
I found on Youtube "Raspberry Pi Zero W Surveillance Camera" from "ExplainingComputers" that looks easy to use, but without audio, can you help me?

Upgrade for Python 3

Hi, first great job!
I am using now docker motioneye works well!
motionEye Version | 0.43.1b1
Motion Version | 4.6.0
Python 3.11.6
Could you update motioneye-audio.sh to Python 3?
I tried using 2to3 and chatGPT but no lucky...

Thanks

ffmpeg couldn't access rtsp audio when the video recording is on

After reading several issues discussion also the lengthy debug in https://community.home-assistant.io/t/adding-audio-to-motioneye-recordings/198438/8 , I finally figured out why the script is not working on my setup:

"Official" motioneye docker install on arm64 pi board (orange pi 3b)

Turned off Camera1 in motionEye Video Device settings, get the container shell and can successfully try
ffmpeg -y -i "rtsp://admin:[email protected]:554/" -c:a copy test.wav the wav file can be played smoothly

Turned on Camera1, video recording is turned on. Run the same ffmpeg command in the shell but get:
rtsp://admin:[email protected]:554/: Operation not permitted

I don't know why I counldn't get ffmpeg to stream the rtsp at the same time of video recording. Is it a limitation from ffmpeg? from container's network? from the IP-CAM which doesn't allow two connections from the same IP?

Running out of ideas to move forward... Any insight is much appreciated. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.