What is the use of file Transcoding notification?

If you enable this option, The notification will send every minute after the file get transcoded. The notification are send to the URL that you provided in console as a json raw post data format.

How to enable File Transcoding notification?

  1. Login to 5centsCDN console.
  2. Move to Zones and select HTTP or VoD push zone.
  3. Click the manage button nearest to your Push zone ID.
  4. On the redirected page, Click the CDN resource option.
  5. Scroll down the page and find the option “File Transcoding Notification (Web Hook)”
  6.  Provide a valid URL in the column. The notifications are sent to this URL.(eg: http(s)://yourdomain.com/notify)
  7. Click the save button.

How can I implement in PHP?

The PHP implementation, you can use this syntax

$data = file_get_contents(“php://input”);
$json = json_decode($data);

A sample Json response will be this format,

[
{
“zoneid”:”100″,
“duration”:”10702.000000″,
“profile”:{
“name”:”720p”
},
“files”:{
“in”:”/filename.mp4″,
“out”:”/mp4/filename_720p.mp4″,
“thumbs”:[
“/mp4/filename_720p_thumbs_0001.jpg”
]
},
“playbackurls”:{
“files”:{
“in”:”https://push-100.5centscdn.com/filename.mp4″,
“out”:”https://push-100.5centscdn.com/mp4/filename_720p.mp4″,
“thumbs”:[
“https://push-100.5centscdn.com/mp4/filename_720p_thumbs_0001.jpg”
]
}
}
}
]

Leave a Reply