Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to json_decode notification from zencoder-fetcher #25

Open
phommata opened this issue Apr 16, 2016 · 2 comments
Open

Unable to json_decode notification from zencoder-fetcher #25

phommata opened this issue Apr 16, 2016 · 2 comments

Comments

@phommata
Copy link

I am running zencoder-fetcher to test and develop locally. I have found that json_decode fails to handle the notification post. I receive the error message: Fail! I receive the notification post from zencoder-fetcher, trims, but fails once it is passed through json_decode. This is the notification data received from zencoder-fetcher that it is failing to json_decode:

{ "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 } }

@passionInfinite
Copy link

Can you reproduce it? @phommata

@jgreer
Copy link
Contributor

jgreer commented Sep 28, 2017

There are two different jobs in that JSON data. It looks like you're getting an array of jobs and mashing them into one string before trying to parse as JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants