Skip to content

Instantly share code, notes, and snippets.

@ix4
Last active February 7, 2019 18:15
Show Gist options
  • Select an option

  • Save ix4/6cab630a6659f612fff1a72281318a62 to your computer and use it in GitHub Desktop.

Select an option

Save ix4/6cab630a6659f612fff1a72281318a62 to your computer and use it in GitHub Desktop.
Convert Video for Twitter
ffmpeg -i In.mp4 -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 Out.mp4

All videos posted to Twitter that are 6.5 seconds or shorter will automatically loop.

Limitations on video resolutions & aspect ratios that can be uploaded on the web

- Minimum Maximum
Resolution 32x32 1920x1200 (and 1200 x 1900)
Aspect ratios 1:2.39 2.39:1 range (inclusive)
Frame Rate - 40 fps
Bitrate - 25 Mbps

RECOMMENDED FILE SPECIFICATIONS

File Types supported mp4, mov
Video Codec: H.264
Dimension 1280x720 - max. 1920x1080
Aspect Ratio 16:9
Frame Rate 30fps - Max 60fps
Video Bitrate: 3000 kbps
File Size x < 1GB
Audio Format must be AAC audio
Audio Type Mono or Stereo
Audio Bitrate: 128 kbps @44100 Khz

OPTIONAL FRAME SIZES & SPECS

Orientation Width Height Video Bitrate Audio Bitrate
Landscape 1280 720 2048K 128K
Landscape 640 360 768K 64K
Landscape 320 180 256K 64K
Portrait 640 640 1024K 96K
Portrait 480 480 768K 64K
Portrait 240 240 256K 64K

SOURCE: Media Studio FAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment