You might have previously seen a video uploaded to Stream display
Error in the dashboard instead of
Ready. This might happen for a number of reasons such as uploading a non-video file (a .pdf file or an image) to Stream or when a uploaded video file exceeds
maxDurationSeconds specified during Direct Creator Upload creation.
It might be frustrating for customers who run video platforms with Stream to see a video in the
Error state because it’s very hard to pinpoint why the upload errored and what the next steps to resolve the issue is.
If the file is not a video, platforms should prompt the creator to revisit the file they’ve chosen, while if the video is too long in duration platforms should ask the creator to upload a shorter video.
Now with the new error reason codes in the Stream API you can show relevant next steps to your users to fix the issue with their failed upload!
Error codes include:
ERR_NON_VIDEO(upload is not a video)
ERR_DURATION_EXCEED_CONSTRAINT(video duration exceeds constraints defined in the direct creator upload)
ERR_FETCH_ORIGIN_ERROR(downloading the video from URL failed)
ERR_MALFORMED_VIDEO(video is a valid file but contains corrupt data that can’t be recovered)
ERR_DURATION_TOO_SHORT(video duration shorter than 0.1 seconds)
- If Stream can’t automatically determine why the video errored, the
ERR_UNKNOWNcode will be used.
These error codes account for a majority of the videos in
Error state across all customers of Stream and we will continue to add new ones over time to help creators get their videos online faster.