motioneye
motioneye copied to clipboard
Request to add sound to the video
Can we please add sound to the video
Many thanks for your request.
Could you go more into detail, which kind of video do you mean, for locally attached cameras which have a microphone, or remote/IP cameras or both? And shall the audio stream be in the stored media file only, or played on the web interface as well?
I guess with V4L2 utilities is is possible to capture both for a local camera easily (when available) and store it, in case after FFmpeg transcoding/encoding. But it is not so trivial to pass both to the web interface. Currently we use an MJEG picture stream, naturally no audio, to the browser, so that would required a larger rework I guess.
Thanks My cameras all record sound - to the SD card. What I am looking for is when the camera records with MotionEye to my NAS to have the sound from the camera. At the moment it is just video with no sound
My cameras all record sound - to the SD card.
You mean via motionEye as well? I.e. you mean recording via motionEye to a local directory contains sound and doing so with NAS upload contains no sound? Hmm, I'd need to have a look into the code in case/why this is handed differently for those two cases then. I'm new to the project, just if you wonder 😉.
I don't think Motion supports audio at all (see https://github.com/Motion-Project/motion/issues/384, https://github.com/Motion-Project/motion/discussions/136). However, there are some ways to get around it by either recording audio separately and then combining audio+video, or using some Motion parameters (see https://github.com/motioneye-project/motioneye/issues/1112, https://www.lavrsen.dk/foswiki/bin/view/Motion/SoundAudioRecording).
So can you add that audio script to motion eye?
Generally, /dev/video0
and alike seem to provide an audio stream as well, when provided by the camera. So if FFmpeg is used, it should be possible have it just included as is. But looks like the motion
maintainer explicitly denies to add audio support, since it is often illegal to record audio without consent and it goes beyond the scope of what motion
aims to do: Detecting visual motion, not sound.
But probably I find time to check where/how motionEye catches the media stream and where we would be able to at least leave audio inside, when it is there already. But this has no high priority to me, so may take a while, if no one else is having a look into the code earlier 🙂.
Thanks that would be good! FYI - in Australia it is fine to video with sound as it's for your own use. If it was brought to court you'll need to get permission to submit it. Comes under the surveillance act.
Same with the video. Don't ask me how I know that :(
The Reolink Cameras all provide sound over the RTSP stream, can this be added to the recordings?
https://github.com/meirlazar/motion_with_audio_arecord shows a bash script for adding audio to Motion but I do not understand the install instructions. But assuming it works, could something like this be incorporated into MotionEye?
Edit: Never mind that, it doesn't work. From what I have read you'd need to use the MotionPlus project rather than just plain Motion to get sound with some cameras.