Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save suryaelidanto/e2da9c8a5599bbcb1f6bb79972c296f4 to your computer and use it in GitHub Desktop.
Save suryaelidanto/e2da9c8a5599bbcb1f6bb79972c296f4 to your computer and use it in GitHub Desktop.
ffmpeg -hide_banner -loglevel debug -y \
-i "test.mp4" \
-f lavfi -i "color=c=black:s=1080x1920:d=999999:r=25" \
-filter_complex "
[1:v] trim=start=0:end=27.72,setpts=PTS-STARTPTS [bg];
[0:v] trim=start=31.4:end=59.12,setpts=PTS-STARTPTS,fps=25,
scale=1080:1920:force_original_aspect_ratio=increase,
crop=1080:1920 [vclip];
[0:a] atrim=start=31.4:end=59.12,asetpts=PTS-STARTPTS,volume=1 [aud];
[bg] drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:
text='TEST TEXT - Apakah ini muncul?':
fontcolor=0xFFFF00:fontsize=60:
x=(w-text_w)/2:y=(h-text_h)/2:
enable='between(t,0,10)' [bg_text];
[bg_text][vclip] overlay=shortest=1:x=0:y=0 [vout]
" \
-map "[vout]" -map "[aud]" \
-c:v libx264 -pix_fmt yuv420p -r 25 -c:a aac -shortest \
"output.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment