I finally got a live stream of the kitten camera, on the cheap. This turned out to be a bit harder than it is generally understood. As I wanted to stream 7/24 un-attended and not just for a period of time from a Phone Cam or upload something after the fact. My first attempt was to use a Raspberry Pi Camera with ffmpeg to stream to YouTube. Only to find that YouTube kept deactivating it after a while. I believe it was from the audio. Apparently they don’t like silence, or all baby kittens are generally copyrighted. In the end it did turn out to rather simple, due to a luck find. If you are not interested in the why’s, how’s, and failure’s skip to the “What Worked”
A few primer items:
- Youtube accepts RTMP, which a video source pushes.
- Youtube requires a 24 hours grace period, from the time of application for streaming to when they allow you.
- Likewise Facebooks accepts RTMPS, which a video source pushes. The S is for secure, likely SSL.
- Most camera’s don’t push either of these but rather accept a pull of RTSP. This would typically be from a DVR or remote DVR like Web Server that is trying to store the video.
- Web browsers don’t pull RTSP. There is a lot of JS scripts to pull and convert RTSP via VLC or FlashPlayer. But that would require a Hosting Web Server and some JS code.
- HTML 5 web browsers accept HLS stream, as Flash is being deprecated. Again there are JS code to convert RTSP to 5’s HLS <video> tag.
- It appear that most people use OBS to pull in, mix and send out to FB, YT, Twitch, etc…
- I did not want to tie-up a whole PC 7/24 for this.
- All of the blog’s (at this time) are out of date about subtle things that FB and YT settings.
- It looks like since OBS’s dominance that ffmpeg has not been kept up as to be compliant with YT and such.
What did not Work and Why:
As mentioned my first try was using a Raspberry Pi with ffmpeg and a big long set of arguments to convert the camera and send the Pi Cam to Facebook. It appears that not all architectures of ffmpeg are up to date with supporting a bug free version of RTMPS. As current build would fail to compile for the Rpi and or work.
I could get it to connect and stream briefly to YouTube via RTMP. But only after I mixed in an Audio. Without a sound track it would fail to be recognized by the Stream Manager as valid. Other online examples would mix in 0x00 to the ffmpeg. Which they claimed worked. However, this appears to have changed as this would then get DRM denied very quickly. It sounds like the sound of silence is copyrighted, or at least YouTube’s AI thinks’ so. Yes, the Pun was intended. So I then found the YouTube Audio Free Library, picked something that was free and clear of copyrights, downloaded and mixed it into the ffmpeg stream. This time it lasted for about 8 hours before it was flagged again and pulled. I changed do a different DRM free track and put in the comments credits and exactly where it came from. And that lasted 3 minutes.
Moving on, I purchased a relatively inexpensive ReoLink E1 Zoom with PTZ, that claimed it could live stream. Where I find they all say this and they all are very elusive as to how. What I found was most all like this support the RTSP for DVR’s. Or would FTP up files of the video, email notices if their was movement. They all quickly divert to saying that one needs to open the RTSP port on the outside firewall and some sort of DVR. And by the way; kitten don’t stop moving. So ReoLinks free 1G cloud storage filled up quickly. And this still was not streaming.
Opening the RTSP port from the outside of the home router’s firewall as stated and forwarded to the camera, at least allowed for Cell Phone APPs that support RTSP, when configured with the web page address, path, username and password, could then see them. While there are plenty of these apps out there, they are not very user friendly and could quickly overload my upload throughput, if too many viewers connected in.
After a lot of searching I found https://rtsp.live a online service that was basically the answer. In the simplest form. From their initial webpage, fill in the web page address of the RTSP camera with its path, username, password and an email. Upon Enter full URL is displayed that can view the camera, along with a embedded HTML code of it and a user account is emailed to manage the account. As the first level of no storage was free, it fits my goals. So as Bob is not my uncle this turned out to be fairly easy. But only after a very bumpy “Just-In-Time Learning” cycle and many failed attempts.
Making it even simpler for users
I already owned several FQDN’s. I found that my goto FQDN’s DNS provider does not support URL re-direction to FQDN with a path. But I did find that NameCheap does for another name I already have. So I simply pointed http:// kittens .flaga.org to https://rtsp.me/embed/HEYrkZrb/ and done.
I suppose I could go back and craft a different ffmpeg set of arguments that would convert the Rpi’s camera to be pulled by a RTSP DVR. However, it is done and working. And the kittens will be adopted to their forever home in a few weeks.
The small print:
I did track down that rtsp.live is an alias for rtsp.me. - Ok.
I also did find that rtsp.me is located in Moscow. – Hmm.
I am also seeing that rtsp.me is pretty low on the black list of URLs. Work’s McAfee is blocking rtsp.me and rtsp.live. But not my “kittens.flaga.org”, yet. So I am not sure if this will eventually hurt flaga.org’s black list rating.
So it may be more likely that some black hat is trying to hack my camera. And will try to mess with some election somewhere.
The rtsp.me nginx server is having issues. It regularly is displaying garbage and 504 gateway timeouts but it does seem to recover after a while.
Did I mention that it was free.
Things to Do:
Configure a Guest WLAN on my Home Router, as to have camera and the port forward isolated from rest of home network.
Find another alternative to rtsp.me. I don’t want to pay to spin up a Web Server on Digital Ocean or AWS to run the RTSP to HLS web page. And then maintain it.
Buy another DNS for real cheap and change over that. As to avoid any black list ratings issues.