cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
11354
Views
0
Helpful
10
Replies

Cisco 4500 Camera Multicast Stream with VLC

Hi All,

I want to watch Multicast stream from cisco 4500 HD camera on my network with VLC player, but i couldnt find the URL. Did anyone tried that, it would be great if you help me on this.

Regards,

10 REPLIES 10
bcc.technik.ip
Beginner

I dont't think it is as simple as you think,,,

Have you tried the cam api http://http://www.cisco.com/en/US/docs/security/physical_security/video_surveillance/ip_camera/hd_camera/4000_series/api.pdf ?

Watching the stream over the VSMS is quite easier !!

Hi Thanks for the answering the question,

Yes it is easier with VSMS but VSMS only use unicast with end device and in my senerio take all those streams from VSMS servers puts alot of procces to VSMS. I need multicasting for analytics. In this deployment i use 4ru servers and only HD cameras so taking feeds directly form camera using multicasting seems the best solution. Thanks for the guide. By using wireshark i was able to get necessary URL and now able to recieve multicast feed from camera and play it back with VLC.

Thanks again for information.

so, why don't you write down a short howto in in a couple of lines?

how do obtain a session ID?

Do you use the following line?

http://169.254.1.1/System.xml?version=1.0&action=login&userName=admin&password=mypwd

How to get the video stream/the URL within VLC, how to put  the SessionId in VLC?

Hi,

Sure its not a problem,

open wireshark and log on to camera web page,
Than press the capture button at wireshark and press the view video button at the web page
Stop the capture at wireshark
On the logs look for a line with an info section starting with

"OPTIONS rtsp://XXX.XXX.XXX.XXX:554/StreamingSetting?version=1.0&sessionID=80908194&action=getRTSPStream&ChannelID=1&ChannelName=Channel1&EncoderPort=0 RTSP/1.0"
Open VLC
Press Ctrl+n
Paste the link

"rtsp://XXX.XXX.XXX.XXX:554/StreamingSetting?version=1.0&sessionID=80908194&action=getRTSPStream&ChannelID=1&ChannelName=Channel1&EncoderPort=0"

And you will get your Multicast stream.

For analytics, software team wrote a code, i think its C# or maybe c, by using API they log on to the camera get a session id past it to the URL and get the multicast stream directly from camera.

One bad thing about this is number of sessions are limited to 10 even though its a multicast stream i am not able to take the 11th stream from camera.

In order to get a session ID I logged into the camera (IP 192.168.1.131)  and went to stream settings and looked for a session ID in the url,  in my case for this session only it was 28333424:

I am using a Mac (safari) and don't have access to IE but I got the session ID and built the URL for VLC:

rtsp://192.168.1.131/StreamingSetting?version=1.0&sessionID=28333424&action=getRTSPStream&ChannelID=1&ChannelName=Channel1

Only thing I changed was the sessionID, the IP address - everything else on the camera was factory and

I am running firmware version: 2.3.0-188

I then pasted that into VLC ( I am running the Mac Version 1.1.11 The Luggage (Intel 64bit))

At this point VLC crashed.

So I enabled Channel 2 on the camera and enabled SRTP with the defaults and tried that with VLC using with this URI:

rtsp://192.168.1.131/StreamingSetting?version=1.0&sessionID=28333424&action=getRTSPStream&ChannelID=2&ChannelName=Channel2

Same session ID from above (I didn't log off or close the browser on my mac to the 4500 camera)

This worked for me using Channel2 - there seems to be a bug in the mac vlc version for channel 1.

I also tried the little bit of testing from bcc above with:

http://192.168.1.131/System.xml?version=1.0&action=login&userName=admin&password=Cisco123

but that won't give me a session ID all I got is:

Hi did you try the port 554, when i look i didnt saw it.

you wrote

rtsp://192.168.1.131/StreamingSetting?version=1.0&sessionID=28333424&action=getRTSPStream&ChannelID=1&ChannelName=Channel1

try with this

rtsp://192.168.1.131:554/StreamingSetting?version=1.0&sessionID=28333424&action=getRTSPStream&ChannelID=1&ChannelName=Channel1

phillik747
Beginner

I know this is a very old post.  I have a few of these cameras around and been using them since they still can produce video.  I use one as a target camera, so if it gets hit who cares.  I wrote a python script to login and capture the sessionID and then start a VLC stream. Unfortunately it is still unicast.  The only way I was able to get multicast was to rebroadcast with VLC but that induces a ton of lag. There is a camera that is wifi and has some problems with the script getting the sessionID, so I can manually enter it.

from requests import session
from yarl import URL
import re
import time
import vlc


def get_rtsp_url(ip, sessionID):
payload = {
'action': 'login',
'userName': 'admin',
'password': 'password'
}

with session() as suffering_succotash:
url = URL.build(scheme='http', host=ip)
response = suffering_succotash.post(url / 'login.cs', data=payload)
pattern = r"sessionID=(\d+)"
body = response.text
try:
match = re.search(pattern, body)
sessionID = match.group(1)
except:
sessionID = sessionID

query = {
'version': 1,
'action': 'getRTSPStream',
'sessionID': sessionID,
'ChannelID': 1,
'ChannelName': 'Channel1'
}
new_url = URL.build(scheme='rtsp', host=ip, port=554, path='/StreamingSetting', query=query)
print(new_url)
return new_url


def open_stream(new_url):
# define VLC instance
instance = vlc.Instance('--input-repeat=-1', '--fullscreen')
# Define VLC player
player = instance.media_player_new()
# Define VLC media
media = instance.media_new(new_url)
# Set player media
player.set_media(media)
# Play the media
# player.play()
return player


if __name__ == '__main__':
ips = ['192.168.21.10', '192.168.21.11', '192.168.21.12']
# sessionID = input("sessionID=")
sessionID = 14521
for ip in ips:
time.sleep(1)
try:
new_url = get_rtsp_url(ip, sessionID)
player = open_stream(str(new_url))
player.play()
except:
print(f"nope {ip}")
continue
time.sleep(36000)
player.stop()



 

WalkerCabay
Beginner

The camera provides high-definition (HD) video and simultaneous H. 264 and MJPEG compression, streaming up to 30 frames per second (fps) at 1080p (1920 x 1080) resolution, and 60 fps at 720p (1280 x 720) resolution.

rmarosko
Beginner

So I inherited three of these cameras (CIVS-IPC-4500E), and have gone through the factory reset process and reconfigured them. Trying to view the video through an older IE on a hyper-v machine returns the directplay error, and thus I've been beating on trying to get RTSP working, alas without success.

 

I've tried building out the RTSP URL both with and without the SessionID, and VLC just fails completely. The debug log says the camera is returning a 404 error.

 

These cameras have 3.1.1-14 firmware on them, so I'm wondering if it's firmware that is the issue.  Any thoughts?

phillik747
Beginner

Hello,

 

Well it could be the difference in firmware.  I know the firmware I'm using is much older. If its the same model we can swap firmware and test.  This URL is generated with my script above.  Now the URI could be different with your FW.

rtsp://192.168.1.154:554/StreamingSetting?version=1&action=getRTSPStream&sessionID=1245678&ChannelID=1&ChannelName=Channel1