I want the url of Motion WebCam Streaming Server to be changed - url

I'm streaming video with Raspberry Pi, webcam and Motion
One thing I want to do is change the format of the url where the streaming plays
It was originally 192.168.0.1:8081 -> 192.168.0.1:8081/?aaa I want to change it to get format
If there's a way to change it in the Motion.conf file or another way, please let me know

Related

AVSampleBufferDisplayLayer plays too fast

So I have put together a sample project https://github.com/liuxuan30/TestH264.git that uses VideoToolBox to have a H264 sample decoder to display a stream file, captured from a camera.
The H264 decoder using VideoToolBox is copied from internet, I didn't write it, when I tried to play my h264 stream file, it plays too fast, comparing to ffmpeg or ffplay, which both played back at a normal speed.
I wanted to ask, how to fix this behaviour? Thanks.
This happens because of this constant kCMSampleAttachmentKey_DisplayImmediately:
If this key is present, the sample should be displayed as soon as possible rather than
according to its presentation timestamp. Use this attachment at run time to request this
behavior from a display pipeline such as the AVSampleBufferDisplayLayer class.
This attachment is not written to media files.
from Apple documation
So you have two options of displaying:
Display immediately - which is probably good for real-time stream, when you need to display frame as soon as possible
Display frames at specific timestamp
*comparing to ffmpeg or ffplay, which both played back at a normal speed.
ffplay and ffmpeg probably use timestamp at this point.
I have same result as you from your test H.264 file, but it's happens because you get all decoded frame at once so decoder is displaying it immediately.
You can watch this video for more information about VideoToolbox framework:
Direct Access to Video Encoding and Decoding

Real time audio recording in Swift

I am building an application which needs to do real time audio recording. I am using Swift for the project - so unable to use Novocaine library (as it has some Obj-C++ code).
What I need is get small chunks of the audio recording (real-time) which I can process or send to my websocket. Is there a Swift library that I can use to achieve this?
In addition to getting the live audio from the microphone, I also need to show a real time waveform.
Start recording
Get an event every for few bytes of recorded data, where I can send these bytes to my websocket.
Showing a waveform for the audio.
Let me know.
You do not need any of 3-rd party tools for getting audio from mic. It can be set up easily using AVAudioEngine. However, for minimising network traffic I suggest to use lame for compressing raw PCM audio stream into mp3.
Here you can find project with minimal functionality for getting mic input and compressing into mp3. In this example project mp3 stores into Documents folder, so you can try and listen to make sure it works.
From this point you can take mp3 buffer and send via socket. You can also play with lame settings to change quality, etc.
There is another branch called no-lame where same functionality implemented without lame encoding. Look here

Nest Camera Stream / Dropcam to OpenCV

I was wondering if there is a way to use the web_url function available from the nest camera, which returns an embedded flash video of the camera stream, to download the video into a buffer, from which I could do any analytics upon with OpenCV, e.g. face detection.
I don't know if saving the video from the embedded flash into a buffer is the way to go (how would I do this?); or if there's some way to access the stream from openCV as you can do with typical IP cameras?
web_url simply gives the URL to the page on home.nest.com. The user has to be logged in. Nest Cam is not an IP camera and streams are not currently available via the API. You would need to write something to scrape the web page at home.nest.com that would be able to stay logged in.

wansview ip camera stream url for openCV

I have just bought an wansview IP camera model NCM630GB. I am able to play it video stream in browser but i am not able to open its in open CV using video capture object. I have tried different solution already present on stack overflow but the actual problem is getting url of video stream. Can anybody tell what is the videostream url of wansview IP camera or any method to find it.
According to their documentation (page 22), the url should be:
http://IP address:port/videostream.asf?user=user name&pwd=password
Try it with VLC to see if you can get the stream. If succeed, then in OpenCV, append x.mjpg to the url, like this:
http://IP address:port/videostream.asf?user=user
name&pwd=password?x.mjpg

How to acquire image stream from RTSP camera through HTTP?

I was wondering if I can use an HTTP protocol to acquire an image stream from an RTSP camera? I am currently using VLC Media ActiveX Plugin to connect to and view the RTSP stream, but I would like to eliminate the ActiveX control and move to a more raw level of image acquisition. I recall seeing somewhere that it's possible to get these images using HTTP. I'd like to use Indy TIdHTTP component to connect to the camera and acquire the image. I'm also assuming this would need some sort of speed control, such as a delay in-between requests. However, it's also my understanding that these RTSP cameras have pre-defined frame rates, which using the standard RTSP protocol are supposed to follow.
many cameras will allow you to grab screenshots with a URL that might look like:
http://user:password#camera/snapshot.jpg
for a proper stream, you would need to use RTSP (there are Delphi RTSP clients), tunnelling over HTTP if your device supports the application/x-rtsp-tunnelled content type, or another stream your device supports.

Resources