H.264 live stream URL?

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
I can't figure out how to set up live stream URLs.
I can directly stream from the cam with rtsp://[username]:[password]@[CamIPaddress]:[port]/s1

How do i do it in BI?

That also brings up another question:
To how many clients can you directly stream from a cam? There must be a limit.
In no cam specs i see that.
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,851
Reaction score
39,213
Location
Alabama
I can't figure out how to set up live stream URLs.
I can directly stream from the cam with rtsp://[username]:[password]@[CamIPaddress]:[port]/s1

How do i do it in BI?

That also brings up another question:
To how many clients can you directly stream from a cam? There must be a limit.
In no cam specs i see that.
First, I'd try using HTTP as below, assuming RTSP port is 554; if not change from 554 to the cam's RTSP port.
These entries can change depending on the order you fill out, so insure it's as you want before you click 'OK".
I'd start with the 'Make' dropdown menu where you select 'Generic' and the 'Model' where you select 'RTSP H.264/H.265/MJPG/MPEG4'.

If that fails, try the second suggestion, wherein you use RTSP in the URL. Again, insure you have the correct RTSP port entered (usually 554).

FIRST:

RTSP_URL_031218_1.jpg

SECOND:

RTSP_URL_031218_2.jpg
 

JonW

Young grasshopper
Joined
Apr 4, 2017
Messages
38
Reaction score
19
I can't figure out how to set up live stream URLs.
I can directly stream from the cam with rtsp://[username]:[password]@[CamIPaddress]:[port]/s1

How do i do it in BI?

That also brings up another question:
To how many clients can you directly stream from a cam? There must be a limit.
In no cam specs i see that.
That complete depends on the camera. You probably won't find it in the GUI of the camera. Look for technical documents. Sometimes it's just not posted.
 

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
Sorry Tony we have a misunderstanding.

I have the cam showing up/working in BI.
What i need is the URL/Setup to stream the cam from BI to another device/client.

I saw now that the Dahua cams have in the specs:
Max. User Access: 10 Users/20 Users
Streaming Capability: 3 Streams

What does that mean? That 10 users (or 20?) can watch 1080p full FPS and max bitrate at the same time?
But then say have H.264 and H.265...
Maybe 10 with H.264 and 20 with H.265?
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,851
Reaction score
39,213
Location
Alabama
Sorry Tony we have a misunderstanding.

I have the cam showing up/working in BI.
What i need is the URL/Setup to stream the cam from BI to another device/client.
Wow...you ARE right, I misunderstood.

