Using VLC to watch RTSP streams, I can only view CIF resolution (352x240) - why?

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Been having trouble viewing RTSP streams from my LTS/Hik gear and I finally figured out the key variable: video resolution.

I can view the sub-stream as configured below; if I increase the resolution to the next option up, 640x360, VLC connects but gives me a black screen.

The main stream has the same problem at all available resolutions, a black screen on connection.

Is there something buried in the camera settings that I have missed which will make VLC happy? Or is there an alternative RTSP player that won't have these problems?

Thanks if you have any ideas!

upload_2019-2-22_11-47-48.png
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
The same, h.264. It's the only option offered on my camera.

I think if I do a firmware update on the cameras I can get "h.264 zip plus" as an additional option, but I can't tell if it is a standard or proprietary BS so I have not messed with it.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
The same, h.264. It's the only option offered on my camera.
OK, so maybe see what ONVIF Device Manager (sourceforge.net) makes of the video stream.
And check if the RTSP URL (bottom of the Live Video page) matches what you've used in VLC for the Network Stream definition.
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Thanks, I will look up that app.

And check if the RTSP URL (bottom of the Live Video page) matches what you've used in VLC for the Network Stream definition.
This is in reference to ONVIF Device Manager, right, not elsewhere in my web config? Just making sure.

Thanks again!

Edit to add: Took a look, but all my cams are "behind" my NVR. I can address them directly through port forwarding that the NVR provides, but I think I can only get VIDEO out via RTSP, like:

rtsp://admin:pASSWORD@192.168.1.15:8554/Streaming/Channels/502

So I am not sure how to actually use this tool to probe a single camera.
 
Last edited:

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Yeah, that is a pretty cool looking tool, but it does not detect my NVR and I cannot find anything about how to get ONVIF services over HTTP with my gear so I guess I am out of luck. Bummer!
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
So I am not sure how to actually use this tool to probe a single camera.
To use ODM natively, where it finds the cameras automatically, you'd need to set the PC IP address temporarily to one in the range that the NVR PoE ports use, eg 192.168.254.100 and connect it to an unused NVR PoE port.
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Makes sense, thanks. Unfortunately I cannot find any info on how to tickle my NVR via Onvif; not even sure it is possible.

But, my NVR exposes the cameras to my normal LAN IP range by appending a port to the NVR's IP address. For example, I can access camera 7 over HTTP this way:

http://192.168.1.15:65007

So presumably, if I knew the ONVIF URL, I ought to be able to put this into ODM:

http://192.168.1.15:65007/some/LTS/onvif/path/that/works

... Right?

But the problem is I have no idea what the path might be. They are LTS cameras, which are Hikvision, but I have found that LTS has made some changes.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
the NVR's port-forwarding applies only to the camera's management port (ie, 65007 @ NVR IP goes to port 80 at cam's PoE IP).

I can only get VIDEO out via RTSP, like:

rtsp://admin:pASSWORD@192.168.1.15:8554/Streaming/Channels/502
502 would the SUB stream for camera 5. have you tried 501?
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
another thing to try: lowering your iframe interval?

as-is, you've got an iframe only every 3 seconds. maybe VLC needs to see one more often? try an iframe every second (15)
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Yes. All the xx01 streams do the same thing -- they connect, but show a black screen.

All the xx02 streams will work but only in CIF resolution.

I just used ffmpeg (ffplay) to connect and it happily connects to all the streams, but shows garbled video for the xx01 main streams.
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Just tried reduced iframes too, all the way down to every frame. No change.

I feel like eventually someone will come along and say, oh, you could never use rtsp for main streams on that brand of camera, what were you thinking? I wish they would hurry up and get here. ;)

This is irritating because I want to set up a monitor to show a few streams without using the OEM's crummy software, but if all I can view is the lowest resolution, it may not be worth the trouble.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
sounds to me like a the problem lies with the NVR.

Can you move a cam to your LAN side and try accessing it directly?
OR put your PC on the PoE side of the NVR (giving it an appropriate IP address there) so you can hit the cam directly?
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Looks like I will have to do that next so I can get a better look at the cameras with a tool like ODM.

(As far as I can tell there is no onvif access to my NVR, just the cameras.)
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
So presumably, if I knew the ONVIF URL, I ought to be able to put this into ODM:
No - that won't work. That's a NATed address for the camera over Virtual Host.

To use ODM natively, where it finds the cameras automatically, you'd need to set the PC IP address temporarily to one in the range that the NVR PoE ports use, eg 192.168.254.100 and connect it to an unused NVR PoE port.
It's straightforward if you just connect the PC to an NVR PoE port, and have the PC IP address set to one in the same range as the PoE ports - as suggested above.
You only need to do this temporarily until you figure out the RTSP problem in VLC.
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
Thanks fellas, I will give it a shot. I'm baffled as to why VLC and the other RTSP viewers I tried would :puke: on these streams.
 
Top