Page 1 of 1

Can We Capture Audio with the Video??? and if So How??

Posted: Sat Mar 18, 2006 12:09 am
by kenehresman
Can we capture AUdio? and if so how? and if not then any ideas on how to change that?

Ken

Posted: Sat Mar 18, 2006 12:25 am
by jameswilson
not at the moment. if you want to change it....how much c do you know?

Posted: Sat Mar 18, 2006 9:48 am
by Flash_
Depending on how the audio is supplied - yes, but only outside of ZM.

You can capture mpeg4 streams (audio encapsulated) using wget or similar, I had a system working (before I found ZM and embraced that with gratitude) which would capture 1 hour mjpeg or mpeg4 streams directly from camera to disk and name them appropriately. Basic, crude stuff - but it worked. Review was a clumsy business of opening the streams in a media player and seeking forwards relying on the camera's onscreen time clock for positioning (mjpeg doesn't pace well)

I'm waffling - but it's possible if you think a bit sideways.

Posted: Sat Mar 18, 2006 6:54 pm
by zoneminder
Audio capture has been started but has been on the back burner for a bit as there are usually other features in more demand. When I get chance I will finish it as I think ti would be useful.

Posted: Sun Mar 19, 2006 5:32 pm
by gneuf
I've got a rudimentary audio stream playback going for this Sony SNC-M3W. It plays on the server during monitoring. I'm trying to find the correct place in the monitor window code to setup streaming from the server in the Watch window...

So far, it's a total hack. :? But it's sort of working...

ZM's code is too well organized for this to be the proper way to incorporate it. :D

I'd be interested to know the correct area and method for implementing this in the existing code...it's been an instructive exercise as far as audio streams go - and I've barely scratched the surface.

Posted: Mon Mar 20, 2006 5:20 pm
by zoneminder
Ultimately audio will be incorporated as a new monitor type. So you can have local video, remote video (as now), local audio and remote audio or a combination. It sounds quite straightforward in practice but does require quite a few things to be moved up or down the class heirarchy which can get rather fiddly. It also requires a further specialisation of Events to handle being an audio event or video event (or maybe both).

Posted: Mon Mar 20, 2006 5:33 pm
by jameswilson
phil, how you planning on streaming audio? as ill need to incorporate both streaming and playback into zm4ms

Posted: Mon Mar 20, 2006 9:22 pm
by gneuf
That's the approach I figured you be taking. I'll stow this code until later on - I've already put a test in the SNC-M3W modified zm_remote_camera.cpp that discards the audio if it's being transmitted, so at least that bit of possible incorrect setup won't generate much forum traffic...

Posted: Thu Mar 23, 2006 4:51 pm
by zoneminder
Audio streaming will be done either inband with video via ffmpeg or via other ffmpeg codecs. Ultimately I want to stream it using Darwin or similar to give proper real-time sync. This is for live streams, captured audio will probably just be mp3 type files. It's a bit woolly at the moment I'm afraid, though capturing it is much simpler.

Posted: Thu Mar 23, 2006 5:53 pm
by jameswilson
yeah im guessing the problem is going to be syncing the audio and the video. Plus i suppose zms will have to handle playback as simple image viewing wont be bale to do this?