zencoder-fetcher
zencoder-fetcher copied to clipboard
Invalid JSON posted to http://localhost:3000?
trafficstars
I am testing the Zencoder notifications with the Zencoder PHP library and I noticed the JSON response from the zencoder-fetcher is invalid and fails on json_decode.
This is a snippet of the JSON post that fails on json_decode, which is invalid JSON:
{
"job":{
"id":000000000,
"state":"finished",
"created_at":"2016-04-14T06:48:17Z",
"updated_at":"2016-04-14T06:48:49Z",
"submitted_at":"2016-04-14T06:48:17Z",
"pass_through":null,
"test":false
},
"input":{
"id":000000000,
"format":"mpeg4",
"frame_rate":29.97,
"duration_in_ms":15022,
"audio_sample_rate":44100,
"audio_bitrate_in_kbps":64,
"audio_codec":"aac",
"height":640,
"width":640,
"file_size_in_bytes":1067153,
"video_codec":"h264",
"total_bitrate_in_kbps":564,
"channels":"1",
"video_bitrate_in_kbps":500,
"state":"finished",
"md5_checksum":null
},
"output":{
"id":000000000,
"url":"http://sc-media-assets.s3.amazonaws.com/file",
"label":"webm-720",
"state":"finished",
"format":"webm",
"type":"standard",
"frame_rate":29.97,
"duration_in_ms":15024,
"audio_sample_rate":44100,
"audio_bitrate_in_kbps":80,
"audio_codec":"vorbis",
"height":640,
"width":640,
"file_size_in_bytes":1319868,
"video_codec":"vp8",
"total_bitrate_in_kbps":666,
"channels":"1",
"video_bitrate_in_kbps":586,
"fragment_duration_in_ms":null,
"rfc_6381_video_codec":null,
"rfc_6381_audio_codec":null,
"md5_checksum":null
}
}{
"job":{
"id":000000000,
"state":"processing",
"created_at":"2016-04-14T06:48:17Z",
"updated_at":"2016-04-14T06:48:18Z",
"submitted_at":"2016-04-14T06:48:17Z",
"pass_through":null,
"test":false
},
"input":{
"id":000000000,
"format":"mpeg4",
"frame_rate":29.97,
"duration_in_ms":15022,
"audio_sample_rate":44100,
"audio_bitrate_in_kbps":64,
"audio_codec":"aac",
"height":640,
"width":640,
"file_size_in_bytes":1067153,
"video_codec":"h264",
"total_bitrate_in_kbps":564,
"channels":"1",
"video_bitrate_in_kbps":500,
"state":"finished",
"md5_checksum":null
},
"output":{
"id":000000000,
"url":"http://sc-media-assets.s3.amazonaws.com/file",
"label":"webm-360",
"state":"finished",
"format":"webm",
"type":"standard",
"frame_rate":29.97,
"duration_in_ms":15024,
"audio_sample_rate":44100,
"audio_bitrate_in_kbps":80,
"audio_codec":"vorbis",
"height":360,
"width":360,
"file_size_in_bytes":829439,
"video_codec":"vp8",
"total_bitrate_in_kbps":415,
"channels":"1",
"video_bitrate_in_kbps":335,
"fragment_duration_in_ms":null,
"rfc_6381_video_codec":null,
"rfc_6381_audio_codec":null,
"md5_checksum":null
}
}