~scripts
59 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
div2pad
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsdiv2pad
702 B• 36•  2 weeks ago•  DownloadRawClose
2 weeks ago•  36

{}
#!/bin/bash
# 
# Author: Twily 2025
# Description: to be used with screencast.sh etc to both compress
# and refit the video pad for compatibility with posting on X.
# Usage: div2pad.sh out.mp4 out2.mp4

IN=$1
OUT=$2

#ffmpeg -ss 00:00:00 -i $IN -to 00:00:40 \
ffmpeg -i $IN \
 -vcodec libx264 -pix_fmt yuv420p -strict experimental \
 -r 30 \
 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -b:v 6000k \
 -an \
 -movflags +faststart \
 $OUT


# include audio
#ffmpeg -i $IN \
# -vcodec libx264 -pix_fmt yuv420p -strict experimental \
# -r 30 -t 2:20 \
# -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -vb 1024k \
# -acodec aac -ar 44100 -ac 2\
# -minrate 1024k -maxrate 1024k -bufsize 1024k \
# -movflags +faststart \
# $OUT

Top
©twily.info 2013 - 2025
twily at twily dot info



2 270 538 visits
... ^ v