Error at Encoding step

Hi there,

I currently have the following error state for my videos on Stream.
When I upload them from Swift - I have a success, but when looking at the data on the Cloudflare Stream interface, I see the following state:

  "result": {
    "uid": "7f8a84ca5f5740d1a979d37e71cb8010",
    "thumbnail": "",
    "thumbnailTimestampPct": 0,
    "readyToStream": false,
    "status": {
      "state": "error",
      "step": "encoding"
    "meta": {
      "name": "/var/mobile/Media/DCIM/112APPLE/IMG_2885.MP4"
    "created": "2020-07-19T18:57:33.86302Z",
    "modified": "2020-07-19T18:57:36.418111Z",
    "size": 245,
    "preview": "",
    "allowedOrigins": [],
    "requireSignedURLs": false,
    "uploaded": "2020-07-19T18:57:33.862967Z",
    "uploadExpiry": null,
    "maxSizeBytes": null,
    "maxDurationSeconds": null,
    "duration": -1,
    "input": {
      "width": -1,
      "height": -1
    "playback": {
      "hls": "",
      "dash": ""
  "success": true,
  "errors": [],
  "messages": []

The size field indicates that the file copied was 245 bytes. This is unlikely to be a video file. Could you have uploaded a error message or a string from your application while testing?

1 Like

Thanks for your reply. It is highly likely to be the case. I am new to Swift, and see it a bit challenging to perform a POST request with multiform data. I took example from my Postman request (Postman offers a way to see the request in a lot of different languages including Swift), but to no avail yet.