Getting 500 error when uploading video to twitter from android app



I am trying to compress video using FFMPEGAndroid library using the following command.
{"-y" ,"-i", file.getAbsolutePath(),
"-c:v", “libx264”, “-crf”, “20”,
"-aspect", “1:1”,
"-pix_fmt", “yuv420p”,
"-c:a", “aac”, “-strict”,“experimental”,
"-b:a", “96k”, “-ac”, “2”, “-ar”, “44100”,
"-preset", “ultrafast”,

When i try to share the video on Twitter from my android app, i get 500 Internal Server Error. I am able to share same video on Facebook & on my app.
I have been read a lot of forums and FFMPEG manuals but no luck.

It is a very urgent issue. I will really appreciate if anyone can provide inputs on this.

Thanks in advance!


Hey @sakshigoyal,

Are you trying to do this through Fabric or via the REST API of Twitter?



I am trying to do this using REST API. Actually i send the compressed video to the server through api call, and then it is uploaded to facebook/twitter based on user preference.


Thanks, I’m going to move this to the REST API topic then since there are better experts that can help.