Question

I would like to stream in mp4 format but the problem is that I cannot set right parameters to make it running.

When I want to stream MJPEG I use:

AMC.MediaURL = "http://" + camera.IP + ":" + camera.HTTPPort + "/axis-cgi/mjpg/video.cgi"; 
AMC.MediaUsername = "root"; 
AMC.MediaPassword = "1"; 
AMC.MediaType = "mjpeg"; 
AMC.Play();

and it streams just fine, BUT when I change it to:

AMC.MediaURL = "http://" + camera.IP + ":" + camera.HTTPPort + "/axis-cgi/mpeg-4/video.cgi"; 
AMC.MediaUsername = "root"; 
AMC.MediaPassword = "1"; 
AMC.MediaType = "mpeg-4";          
AMC.Play();

video is never played. How to set right parameters to run mp4 stream. I looked in documentation for samples, hints etc. there are no samples or hints at all.

Mpeg-4 works fine in the web browser so this is not camera fault.

No correct solution

OTHER TIPS

I think it should be like this

AMC.MediaURL = "http://" + camera.IP + ":" + camera.HTTPPort + "/mpeg4/media.amp";

AMC.MediaType = "mpeg4";

Here is other protocol schemes that you can use when streaming Axis PTZ, copy from the SDK documenet.

axrtpm --- MJPEG, MPEG-4 and H.264 multicast RTP streams

axrtpu --- MJPEG, MPEG-4 and H.264 unicast RTP streams

axrtsp --- MJPEG, MPEG-4 and H.264 unicast RTSP streams

axrtsphttp --- MJPEG, MPEG-4 and H.264 unicast RTSP streams over HTTP

axrtsphttps --- MJPEG, MPEG-4 and H.264 unicast RTSP streams over HTTPS

axmpeghttp --- MPEG-2 unicast streams

axsdp --- MPEG-2, MPEG-4 and H.264 multicast streams without RTSP.

For example, to access a multicast H.264 stream via the RTP protocol, the URL with the custom protocol scheme could look like this: axrtpm://server-address/axis-media/media.amp?videocodec=h264

MPEG-4 stream via the RTSP protocol: axrtsp://server-address/mpeg4/media.amp

Secondary audio stream on supported products: axrtsphttp://server-address/axis-media/media.amp?video=0&audio=1&audiochannel=2

Unicast MPEG-2 stream: axmpeghttp://server-address/axis-cgi/mpeg2/video.cgi

Multicast stream without using RTSP: axsdp://server-address/axis-cgi/alwaysmulti.sdp?camera=1

MJPEG stream via the RTPS protocol tunneled over HTTP with embedded credentials: axrtsphttp://root:pass@/axis-media/media.amp?videocodec=jpeg

Edge-storage recording stream over RTSP: axrtsp://server-ip/axis-media/media.amp?recordingid=20130527_125933_03E8_00408CB96106

By the way, I have a problem with viewing mpeg4 stream through web browser. Every time IE reminds me to install mpeg4 decoder I do so, however the installation seems not working cause I relogin the PTZ the same warning appears again and again. I would like to know how did you install the mpeg4 decoder and do you have any idea how does this problem happen to me? PS. I am using Axis PTZ-213.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top