"VideoTool threw an exception" on video upload

video
error-codes
mov

#1

Over the last month, we’ve been encountering a very generic error message on some of our video uploads. Subsequent attempts to upload thru the twitter web app and api call seem to work. Should this be treated as a try again later type of error message, or is there something we need to change in the api calls/video payload?

{:media_id=>766724676466999303, :media_id_string=>“766724676466999303”, :size=>5534720, :processing_info=>{:state=>“failed”, :progress_percent=>100, :error=>{:code=>1, :name=>“InvalidMedia”, :message=>“VideoTool threw an exception”}}}

link to video: https://www.dropbox.com/s/6bgsry940oyr3tn/57aaf3868fefa873753cabbf_57b7628f57f56d74675bc306.mp4

link to retried post on own account:


#2

Jonathan, did you ever get any more insight into this error? We’ve seen this a time or two as well and also haven’t found any actionable info.


#3

Any update on this? We are experiencing the same issue. It is often (if not always) associated with posting a .mov file.


"VideoTool threw an exception" on video upload
#4

Thanks for bubbling this back up - @rdwyer_sf I’m going to close your duplicate thread on this, and ask someone from the team to take a look back here if they can (bearing in mind it is heading into holiday season).


#6

Hey there @andypiper!

Is there a timeframe planned for fixing or documenting this behaviour? We are currently experiencing a couple instances of this per hour. All videos are MP4 and look like they should post fine, since they are within the regular parameters! :slight_smile:

Thanks so much!


#7

Hi @andypiper

I am trying to upload a 120 seconds video of size around 49MB,getting the same error “InvalidMedia”. we have created the file as per Twitter video specification and recommendations.

Really appreciate your view on this


#8

Are you able to reproduce this using our large video upload sample?

Can you provide a link to an example file?

Are you able to provide a code snippet showing how you are uploading the media?


#9

Yes, I am using the large video upload sample steps using the LinqToTwitter library.

I can upload 30, 60 and 90 seconds video without any issues, only 120 seconds and above durations we have this problem.

Tomorrow I will upload the file into YouTube and send you link.


#10

We’d need a link to the original file not a YouTube-encoded version.

140 seconds is the limit for tweet_video type.

Please also try to upload using the actual Python code we’ve provided.


#11

Please use the above dropbox link to download the 2 minutes file.


#12

@andypiper

I have mailed the link for the video file which is not uploading via twitter UI and via API.


#13

Looks like your video is 1920x1080 and the API supports maximum size of 1280x1024.


#14

@andypiper

thanks Andy, I will reduce the file size as per API support and try to load again.


#15

Hi @andypiper .
I also faced with such error. Video is not uploading via twitter UI and API. Sending you example of file - https://drive.google.com/file/d/1UUxdAUeut63jd2-EvqfWfJ_REZmCcYz_/view .
Thanks for any help.


#16

Seems like there’s something wrong with the encoding of the file. I just re-encoded it using ffmpeg

$ ffmpeg -i qwerqwrq.mp4 -4 mp4 -o qwerqwrq2.mp4

The generated file was posted successfully via the API.