The HW Blog

Want to be updated? @opencoconut | Feed

API update: 3 thumbnails generated by default

Bruno Celeste (@brunoceleste)

May 12, 2014 Features

Depending on your project, the default thumbnail we generated was too small. Your only option was to use the preview API to get another one that better fits your needs.

To improve that part, we now generate 3 thumbnails in small (100px), medium(300px) and large (600px) sizes for each videos and encoded videos you have in your account.

The JSON output has been updated to reflect this change:

{
  "created_at": "2014-05-12T13:52:49+02:00",
  "updated_at": "2014-05-12T13:52:49+02:00",
  "title": "testthumb",
  "specs": {
    "mime_type": "video/mp4",
    "size": 7111,
    "video": {
      "length": 17,
      "pix_format": "yuv420p",
      "bitrate": 3283,
      "fps": 30.0,
      "width": 320,
      "height": 240,
      "container": "mov",
      "stream": 0.0,
      "codec": "h264",
      "aspect": 1.33,
      "rotation": 0
    },
    "audio": {
      "bitrate": 128,
      "sample_rate": 44100,
      "codec": "aac",
      "channels": 1,
      "stream": 0.1,
      "synched": true
    },
    "thumb": "http://5.39.75.144/12/13/32921d1df6c63c8ab4c679273198ca72/1051-d.jpg",
    "thumbnails": {
      "small": "http://5.39.75.144/12/13/5977a149bc1932edaba799a0ca82479b/1051-s.jpg",
      "medium": "http://5.39.75.144/12/13/58e1795b4941e1dbb84a67778cc83a02/1051-m.jpg",
      "large": "http://5.39.75.144/12/13/b6cd02931e9ce95c93b72583c76eb5c3/1051-l.jpg"
    }
  },
  "url": "http://5.39.75.144/12/13/f1479f9a2ca845310ed9e8688b54c630/1051",
  "link": "http://coconut.com/video/35942302.bin",
  "filename": "1051",
  "id": 35942302
}

Nothing to do on your side, everything is done automatically. Keep in mind that if you need other sizes and more than one thumbnail, the preview API is still your best friend.



Any Comment? Send us a message on Twitter @opencoconut
If you have questions or feedbacks, you can also contact us via our contact page