Anyway, 2 things:
1) What is cam make/model # ?
2) Please post screen shot of your cam config page that works with BI (the page similar to what the first image looks like in post #2).

I saw now that the Dahua cams have in the specs:
Max. User Access: 10 Users/20 Users
Streaming Capability: 3 Streams

What does that mean? That 10 users (or 20?) can watch 1080p full FPS and max bitrate at the same time?
But then say have H.264 and H.265...
Maybe 10 with H.264 and 20 with H.265?
Sounds about right, but I'd still like that model # and the screenshot.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
I have the cam showing up/working in BI.
What i need is the URL/Setup to stream the cam from BI to another device/client.
Look in Blue Iris's help file, The Web Server section. At the bottom it lists the methods you can use to stream video from a Blue Iris camera. I recommend .ts if you're going into VLC or something, or .m3u8 if you need to send it to a browser since that format can be fed into JavaScript players like clappr/clappr

There are also jpeg snapshot and mjpeg streaming modes. But Blue Iris doesn't serve RTSP so if you need RTSP you need to pull that directly out of the camera or you need other software.

There are also a few video "push" methods in camera properties > Webcast tab though I don't know anything about how to use them.

Beware that pretty much all of Blue Iris's re-streaming abilities currently involve transcoding the video which is an expensive process. It takes a lot of CPU, degrades the video quality, and for the most part reduces the resolution to 1280x720 (or smaller depending on aspect ratio) due to a very long-standing bug in the encoder settings.

I saw now that the Dahua cams have in the specs:
Max. User Access: 10 Users/20 Users
Streaming Capability: 3 Streams

What does that mean? That 10 users (or 20?) can watch 1080p full FPS and max bitrate at the same time?
But then say have H.264 and H.265...
Maybe 10 with H.264 and 20 with H.265?
Hard to say. 3 streams could mean that it has 1 main stream and 2 sub streams. It doesn't take much extra resources for the camera to stream the same video to an extra client or two or three. In fact it should be the same for H.264 and H.265. So I have no idea what "10 Users/20 Users" means.
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,851
Reaction score
39,213
Location
Alabama
An excerpt of BI URL's:

In addition to serving HTML pages, Blue Iris can also act as a "video server." There are a number of methods for retrieving images and video from the Blue Iris web server for use on mobile devices, converting a USB camera into a web camera, or for any other purpose. Here are the paths to these methods:

/mjpg/{cam-short-name}/video.mjpg An M-JPEG stream. This stream is compatible with Blue Iris's "MJPEG stream request."

/h264/{cam-short-name}/temp.h264 Pull a raw H.264 stream (MIME type video/H264). This stream will play in a tool like VLC, and may be used in future versions of the ActiveX control.

/h264/{cam-short-name}/temp.ts Pull an MPEG-2 transport stream (MIME type video/MP2T).

/h264/{cam-short-name}/temp.m or .m3u8 Pull a virtual M3U8 file (MIME type application/vnd.apple.mpegurl). This will play in QuickTime, iPad and the iPhone using the Apple HLS (HTTP Live Streaming) format.


This first one (mjpg) works for me using VLC, URL below.
Code:
http://My BI server IP:port/mjpg/Cam3/video.mjpg
The next 3 (H.264) do not, they'll freeze or display strange artifacts, likely needs tweaks to encoder settings, which is up to you to try.
 

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
@Tony, what i posted as example are the specs from the IPC-HDW5231R-Z:
Aliexpress.com : Buy Starlight 2.7mm ~12mm motorized lens 2MP WDR IR Eyeball Network Camera IPC HDW5231R Z ,free DHL shipping from Reliable network camera suppliers on Empire Technology Co., Ltd

At the moment i have just a Ubiquiti G3 (they have a big WAF) for testing until i order the Dahua.
The G3 has 1920p, 1024 x 576 and 640 x 360 but nowhere how many streams at the same time.

Until now i always thought the right way is to stream from the NVR to all the clients because of resolution, fps and bitrate control (saving bandwidth). But if this always means re-encoding...

Lets say i want to record 1920/10fps/3000Kbps but want to stream 1920/15fps/6000Kbps to a viewing device in my LAN? Now it seams to me that is not possible without re-encoding.

Or if i want to stream outside in another bitrate because my internet connection upload is not the best?
Or if I'm in my LAN (WLAN) i have more bandwidth and the resolution can be higher than over G4.

EDIT:
I just realized that streaming outside directly from the cams would mean you have to give every cam another port and forward them in the firewall.

EDIT2:
mjpg, ts and M3U8 work but without audio...
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
You shouldn't port forward to cameras. That is how they get hacked. In fact turn off "UPnP" if it is enabled (in your cameras AND in your router) because that "feature" allows the cameras to forward ports to themselves without your knowledge, and they get hacked even more easily that way.

Mjpeg format is inherently incompatible with audio.

I can't say why you don't get audio. I know the .M3U8 stream can have audio in it, you get it just fine if you play it in the clappr player I linked earlier. My UI3 beta distribution has a "livestream.htm" page which demonstrates this.

Technically the .m3u8 is just a set of instructions to the player telling it where to retrieve a series of .ts files. So I'm pretty sure Blue Iris's .ts encoding ability is capable of audio as well.
 

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
In fact turn off "UPnP" if it is enabled (in your cameras AND in your router) because that "feature" allows the cameras to forward ports to themselves without your knowledge.
I know that. I'm a pfSense user :)
 

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
1. I want to record 1080p with 10 fps to save disk space (i believe 10 is enough)
2. In my LAN/WLAN for live view i want to stream 15 fps (some clients 1080p and some 720p)
3. On my phone when not at home (G4) i'm unsure what resolution, fps, bitrate would be the best.

In TinyCam i see there is "Low-bandwidth profile", you can set your "Home WiFi Network" and enter another stream for public WiFi and 3G/4G.
I'm unsure what the "Low-bandwidth profile" does.
Let's say i'm at my friends house with WiFi and want to see 1080p in all it's glory...
Also it's a difference if i'm only viewing 1 cam's or 3 (bandwidth)...

In the BI webserver i don't see a option to say 720p - you can only limit the bitrate on the streams...
But if i open BI in the browser and show "Stats for nerds" the stream is just 720p?

The Dahua cams have:
Main Stream: 1080P (1~50/60fps)
Sub Stream: D1 (1~50/60fps)
Third Stream: 1080P (1~25/30fps)

So i guess you take one stream for recording (1080/10fps), one for live view in the LAN (1080/15fps) and another one for 720/15fps is not possible.
So if you need a stream for a client where 1080 is to much then you have to take D1 - also for public WiFi and 3G/4G?

Maybe i have a fallacy and other people do it completely different.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
It isn't easy to record and live view at different frame rates, especially when you want to live view at a higher frame rate. This would require disabling direct to disk so you could reduce the recording frame rate to 10 FPS, or adding each camera twice (one stream at 10 FPS and another at 15 FPS), and either way will raise CPU usage far beyond where it should be. Besides, what controls disk usage is bit rate, not frame rate. You can use exactly the same bit rate for 10 FPS as you do for 15 FPS with only a small difference in image quality.

Blue Iris has a bug where the "Resize output frame" option in the H.264 encoder settings doesn't do anything, and single-camera streams always come out at 1280x720 (or less if not 16:9 aspect ratio). This is why you see 1280x720 in UI3's Stats for nerds. Group video streams come out at the resolution you set for them, so I can't see any reason for this to still be happening with single cameras. Heck I don't know, maybe its intentional, as I've been telling Ken about it for about 6 months without a fix or even any kind of acknowledgement.

I just do all my remote viewing through Blue Iris. Though the encoder settings are currently a bit gimpy without a working resolution setting, you can still set up the 3 encoder profiles with different bit rates so you can choose whatever is most appropriate for your current connection.
 

MrGlasspoole

Young grasshopper
Joined
Mar 10, 2018
Messages
66
Reaction score
17
I found this table:
A Bit on Bit Rates

And i also downloaded the Dahua Disk Calculator.
I wonder about the bitrate that the calculator buts in as default - seems really low.
H.264/3MP/15fps = 2048 ??

Then Dahu has Smart H.264/5+
Is that just another word for VBR?

I also did read the IPCamTalk Cliff Notes.
Under HDD Recommendation the example is recording 1080, 720 and D1.
Why would somebody also record the sub streams?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
That is a pretty good article.

I think H.264+ and H.265+ serve a similar purpose as VBR, but they are not VBR. These are customized versions of the video codecs which are not compatible with Blue Iris or most other players.

I don't know why someone would record a main and sub stream from the same camera onto the same device unless it is something like motion-recording only for the main stream, but continuous recording of the sub stream to fill in the gaps with less disk usage than full-time recording the main stream would cause.
 
Top