Web RTC and open CV - opencv

I need to build a web application which creates video call (point to point and conference call) via web RTC. While the video is being live streamed in real time, I've to create a queue of frames and feed it to an algorithm. I plan to use Open CV for this purpose. Is this approach fine or are there better ways to accomplish this?

opencv can't stream out anything on its own.
you'll probably have to dive into ffmpeg / gstreamer for this.

Related

How are videos on Youtube and such sites loaded and how is progress saved?

I hope you are doing well!
I am working on an eLearning website and came across the topic of the video loading. Since videos are of various sizes, it would be impossible to make the user wait for the entire download of the video for them to start watching, so it must be taken as a stream where the video keeps loading content as the user watches (similar to YouTube I guess). However, I am failing to find how this works? I've been recommended the use of SCORM and xAPI to help with this but I am only finding help on how to upload SCORM files or how to write xAPI code and not how to set them up in our website.
How can we make our videos download as the User watches? Are SCORM and xAPI actually what we should be looking for?
For context, we will be using React JS for our Frontend and will be saving the videos on a server.
I would greatly appreciate any advice you have and thank you for your time!
We tried using xAPI and SCORM however we aren't understanding how they might help
SCORM and xAPI by themselves are not going to assist you with this in general. To stream video via an eLearning course you will need to use a video player (such as the HTML5 video player or video.js) that understands streaming video protocols and to encode the video files in a format supported by that player. I would suggest reading about HLS for instance, though I didn't read the entire page, this is a good place to start: https://www.dacast.com/blog/hls-streaming-protocol/
A traditional eLearning course, such as you would have with SCORM, is going to provide a reasonable way to wrap the playing of video such that it can be launched for a learner via an LMS and may capture data such as completion. xAPI is probably suggested because it provides a more robust way of enabling the capture of interaction data such as when the learner plays, pauses, or seeks in a video. My preferred approach for doing this is to leverage cmi5, and there is an example of xAPI video profile usage within a cmi5 course in the Project CATAPULT sample content, see https://github.com/adlnet/CATAPULT/tree/main/course_examples. It could be adapted to leverage something like HLS and get streaming capability. Confirm with your LMS of choice ahead of time whether it supports cmi5 as adoption is still lower than for SCORM.
SCORM Cloud (a bit of a misnomer, https://cloud.scorm.com/) provides builtin video handling via the cmi5 mechanism and will soon support video streaming beyond just from YouTube without the need to author a course separately.

Cam streaming Flash client/widget

I'm looking for a Flash widget that does this: http://i.imgur.com/eRKhvkK.png
That's from a webcam streaming site that does what I need, the four boxes are a screenshot of each step of their widget:
Connecting screen, enable webcam prompt, configure and broadcast with a cam preview, broadcasting window with a cam preview with option to stop broadcast.
It doesn't need to be exactly the same, just something similar. Are there any open-source solutions or packages that offer this that I can use on my website? I'm open to the idea of coding it myself, but I've never touched Flash before, so I'll need help with resources on what I'll need to create such a widget. Preferably there's something out there that does this already, or close to this, that I can modify to meet my needs.
The only thing I found was this: https://github.com/AF83/webcam-streaming -- but it doesn't provide any interface or configuration window, it just starts streaming straight away. I could potentially modify this if there's no other options out there, but I have no idea how to add all of those UI elements, how to hook them together, or what software I need to do so. If this is the only option I have, can you please point me in the right direction in learning how to do that (I use Windows 7 64bit).
Thank you!
I have exactly what you need : an open source publisher in flash with video preview. The source code is on github at https://github.com/MonaSolutions/MonaClients/.
This is our sample and it work with MonaServer installed on our raspberry pi, this is good for testing but for production you will need to install an RTMP or RTMFP server. If you want to use MonaServer you can go to our installation page or download the windows binary from sourceforge : http://sourceforge.net/projects/monaserver/files/MonaServer_Windows_32.zip/download
Then if you want to modify the source code and implement a better-looking client you can use FlashDevelop, it's free and complete.
For information it is also possible to broadcast with WebRTC and HTML5 rather than RTMP/RTMFP and Flash.

Streaming opencv Video

I need some ideas about how to stream video feed coming from opencv to a webpage. I currently have gStreamer, but I don't know if this is the right tool for the job. Any advice on using gStreamer or any hyperlinks to tutorials would be helpful and appreciated!
Thanks!
OpenCV doesn't provide an interface for streaming video, which means that you'll need to use some other techonology for this purpose.
I've used GStreamer in several professional projects: this is the droid you are looking for.
I do not have any experience w/ streaming OpenCV output to a website. However I'm sure this is possible using gstreamer.
Using a gstreamer stream, it is possible to get data and convert the data in to OpenCV format. I recommend you read up on GstAppSink and GstBuffer.
Basically, if I remember correctly, you must run a pipeline in the a background thread. Then using some function in gst_app_sink, you can get the buffer data from the sink.
A quick lookup on the issue, you had to use GST_BUFFER_DATA for this
I remember having to convert the result from yCBCr to bgr, a collegue had problems as the conversion of opencv was inadequate. So you might have to write your own. (This was back in the IplImage* days)

iOS Audio Service : Read & write audio files

guys.
I'm working on some audio services on iOS.
I trying to search any examples or tutorials about
how audio service or stream can read a existing audio file than
process something like filter, than write another file.
Is there any body who can help me?
Dirac3LE (by Stephan M. Bernsee) is a great library for this job.
There are examples and manual included in the download.
It is particulary inteded for time and pitch manipulation
but in your case you'll be interested in its EAFRead and EAFWrite
classes.
If you want to get familiar with the lower level library that you can also use for microphone input/sound output, and that you can get raw samples into and out of, I would suggest taking a look at Audio Queue Services.
I used it in my side project to get audio from the microphone, and I also wrote some code you might find useful to do fast vectorized, FFT based FIR filtering on input audio. You can find the code here https://github.com/jamescarlson/FreeAPRS

Snapshot using vlc (to get snapshot on RAM)

I was planning to use the vlc library to decode an H.264 based RTSP stream and extract each frame from it (convert vlc picture to IplImage). I have done a bit of exploration of the vlc code and concluded that there is a function called libvlc_video_take_snapshot which does a similar thing. However the captured frame in this case is saved on the hard disk which I wish to avoid due to the real time nature of my application. What would be the best way to do this? Would it be possible without modifying the vlc source (I want to avoid recompilation if possible). I have heard of vmem etc but could not really figure out what it does and how to use it.
The picture_t structure is internal to the library, how can we get an access to the same.
Awaiting your response.
P.S. Earlier I tried doing this using FFMPEG, however the ffmpeg library has a lot of issues while decoding an H.264 based RTSP stream on windows and hence I had to switch to VLC.
Regards,
Saurabh Gandhi

Resources