I had a v380 camera at home for some time. It is not a standard CCTV camera. Recently I decided to check if I can get the video stream out of it as it does not provide a standard RTSP strem.
After a quick search on github, I came acoss this repository and using it I was able to get the h264 stream out of it.
The process is simple.
Clone the repo.
$ git clone https://github.com/prsyahmi/v380
Build the tool, (with the latest commit it does not build on linux it needs to be reset to a previous commit).
$ git reset 89b15f7d45085b136c8d4ac0304ce20cf7342ae4 $ cd v380 $ make
Use this tool to get h264 data and display it on the screen.
$ ./v380 -u <username> -p <password> -id <id-on-bottom-of-the-camera> -addr <camera-id> | ffplay -vcodec h264 -probesize 32 -formatprobesize 0 -avioflags direct -flags low_delay -i -
The first command will get the
h264
data from the camera and print it tostdout
. The second commandffplay
reads the input fromstdin
(-i -
part) and displays it.If you need rtsp stream, you can use rtsp-simple-server.
To use
rtsp-simple-server
, you can download and extract the binary from github repoNow run the
rtsp server
../rtsp-simple-server
Now that we have the rtsp server/relay running, let’s use it for the camera stream. We need to use the same
v380
tool$ ./v380 -u <username> -p <password> -id <id-on-bottom-of-the-camera> -addr <camera-id> | ffmpeg -re -i - -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f rtsp rtsp://localhost:8554/stream1
Once this is done we are actually extracting the
h264
data from camera and streaming it over rtsp through the local rtsp server that we have setup. To play the rtsp stram, you can simply usevlc
orffplay
$ ffplay rtsp://localhost:8554/stream1 # or $ vlc rtsp://localhost:8554/stream1