The camera uses the linux open sound system (OSS), which has been replaced by ALSA in linux 2.5 and above and isn't particulary nice to work with. The camera streaming server (camserv) , for which there is no source code, opens the audio-in device on startup and as it can only be opened once (and without it being available camserv refuses to work) I had to look at other avenues to get the audio.
Fortunately, camserv actually offers the audio out in a mangled stream which can be found at http://
I put together some code to connect to the stream and display the current, peak and average volume overlayed on the video stream. It uses some of the same code used for the text display on the previous entry and seems to run around 1/4 sec behind the actual audio (this is due to the audio being streamed locally, analysed and then overlayed onto the video).
I have included the source code and a compiled version here, and below is a short video of it being streamed to an iPad:
And here it is on Apple TV2 via XBMC:
To use the code on your camera it does need to authenticate to the local camera web server; it defaults to username:admin pasword:admin as do the cameras out of the box, if you are using your own username and password (and I strongly suggest you do) you will need to specify the base64 encode of the username and password on the command line via -a
Hi !
ReplyDeleteThank you for your tricks.
I have a TV IP312W too; and my camera is very unstable. Sometimes it run perfectly, and suddenly, I get a white screen on my IE or FFox window. Motion Detection stop to run, and automatic FTP upload stop to work.
The only thing I can do is access the web panel to reboot or configure my camera.
Did you have this problem too ?
Thank you.
S3rg385
PS : I'm French, so sorry for my speaking :)
Aha,
ReplyDeleteFirstly check to see you have a relatively modern firmware loaded - and then enable telnet as my previous posts (or you have use the firmware I have made available...)
The crash sounds like camserv has stopped running which is the daemon responsible for streaming and handling the motion detection call-backs.
If you want a quick and dirty fix you could wrap a script around it to restart it whenever it crashes.
Let me know how you get on
MuddyFunkster
ReplyDeleteI bought this camera because of your blog and I must say I'm impressed with the work you've done. I'm an IT guy but am a complete novice when it comes to coding. I have yet to update the firmware on the camera but wanted to ask the following question anyway to get your input. I have the camera pulled up on my ipad and my iphone in about 20 different ip camera apps including the trendnet branded app. I cannot get the audio to come through on any app. I checked and the audio is enable but the speaker on the camera is disabled due to the fact that I do not have speakers hooked to the device. Any ideas?
This comment has been removed by the author.
ReplyDeletemuddyfunkster said...
ReplyDeleteIt is probably due to the stream either being without audio (the mjpeg streams) or the audio not being recognised by the application.
I would recommend using the vlc app (or another app which supports RTSP and mpeg4) on the ipad or iphone, to open the stream you need to open the web-browser and entering the RTSP url as below:
rtsp://IP-ADDRESS-OF-CAMERA/mpeg4
I will be adding another post early next week with a finished firmware and all the associated components to have this running out of the box without the need for setting up the build environment.
Best of luck - and let me know how you get on
I'm attempting to implement your audio fix now. I'll be looking forward to the release of the firmware.
ReplyDelete