Twitter only works with videos with AAC audio, YUV 4:2:0 pixel format and an aspect ratio between 1:3 and 3:1, according to their developer docs
ffmpeg -i input_video.mp4 -c:a aac -c:v libx264 -filter:v "format=yuv420p" output_video.mp4
ffmpeg -i image.png -i audio.mp3 -r 30 video.mp4