Error in creation/processing of video object

video

#1

I am trying to create a Video App Download Card using api reference Promoted video overview
In the POST/videos endpoint, using “video_media_id” I am able to create a video object(after successfully uploading a video) and a uuid is returned.

But when queried for the uploaded videos at GET/videos endpoint, the “reasons_not_servable” field returns “[ERROR]”. This happens for all the videos I have uploaded using “twurl” or java “twitter4j” library.

The videos uploaded follow all the specifications given at Promoted video overview page. Even tried with example video here. On the Ads enumerations page no explanation has been provided why “ERROR” is returned in “reasons_not_servable” field on creating a video object.

Thanks in advance for any guidance!


#2

@pradubey calling POST /videos creates a new video object and queues your video for pre-processing in Twitter’s media back end. Initially, this will say reasons_not_servable=[PROCESSING], but if you see this change to ERROR that means the media platform encountered a fatal problem while attempting to pre-process your video and get it ready to be played on Twitter.

The majority of the time, this is due to a problem within the video itself. Can you tell me more about the video you’re uploading?

  • What format is the video in? (see supported formats here)
  • What’s the resolution of the video?
  • What’s the duration of the video?
  • How large is the file?
  • Are you using the same user token in your media upload request as you are in POST /videos?

Please also provide an advertiser account ID, user ID that uploaded the video and the UUID of the video in question.


#3

Thanks @brandonmblack

All the videos I have uploaded are in .mp4 format and those are supported.
Resolution 640x360 (maintaining 16:9 aspect ratio)
Duration always between 5sec and 30sec
Tried with files < 5MB which can be uploaded in single chunk
I am using the same token in media upload request as well as in POST/videos.

Moreover the example response on POST/Videos page suggests that “data” field in json response has many fields inside it but I only receive “id” field. I am attaching my terminal output and link for video

Initialisation
Dubeys-MacBook:~ prashant$ twurl -H upload.twitter.com “/1.1/media/upload.json” -d “command=INIT&media_type=video/mp4&total_bytes=752331”
{“media_id”:639314475921854464,“media_id_string”:“639314475921854464”,“expires_after_secs”:86399}Dubeys-MacBook:~ prashant$

Video upload
Dubeys-MacBook:~ prashant$
Dubeys-MacBook:~ prashant$ twurl -H upload.twitter.com “/1.1/media/upload.json” -d “command=APPEND&media_id=639314475921854464&segment_index=0” --file ~/Downloads/images-twitter/DRQCQaiww7XlAYJP.mp4 --file-field “media”

finalize
Dubeys-MacBook:~ prashant$ twurl -H upload.twitter.com “/1.1/media/upload.json” -d “command=FINALIZE&media_id=639314475921854464”
{“media_id”:639314475921854464,“media_id_string”:“639314475921854464”,“size”:752331,“expires_after_secs”:86400,“video”:{“video_type”:“video/mp4”}}Dubeys-MacBook:~ prashant$

video object created
Dubeys-MacBook:~ prashant$
Dubeys-MacBook:~ prashant$
Dubeys-MacBook:~ prashant$ twurl -X POST -H ads-api.twitter.com “/0/accounts/18ce53w6fst/videos” -d “video_media_id=639314475921854464&title=sample video&description=testing on sep 3”
{“data_type”:“video”,“data”:{“id”:“b93ea18b-2c3b-40d6-931d-48d35f62e493”},“request”:{“params”:{“video_media_id”:639314475921854464,“title”:“sample video”,“description”:“testing on sep 3”,“account_id”:“18ce53w6fst”}}}Dubeys-MacBook:~ prashant$

GET/Videos endpoint
Dubeys-MacBook:~ prashant$
Dubeys-MacBook:~ prashant$ twurl -X GET -H ads-api.twitter.com "/0/accounts/18ce53w6fst/videos"
only relevant output
{“tweeted”:false,“ready_to_tweet”:false,“duration”:null,“reasons_not_servable”:[“ERROR”],“description”:“testing on sep 3”,“preview_url”:null,“id”:“b93ea18b-2c3b-40d6-931d-48d35f62e493”,“created_at”:“2015-09-03T05:53:27Z”,“title”:“sample video”,“updated_at”:“2015-09-03T05:53:27Z”,“deleted”:false}

You can easily see the account ID from the requests.
Is it safe to mention the user id?(privacy concerns)


#4

Perfectly safe to mention user IDs, that’s not sensitive information at all. Thanks for all the other info.

I don’t think you’re doing anything wrong at all. However, I can’t reproduce your issue with my own account and the video you provided. I suspect this is an issue with this specific advertiser account. I’m going to follow up with our media team and find out why this video is failing to process.


#5

The user id being used for these calls was @tbgdigital.

I have tried from some other accounts as well. And the issue was same.


#6

Thanks @pradubey. We’re still digging into this issue to figure out why it’s happening. We don’t see it happening to other users, but this does look like a bug on our side. Thanks for your patience while we investigate.


#7

Make sure your Video Setting is the right setting for twitter , when you render the video
check the link below
Twitter Setting