3

I've got an IP camera that produce a flv stream on a URL like:

http://192.168.0.6/flv?port=1234&app=bcs&stream=channel0_main.bcs

The URL works fine in VLC. I tried to stream the video in Chrome with video.js according to this previous question.

<head>
  <link href="https://vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" />
</head>

<body>
<video id="example_video_1" class="video-js vjs-default-skin"
 controls preload="auto" width="640" height="480"
 data-setup='{"example_option":true}'>
<source src="http://192.168.0.6/flv?port=1234&app=bcs&stream=channel0_main.bcs" type="video/x-flv">
</video>

  <script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script>
</body>

I created the HTML file locally on my desktop and I've got the following error in my browser:

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.

I'm stuck here, I can't figure out why it not displaying the video.

Fifi
  • 3,360
  • 2
  • 27
  • 53
  • The Url you provided is not working for me in VLC so im not able to try and find a solution for you. Could you provide a working url. – Alen.Toma Jan 17 '21 at 18:34
  • The URL is on my local network! – Fifi Jan 17 '21 at 18:35
  • Yes if you could open port 80 or something or even host it somewhere so we could test and see the problem – Alen.Toma Jan 17 '21 at 18:36
  • 1
    I'm not up for opening a port for security reasons. – Fifi Jan 17 '21 at 18:39
  • The question you linked to is pretty old. Specifically, it's pre-CORS, at least as far as browser implementations go. I wonder if serving the stream without SSL (as `http` rather than `https`) is the problem. – Ouroborus Jan 17 '21 at 21:49
  • Since the camera is on my local network, I don't see how I can get the stream in HTTPS. The second thing is that if I enter the stream URL in the browser, it download a flv files. so I guess that not the problem? – Fifi Jan 18 '21 at 06:28
  • In FFmpeg, try outputting as Fragmented MP4 instead of FLV. – VC.One Jan 25 '21 at 22:48
  • @VC.One that sounds interesting. Could you detail more your comment? – Fifi Jan 26 '21 at 16:04

0 Answers0