Media not found on media upload from twurl



I’ve implemented a Java equivalent version of the following twurl statements. Regardless of whether I use Twurl or curl or java code, I always seem to be getting the same result with my sample videos.

They upload successfully to twitter (seemingly), then then I can’t link them to my account.

The two test videos I’ve tried are:

  • an MP4, 640x360 resolution, Codecs: H.264, AAC, 30 seconds in duration
  • an MP4, 1280x720 resolution, Codecs H.264, AAC, Color profile HD (1-1-1), 15 second in duration

I have read the following documentation:

and looked at the heroku app for video testing:

Do you have more information on what might be going on here? Thanks!

$ twurl -H "/1.1/media/upload.json" \
     -d "command=INIT&media_type=video/mp4&total_bytes=1161074"


$ twurl -H "/1.1/media/upload.json" \
> -d "command=APPEND&media_id=<the_id>&segment_index=0" \
> --file theFilename.mp4 --file-field "media"

$ twurl -H "/1.1/media/upload.json" \
   -d "command=FINALIZE&media_id=726659625265688577" \

$ curl --request 'POST' '' \
   --data 'video_media_id=<the_id>' \

{"errors":[{"code":"NOT_FOUND","message":"Media not found"}],


I figured out what the problem is. I wasn’t passing “media_category=amplify_video” to the INIT call. Without that parameter setting, the video upload process fails.

With that addition, the process succeeds, both via twurl & via the java code i wrote to do something equivalent.