Alternative formats for live stream - nest-device-access

Is there a way to get the live stream in alternative formats other than rtsps? Very few things seem to support rtsp over ssl, making it almost impossible to actually access the stream.
It would be great if the stream could also be made available as mjpeg over https, or rtsp.

Gstreamer i use it for RTSP on android, ios, linux, windows & mac. works for my 4 nest cameras + hello doorbell + hub max.

Currently, only RTSPS is supported. I'd suggest trying with ffmpeg, however you may need to build it from source.
If you're having trouble with ffmpeg, you can modify the ffmpeg source to increase control_uri (in libavformat/rtsp.h) size from 1024 to 2048, and recompile. Then ffmpeg should be able to play the RTSPS streams.

Related

Which protocol to use for multi-stream application ? RTMP?

I'm trying to stream several iPad screen to a single python client (computer) on a local network but I don't know which protocol to use.
I can do it with 1 Ipad using MonaServer, an app that stream on RTMP and a little Python script to read the video.
But I am dealing with problems to use several Ipads because as I saw RTMP uses a single port on Windows, :1935 and I am not sure it's possible to multi-stream with RTMP.
I am not a pro with networking, so if you have any suggestions I'm open
What you need is to following the wiki and usage of open source projects, to get some instincts about multiple clients live streaming.
For example, you could use OBS to publish some streams to a media server, like SRS, play it by different protocols like RTMP/HTTP-FLV/HLS/WebRTC.
You could publish multiple streams, they are not mutually exclusive. And play by different players, depends on the protocol you chose, please read this post.
Try it.

HTTP Video Streaming

I have a server (not internet connected) that hosts a webpage with company data on an internal website. The server also contains videos (thousands of them) in a defined directory structure.
When a client connects I can display the videos to them on the internal website. The problem is some of the video files are 1Gb or larger and the connection to some clients is rather slow; the browser seems to be trying to download them in order to play them rather than stream them.
Is there a video streaming server that I could send a file path to and it would serve the video back to the client as a stream?
I guess this is essentially transcoding the video that I need done. I'm not sure if PLEX or something like that is able to do it dynamically as there are hundreds of videos and new videos added all the time.
Sorry if i'm not being clear on my need. Send me a question if I haven't been clear on a point.
...the browser seems to be trying to download them in order to play them rather than stream them.
To echo what #Offbeatmammal said in the comments, if you're using MP4 files, you need to ensure the MOOV atom is at the beginning of the file. Without it, the browser doesn't know what byte offsets to request.
Ideally, encode your video files as fragmented. In FFmpeg:
ffmpeg -i ... -f mp4 -movflags frag_keyframe+empty_moov output.mp4
See also: https://stackoverflow.com/a/9734251/362536
That should allow the client to stream the MP4 files from any web server that supports HTTP/1.1 range requests. (Most all do, unless configured otherwise.)
However, there is another point to address:
The problem is some of the video files are 1Gb or larger and the connection to some clients is rather slow...
While fixing the streaming issue means the clients won't have to download the whole file first, they still need the bandwidth to keep up with the stream. If it's possible they won't, you'll want to implement some sort of transcoder.
I would recommend using an existing segmented streaming method such as DASH or HLS. HLS is currently the most compatible, thanks to Apple's platform policies. Either will enable adaptive bitrate switching, which will allow slow clients to automatically switch to a lower bitrate stream that they can smoothly keep up with. That way, slower clients can still see the video, albeit a lower quality one, while fast clients can get the full quality video.
You can use FFmpeg to do the transcoding and HLS playlist creation.
I'm not sure if PLEX or something like that is able to do it dynamically as there are hundreds of videos and new videos added all the time.
As for when you do this transcode, I suppose it depends on how much load you're looking at. If this is just one or two people viewing the file, you can transcode on demand if your servers can keep up. Ideally, you have at least a couple stream variants around for less popular files, and add more later if needed.
If you're doing this live, I'd recommend doing all of your transcoding up front. You can always prune old files/variants if you need the storage back.

nginx RTMP vs MPEG-TS

I'm trying to figure our what's the best method to receive live streaming video at a server, and making it available back to the client.
I noticed two modules for nginx:
https://github.com/arut/nginx-rtmp-module
https://github.com/arut/nginx-ts-module
It looks like both modules support HLS for video streaming.
What is the difference then between the options?
Apparently you can stream HLS/DASH with both but the nginx-ts-module has fewer features. You can setup both using docker and test which one suits your needs better. I'd almost always go with the simpler option.

MPEG-DASH Encoding for Live Streaming

I want to do encode a live stream for MPEG-DASH in various bitrates and resolutions for live playback.
Everything I found so far either uses only the source resolution (Nimble, nginx-rtmp-module) or seems to be only for VOD streaming(DASHEncoder).
Is it possible to use DASHEncoder with a live input (rtmp stream) and how would I do that?
If not, is it possible to use nginx-rtmp + ffmpeg for what I want to do?
There are several different services available which support such use-cases, like NGINX Plus.
I also successfully managed to run a live stream with Bitmovin and to the best of my knowledge livestream.com is also capable of doing that.

Flex / AIR - Can it receive SYSLOG notices?

Is there a way for Flex / AIR to receive syslog notices from devices such as cisco switches etc? Does anyone know of any information I can read or sites to look at?
If you are talking about calling native methods, flex/air cannot do that. But there is an opensource AIR-Java bridge namely merapi that lets you connect your AIR app with java code. I guess java should be able to do what you are looking for.
AIR apps can read local files. In the case of receiving syslog notices from cisco switches or other devices, I used to set them up on the receiving machine to be added to the local syslog there to have everything in one place (we're not talking windows here :-)). Using mtail and grep I had a few consoles open that showed me what was coming in.
If you write an Actionscript parser to read your local syslog - using bytearray like described here - then it should be possible to read through the whole file and note the interesting bits (I haven't done this myself, so no guarantees!)
If it more a question of getting real time data from devices, I would look into snmp (but you will probably need to write additional stuff in php or python to query the devices for you).

Resources