Skip to content

Instantly share code, notes, and snippets.

@duongthanhthai
Last active June 24, 2023 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duongthanhthai/e094d1bec5824ca396d86283b118ca90 to your computer and use it in GitHub Desktop.
Save duongthanhthai/e094d1bec5824ca396d86283b118ca90 to your computer and use it in GitHub Desktop.
FFmpeg guide A to Z
This is guide from Zero to Hero with FFmpeg
@duongthanhthai
Copy link
Author

duongthanhthai commented May 13, 2023

Đoạn code dưới đây cho phép thêm nội dung text fb.com/myduca vào phía trên của khung hình video là 150px và 200px x=150:y=200
Sau khi video chạy được 20s, sẽ xuất hiện thêm một dòng text Fanpage facebook.com/myduca ở phía dưới video. Đoạn text này hiển thị 20s rồi sẽ ẩn
ffmpeg -i video.mp4 -vf "drawtext=text='fb.com/myduca':x=150:y=200:fontsize=24:fontcolor=black:box=1:boxcolor=yellow@0.8:boxborderw=5:box=1,drawtext=text='Fanpage facebook.com/myduca':fontsize=24:fontcolor=black:boxborderw=5:box=1:boxcolor=yellow@0.5:x=(w-text_w)/2:y=h-200-text_h:enable='between(t,20,40)'" -c:a copy video_Final.mp4

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