Is it possible to request H.264 live video stream from XProtect Professional+ server

I am trying to get h.264 stream from Milestone XProtect Professional+ server using protocol integration.

My connect string has the following content:

“<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>0” +

       "<methodname>connect</methodname><username>a</username><password>a</password>" +

       "<cameraid>{0}</cameraid>"+

       "<alwaysstdjpeg>no</alwaysstdjpeg>" +

       "<transcode>" +

       "<allframes>yes</allframes>" + // Add this line to get all frames in a GOP transcoded

       "<width>1280</width>" +

       "<height>720</height>" +

       "</transcode>" +

       "<connectparam>id={1}&amp;connectiontoken={2}" +

       "</connectparam></methodcall>

The response returns:

no but I am still receiving JPEG frames.

I have tried requesting without the dimensions but still no difference,

You will have to remove the tag and all its content.

What you receive will be raw video data, so it will be h.264 if that is what the camera provides, the data will be unmodified so the camera setup governs this. I was in doubt how to answer; if the camera streams h.264 it is possible for you to receive h.264.

When you receive raw data you might need to consult the documentation on the generic byte data format.

http://doc.developer.milestonesys.com/html/index.html?base=mipgenericbytedata/main.html&tree=tree_3.html

Thank you

I still don’t get h.264 stream but JPEGS

The response from the server to Connect call is below:

Answer from image server
<?xml version="1.0" encoding="UTF-8"?><methodresponse><requestid>0</requestid><methodname>connect</methodname><connected>yes</connected><errorreason>Success</errorreason><includehasmotionflags>no</includehasmotionflags><includesequencenumber>no</includesequencenumber><includesignatures>no</includesignatures><alwaysstdjpeg>no</alwaysstdjpeg><transcode><allframes>no</allframes></transcode><clientcapabilities><privacymask>no</privacymask><privacymaskversion>0</privacymaskversion><multipartdata>no</multipartdata><datarestriction>no</datarestriction></clientcapabilities><servercapabilities><connectupdate>yes</connectupdate><signatures>yes</signatures></servercapabilities></methodresponse>

Thank you very much

Please verify the camera is setup to stream h.264 in the Management Client.

Yes, it is configured to stream h.264 in the Management Client.

Here is my ImageServerConnection.cs file as in TCPVideoViewer sample, using which I get JPEGs instead of H.264 stream in the Live() method. Thank you very much in advance.

In FormatConnect() you still have a node in the XML, did you try without?

Thanks, Bo. Yes, I did try it without - no difference.

I found the culprit, The compressionrate in FormatLive() was set to 90, and h.264 requires 100.

I am glad you solved this when I had real difficulty coming up with ideas. Good news.

Thank you Bo.