Answers to Common Questions
A very common question, is how to get video streams and what video formats we support. For recorded video there are multiple options, for live video there is only one format we support.
Step 1: What format for streaming live video?
We stream live video in the FLV file format. It is a very lightweight format around the h.264 video from the camera. We do not transcode or compress the video and so it is effectively the same as the RTSP stream with the added benifit of being able to be treated as a file.
In order to stream video we need to use a streamable format. For a format to be considered streamable it needs to have enough information at the start of the file so that the player can begin playing without needing to have the entire file.Streaming an MP4 video is a challenge. Because the MP4 format itself is not streamable, most solutions involve sending a m3u8 playlist of small MP4 files that can be played sequentially. The most common formats at HLS and MPEG-DASH. We find that the additional complexity of this process is not better than using the FLV format.
Step 2: What format for recorded video?
Recorded video can be requested in either FLV or MP4 format. Requests for MP4 video will be transcoded for better compatability. One consideration about requesting MP4 videos is that the entire video must be uploaded to the cloud so that transcoding can begin. This API endpoint will return a 200 if the MP4 file is ready to be served and will return a 201 if the conversation process is not done yet. Please wait a suitable period and request again. Additional requests will not cause an additional conversation process.
Step 3: What is the difference between streaming and downloading?
For the point-of-view or our API, streaming and downloading are same. It is just a file download that is send from our servers. For FLV requests we can start sending content immediately while we continue to read in additional data. For MP4 requests, we need to see if we already have an MP4 version and serve that as a download. If we do not, we convert the video. When the video is done it cached and will be downloaded immediately on subsequent requests.
From the point-of-view of the video player, most will have settings indicating if it should start streaming or wait for the entire file to download. Configuring your video player is important to get the best experince. Please pay attention to how much it buffers before playing. We use the HTML5 video tag along with a helper library. You can find more information about it here.
Step 4: Can we use RTSP?
For certain applications, low latency processing on the high-resolution video, it is more practical to do the process on the edge instead of the cloud. A direct connection with RTSP is provided for such applications. Detecting threats or weapons is a use case that is very time critical. Using face recognition as an additional authentication step is another example.
For devices on the same network at the camers, We provide an API endpoint to get the RSTP connection URL. This URL includes credentials so that they can be centrally managed.
What else can we do with this?
Video is the core of our business and is the core of our API. We typically see people pulling from our API to enchance their own product with the addition of video. We have technology partners that control access to doors in buildings, detect employee fruad at Point-of-Sale terminals, help detect open parking spaces, or even assist tennis coaches when giving private instruction.
I love to hear about new integrations or discuss what may be possible. If you have any questions please feel free to reach out to us at api_support@een.com