Android upload video



Hi, trying to upload a video on android, extending fabrics TwitterApiClient.
INIT : success returns media id
APPEND : success 2XX
FINALIZE : 400 Bad Request.

also tried to upload the same video or any video using twurl.
and I get “Invalid or unsupported media, Reason: UnsupportedMedia.” on FINALIZE.

I have been trying to crack this for a while. Is there a restriction on the video codecs I should use? Can someone please shade some light on this?


The video would need to be MP4 and inside the supported size range (length and file size). This is described in the Uploading Media docs.


@andypiper I went through the docs when trying to upload the video. Yes the video is mp4 and in the size range like 7seconds and 1.5MB. Here is the video for your reference



Thanks. I’ve just tried the same, and it doesn’t seem to work.

My working theory is that ISO Media MP4 format is not supported, but I’m unable to confirm that at the moment. Is there any way to generate the video in a different codec/format and retry?


Thanks @andypiper I will try a different codec.


What was the verdict on this issue?


It seems the video codec I am using(mpeg4), is somehow rejected by the server. I tried with an h264 codec, and it worked.