BlueSky Video Encoding
BlueSky is new, fun and might be great for a lot of things unfortunately video isn’t really one of ‘em.
Twitter wasn’t and still isn’t much better with its own insane encoding and unless you pay for premium is also limited in many of the same ways as BlueSky is currently.
Luckily at least for now I found this script to be decent enough at re-encoding vids for BlueSky:
ffmpeg -i <input> -vcodec libx264 -crf 28 -preset medium -acodec aac -b:a 128k -t 60 -vf scale=1280:720 <output>
- scales video down to be 720p - not a requirement but helps get the filesize down.
- limits the output to 60 seconds (BlueSky’s current limit)
- should produce a file < 50mb (Current limit)
Can add it to your shell as a function with the following:
bluesky_video() {
local input="$@"
local output="$input.bsky.mp4"
ffmpeg -i "$input" -vcodec libx264 -crf 28 -preset medium -acodec aac -b:a 128k -t 60 -vf scale=1280:720 "$output"
}
add it to your .basrc
or somewhere and then just run bluesky_video <input>
.