https://github.com/angrycoding/rtsp2mpeg1
rtsp2mpeg1
https://github.com/angrycoding/rtsp2mpeg1
Last synced: 10 months ago
JSON representation
rtsp2mpeg1
- Host: GitHub
- URL: https://github.com/angrycoding/rtsp2mpeg1
- Owner: angrycoding
- Created: 2020-09-03T21:50:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T20:37:50.000Z (over 2 years ago)
- Last Synced: 2025-04-09T18:14:34.265Z (10 months ago)
- Language: JavaScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to display video from your IP - camera in web - browser
So you've got ip - camera and now you want to show video from it on the web page right? But this doesn't really work because you don't know how.
Well any ip - camera has [RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol) url (url that is bound to it's internal server that can stream video out of it). First of all you'll need to get
RTSP url somehow.
You can do that using [ONVIF](https://en.wikipedia.org/wiki/ONVIF) [device manager](https://learncctv.com/onvif-device-manager/) or just look at your ip camera manual (hopefully you'll find it there),
you're looking to something like this:
```
rtsp://192.168.1.105:554/user=admin_password=x761219pQsVnr2VS_channel=1_stream=0.sdp
```
Once you get there, the rest is easy, just open your favourite text editor and type something like:
```
```
Haha I'm kidding, it's not going to work because you can't just display RTSP stream from the camera in HTML5 video element, it's just not going to work.
The reason why it's not working is because HTML5 video can only display something MPEG based, MP4, MOV, MKV - all this is just a containers for H264 codec format.
So our next step will be to convert RTSP in something that browser can understand and render in HTML5 video tag. To keep it really simple we will use [MPEG1](https://en.wikipedia.org/wiki/MPEG-1)
this time. So mpeg1 is just very ancient and simpliest variation of video compression algorithm that is in the mean time understandable by the web - browser and can be relatively simple produced
out of RTSP stream that's coming out of the camera.