[FFmpeg-user] video streaming using rtsp link over global network on my web application

Vijay Prajapati fw08 at teksun.in
Tue Sep 24 20:25:56 EEST 2019


Dear ffmpeg team, Greetings !! I am building an web application that
requires to stream a recorded/live video over the global network. I
purchased an IP camera(GV-AVD4710) and NVR(GV-SNVR0811) for our
application. I need help here in two type of application, With NVR and
without NVR. In Camera With NVR, I have connected the NVR in our local
network and the camera at channel_1 of NVR. Now the lets assume NVR is
getting an IP of 192.168.1.203. So for rtsp streaming URL for channel_1
will be "rtsp://id:password@192.168.1.203:554/ch1" as per manufacturer's
specification. For camera streaming I am using "ffmpeg" multimedia
framework(https://github.com/xpcrts/Steaming-IP-Camera-Nodejs ). So it is
working fine. I tested it and working well in local network. When I made
this IP address live (means made it available on public domain), and then
the problem begins. It is not working and giving an error: "[tcp @
0x563911f0a340] Connection to tcp://192.168.1.205:554?timeout=0 failed:
Connection timed out rtsp://admin:admin@192.168.1.205: Connection timed out
RTSP stream exited with error" In Camera Without NVR, I connected camera
directly to our local network and so got an rtsp url like rtsp://
id:password at 192.168.1.205/media/video1. Same happens again. Works well in
local, but not working when I am making this live. How can stream video
over global network? Is it possible to implement these logic using ffmpeg
multimedia framework?

I have attached my application diagram, codes and error snapshots in below
attached file. It would be appreciated if you can guide me in my
application.


Thanks & Regards,

Vijay Prajapati

Embedded Firmware Engineer | Teksun Microsys Pvt Ltd

Web : www.teksun.in         | USA: +1 405 404 4162

Direct : +91 851136755     | India : +91 7923299559

ISO 9001:2015 Certified Company | Product Design Engineering | Hardware|
Firmware |

Application Software | Cloud | Web | Mobile | IoT |Big Data | AI |
Prototype | Production |

Feasibility Study | Research | Product Roadmap | Automotive | Wearable |
Tracking |

Healthcare | Semiconductor | Embedded

The content of this email is confidential for the recipient specified in
message only. It is strictly forbidden to share any part of this message
with any part of this message with any third party without consent of the
sender. If you received this message by mistake, please reply to this
message and follow with its deletion, so that we can ensure such a mistake
does not occur in the future.
-------------- next part --------------
1) Code running on the server

Stream = require('node-rtsp-stream')
stream = new Stream({
    name: 'name',
    streamUrl: 'rtsp://ID:PASSWORD@abcxyz.com:554/ch1',
    wsPort:3000,
    ffmpegOptions: { // options ffmpeg flags
        '-stats': '', // an option with no neccessary value uses a blank string
        '-r': 30 // options with required values specify the value after the key
    }
})

2) Code running at client side which is independent of any plug-ins:   
<div>
       <canvas id="chanel1" width="auto" height="auto"></canvas>
       <script type="text/javascript" src="jsmpeg.min.js"></script>
       <script type="text/javascript">
            var canvas = document.getElementById('chanel1');
            var websocket = new WebSocket("ws://34.202.222.188:3000");
            var player= new jsmpeg(websocket, {canvas:canvas, autoplay:true, loop:true})
       </script>
</div> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: application.png
Type: image/png
Size: 29964 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190924/1f540187/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: err.png
Type: image/png
Size: 15294 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190924/1f540187/attachment-0001.png>


More information about the ffmpeg-user mailing list