User Tools

Site Tools


solutions:video_stream_using_rpi_as_proxy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
solutions:video_stream_using_rpi_as_proxy [2021/08/04 10:05] atolstovsolutions:video_stream_using_rpi_as_proxy [2022/01/15 01:30] (current) – ↷ Links adapted because of a move operation 127.0.0.1
Line 1: Line 1:
-==== Intro ====+{{ network:video_proxy_my_icon.jpg?nolink&150|}} 
 +====== Video stream proxy ====== 
 + 
 +===== Intro =====
  
 Nowadays, IP camera's manufacturers do not provide unauthorized access to video stream due to security reasons. To use videostream in WebHMI it should be without login/password to access. Also, using a server in between PC and IP Camera will allow access from many users, what is a true broadcast, unlike direct IP camera connection, which is usually limited to 10 users.  Nowadays, IP camera's manufacturers do not provide unauthorized access to video stream due to security reasons. To use videostream in WebHMI it should be without login/password to access. Also, using a server in between PC and IP Camera will allow access from many users, what is a true broadcast, unlike direct IP camera connection, which is usually limited to 10 users. 
Line 8: Line 11:
  
  
-==== Devices prerequisites ==== +===== Devices prerequisites ===== 
-=== IP Webcam testing app ===+==== IP Webcam testing app ====
  
 If there is no IP camera at moment, you can use [[https://play.google.com/store/apps/details?id=com.pas.webcam|IP Webcam]] to test WebHMI videostream (as it is not ecrypted be default) or VLC transcoding if you want to substitute phone with IP camera later after testing.  If there is no IP camera at moment, you can use [[https://play.google.com/store/apps/details?id=com.pas.webcam|IP Webcam]] to test WebHMI videostream (as it is not ecrypted be default) or VLC transcoding if you want to substitute phone with IP camera later after testing. 
  
  
-Any IP camera, that can show stream using rstp:// or http:// protocol.+Any IP camera, that can show stream using rtsp:// or http:// protocol.
  
 You can see the links at IP Webcam app screen. When the IP Webcam server started, it has default cgi access via link <code> http://phone-ip:8080/video</code> You can see the links at IP Webcam app screen. When the IP Webcam server started, it has default cgi access via link <code> http://phone-ip:8080/video</code>
  
  
-=== IP camera CGI setting ===+==== IP camera CGI setting ====
 By default, cgi should be enabled manually in settings.\\ By default, cgi should be enabled manually in settings.\\
 ''Hikvision: Configuration, Network, Advanced Settings, Enable Hikvision-CGI. Then create a cgi user.''\\ ''Hikvision: Configuration, Network, Advanced Settings, Enable Hikvision-CGI. Then create a cgi user.''\\
Line 65: Line 68:
 </code> </code>
  
-For example let's use login and password with IP camera' IP, using RSTP protocol (through 554 port) and transcode the full resolution stream to 192.168.1.3:8888 which is Raspberry Pi server and custom port 8888.+For example let's use login and password with IP camera' IP, using RTSP protocol (through 554 port) and transcode the full resolution stream to 192.168.1.3:8888 which is Raspberry Pi server and custom port 8888.
  
 <code bash test_transcode_stream> <code bash test_transcode_stream>
Line 91: Line 94:
 There are some variants to try to optimize performance  There are some variants to try to optimize performance 
  
-  * Crop the output resolution+  * Decrease IP camera stream resolution 
 +  * Lower transcode output resolution 
 + 
 === Lower picture resolution ===  === Lower picture resolution === 
 <code bash> <code bash>
-#full crop +#full resolution
 cvlc -Idummy http://login:password@ip-address:80/link_to_stream --sout "#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}" cvlc -Idummy http://login:password@ip-address:80/link_to_stream --sout "#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}"
 cvlc -Idummy rtsp://http://login:password@ip-address:554/link_to_stream --sout "#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}" cvlc -Idummy rtsp://http://login:password@ip-address:554/link_to_stream --sout "#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}"
  
-#width crop +#transcode to lower resolution 
 cvlc -Idummy http://login:password@ip-address:80/link_to_stream --sout "#transcode{vcodec=MJPG,vfilter=canvas{width=640,height=480}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}" cvlc -Idummy http://login:password@ip-address:80/link_to_stream --sout "#transcode{vcodec=MJPG,vfilter=canvas{width=640,height=480}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}"
 cvlc -Idummy rtsp://http://login:password@ip-address:554/link_to_stream --sout "#transcode{vcodec=MJPG,vfilter=canvas{width=640,height=480}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}" cvlc -Idummy rtsp://http://login:password@ip-address:554/link_to_stream --sout "#transcode{vcodec=MJPG,vfilter=canvas{width=640,height=480}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/}"
solutions/video_stream_using_rpi_as_proxy.1628071547.txt.gz · Last modified: 2021/08/04 10:05 by atolstov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki