GET_STREAM_FROM_FILE

 

Get the video/audio streams form recordings in the local storage media through this URL.

The encoder could stream the video/audio to the remote host as it gets the request by this URL. The firmware seek the timestamp in the recording file based in this URL settings to start the video/audio streaming. And, the firmware stops sending video/audio data when the timestamp in the video and audio reaches the end time setting in this URL or the end of file.
With MPEG4 and H.264 video data, the firmware starts from I frame in the recordings. The timestamp in the I frame might be eraly than the start time settng in this URL. In this case, the audio frames which their timestamps after this I frame's timestamp should be sent as well.
With MJPEG video data, the firmware might not find the video or audio frame which its timestamp is the same as start time in this URL. The firmware should send the frame which

This URL is available in SYSTEM and ENCODER CGIs. If there is no input argument, the device will stream video to the host. If the audio function is enabled, the device will stream the audio to host as well. The GET_STREAM=VIDEO will get the video stream only event the audio function is enabled. The GET_STREAM=AUDIO will get the audio stream only if audio function is enabled. No error message will be returned if the audio function is disable. There is no audio stream for the request in this case. Refer to V2_AUDIO_ENABLED URL in SYSTEM CGI.

Here is the snapshot the HTTP transaction of this URL. Get MPEG4 video with PCM audio streams.

Remote PC to Device:

GET /cgi-bin/cmd/system?GET_STREAM HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Authorization: Basic QWRtaW46MTIzNDU2
Host: 172.16.3.79
User-Agent: AHTTP

Device to Remote PC

HTTP/1.0 200 OK
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: multipart/x-mixed-replace; boundary=----------------boundary

----------------boundary
Content-Type: video/mpeg4
Content-Length: 26986

........^i..F.yG............F.yG.E........................... .........<.c...........(=......qz.'.....x;...........+Z
...E......o...."L.GC...6.......l &..1....7Bz......Mz...A.K.....U...?..^fL..T...2#....d+eO.t....0)....u9'.1.."1{@..<mV.lM..Uwz.{.'..t...?...}...b....I.X.....uY.H.n#.K..h..V...&.j...%.........%...Vr3.. .....W:^i....a$}...}e..T...u.:..o.G?.XS...^$. .~..8...e:d...<<.........C...:...m..R%.>d.F...L..:j.........

----------------boundary
Content-Type: audio/pcm
Content-Length: 1052

............D.yG.N....................................................................

The Content-Type of the MPEG4 video and PCM audio streams are video/mpeg4 and the audio/pcm

Note that the video resolution and encoder type could not be changed by this URL. The video resolution and encoder type in the video stream are the same as the encoder settings.

Input Argument

None
or
VIDEO
or
AUDIO (if Audio In is enabled)
or
VIDEO,AUDIO (if Audio In is enabled)

Attribute

Write

Return of Message

Video / Audio streams
or
ERROR: invalid parameters

Applicibility

Status

Valid

See Also

V2_AUDIO_ENABLED, V2_STREAMING_METHOD, RTP_B2

Example

http://ip:port/cgi-bin/CGI?USER=Admin&PWD=123456&GET_STREAM
or
http://ip:port/cgi-bin/cmd/CGI?GET_STREAM
or
http://ip:port/cgi-bin/CGI?USER=Admin&PWD=123456&GET_STREAM=VIDEO
or
http://ip:port/cgi-bin/cmd/CGI?GET_STREAM=VIDEO
or
http://ip:port/cgi-bin/CGI?USER=Admin&PWD=123456&GET_STREAM=AUDIO
or
http://ip:port/cgi-bin/cmd/CGI?GET_STREAM=AUDIO
or
http://ip:port/cgi-bin/CGI?USER=Admin&PWD=123456&GET_STREAM=VIDEO,AUDIO
or
http://ip:port/cgi-bin/cmd/CGI?GET_STREAM=VIDEO,AUDIO

where CGI could be system or encoder

Return To

HOME, SYSTEM CGI, ENCODER CGI