The intel - real sense camera provides two video streams at once, a rgb as well as a depth stream. I now need to make those two streams separately accessible locally over a server for multiple clients. I found ways to do that for only rgb and and a single client, but could not find a guide for a multi stream - multi client solution in Python.
I did my research but could not quite find what I needed. If anyone could point me to a/multiple tutorials or generally tools I should use, that would be helpful.
How about ROS wrapper of realsense.
Realsensen camera will be wrapped inside a ROS node. Then it will publish color, depth frame into seperated message queues. Finally, you can subcribe to those message queues to get the frame.
(Image source)
Related
Hello there i hope that you are good and doing fine. I have recently developed a surveillance system using web RTC multi connection. Now i have to apply facial detection and facial recognition on the stream at one end (where the camera is placed i.e camera stream).For this i have to divide the one stream into multiple stream so that one stream is showed to user and other one is sent to opencv so that i can apply facial recognition operation.Can anyone guide me that how will i be able to achieve this?
I have been using Onvif for one month and I am able to receive stream URI and have the control over all the configuration stuff from my own client program designed in C#.
In my application I want to take the videos (1 or 2 min streams) from 10 IP Cameras and then create a 10 min video. So it is like embedding the videos from all cameras.
My question is - Can I use Onvif for this application ?
I am asking because I only found information about configuration stuff in all Onvif WSDL files. So I got a doubt whether I can use or not. Kindly requesting you to tell me the compatibility of Onvif with my specified application. I would be more glad if you also provide some information on how to make it possible.
You can use Onvif to configure the cameras for use with the application, however you would not use Onvif to actually acquire the video from the cameras.
You can use Onvif to configure the streams (Encoding format, multicast setup, network configuration, etc) and get the Uri for the stream (GetSreamUri), but you would then need to access the RTSP streams directly to get the actual video.
This can be done using something like ffdshow with Direct Show to grab the video from each camera and make a compilation.
Onvif has a Streaming Specification which describes how compliant cameras must implement streaming but it still results in the camera producing a video stream on the network. How clients end up acquiring the video is outside the scope of the specification.
I am looking for an example code on how to capture microphone audio using Naudio + WASAPI.
(I am not interested in direct to disk recording, what i need is to process the input buffer in realtime in order to do some audio effects.)
I've searched a lot, but could not find any decent sample online.
Can you please help?
P.S. BASS library and C# examples are welcome as well!
The NAudio source code comes with a demo app that shows how to capture audio using WASAPI. Look in NAudioDemo\RecordingDemo\RecordingPanel.cs.
MSDN has a lot of code samples, though not covering NAudio they do have a few samples that show in detail how to use the Windows Audio Session API.
Since WASAPI is a native-only API there are both sample projects that show you how to use that API from a native-only app Here as well as samples that show you how to build a native component that wraps the API for consumption from a CSharp application. I couldn't find the direct link to the C#/C++-sample but it's included in the Windows 8 App Samples package. Then there's the option of writing a managed wrapper for the API altogether but unless you enjoy pain and are looking for an adventure in marshaling I wouldn't recommend it...
If you're developing for Windows Phone then there's a VOIP-sample in the WP8 SDK that covers how to capture and render PCM audio data using WASAPI.
As Mark pointed out, the size of the pcm data buffer might differ over time and this is in part due to the fact that WASAPI is a low-latency Audio API and therefore has as little abstraction between the consumer (your app) and the producer (the driver) as possible. Though there's nothing that stops you from doing some fixes size buffering of your own and only pass on the data to your app when your own buffer is full.
Suppose that I want to code an audio filter in C++ that is applied on every audio or to a specific microphone/source, where should I start with this on ubuntu ?
edit, to be clear I don't get how to do this and what is the role of Pulseaudio, ALSA and Gstreamer.
Alsa provides an API for accessing and controlling audio and MIDI hardware. One portion of ALSA is a series of kernel-mode device drivers, whilst the other is a user-space library that applications link against. Alsa is single-client.
PulseAudio is framework that facilitates multiple client applications accessing a single audio interface (alsa is single-client). It provides a daemon process which 'owns' the audio interface and provides a IPC transport for audio between the daemon and applications using it. This is used heavily in open source desktop environments. Use of Pulse is largely transparent to applications - they continue to access the audio input and output using the alsa API with audio transport and mixing. There is also Jack which is targeted more towards 'professional' audio applications - perhaps a bit of a misnomer, although what is meant here is low latency music production tools.
gStreamer is a general purpose multi-media framework based on the signal-graph pattern, in which components have a number of inputs and output pins and provide a transformation function. A Graph of these components is build to implement operations such as media decoding, with special nodes for audio and video input or output. It is similar in concept to CoreAudio and DirectShow. VLC and libAV are both open source alternatives that operate along similar lines. Your choice between these is a matter of API style, and implementation language. gStreamer, in particular, is an OO API implemented in C. VLC is C++.
The obvious way of implementing the problem you describe is to implement a gStreamer/libAV/VLC component. If you want to process the audio and then route it to another application, this can be achieved by looping it back through Pulse or Jack.
Alsa provides a plug-in mechanism, but I suspect that implementing this from the ALSA documentation will be tough going.
The de-facto architecture for building effects plug-ins of the type you describe is Steinberg's VST. There are plenty of open source hosts and examples of plug-ins that can be used on Linux, and crucially, there is decent documentation. As with a gStreamer/libAV/VLC, you be able to route audio in an out of this.
Out of these, VST is probably the easiest to pick up.
I have written an application that receives media files from a central server and plays those files according to a playlist. All works well.
A client has contacted us and wants to use our application to play some audio files as presentations in a kiosk-style application. So far, so good, our application can handle this no problems.
He has requested as a potential feature that we would have a number of headphone sockets at the front of the kiosk. Each headphone socket would play the same audio presentation in a different language.
I have come up with the idea of encoding a single audio file with the presentation in multiple languages, and each language in a different channel. We would then require a sound card that could decode each channel and output it on a different headphone socket.
Thing is, while I'm think the theory is sound, I have absolutely no idea whether this is feasible and what would be required to pull it off.
Any ideas?!
As a side-note: the application uses Media Player as the underlying component to handle the playback of audio and video. I'd appreciate any help as to the software we could use to generate the multi-channel audio stream and the hardware (USB sound card would be fine) that we could use to decode the stream.
Thanks!
You need to use multiple files not channels, its going to be way easier that way.
Instead of using Media Player use DirectShow (on .NET you have DirectShow.NET), In DirectShow you have the notation of Multiple files on the same graph.
You will be able to control to which audio device play which files, and your Play, Pause, Stop commands will be preformed on all files without you need to worry about syncing.
There are many samples on how to build media player like with DiectShow, extending them to use multiple files should be really easy.
For HW take a look at this (USB with 8 output channels)
I think with Shay's hardware you've got a complete solution:
Encode a 7.1 file with a different mono voice track on each channel.
Use the 8 channel output device in 7.1 mode, with a different headset in each port, and you've got it. Or, if you only have 6 languages, a 5.1 file would work. Many PC's have 5.1 outputs built in, you'd only need 3 splitters to break out the left and right channels from each jack.
You can do the encoding with Windows Media Encoder, or other pro audio tool.