ffmpeg video transcoder
This page is mainly about ffmpeg video transcoder
Shortcuts
🌐
🌐
🌐
ffmpeg.org
A complete, cross-platform solution to record, convert and stream audio and video.
For Windows (which is what I've got)...
Download the FFmpeg binaries from CODEX FFMPEG, save the 7z file in a suitable place and extract the archive (using 7zip).
You will find three directories, a licence and a readme file. The FFmpeg binary is in the "bin" folder. Open up a command prompt from START > cmd + ENTER.
Copy the full path from the folder navigation bar.
At the command prompt, type cdSPACE and paste in the path. Press the ENTER key.
Recipes
General video size cropping
ffmpeg -i in.mp4 -filter:v "crop=ow:oh:x:y" out.mp4
where...
ow is the output window width
oh is the output window height
x,y are the top left coordinates of the output window
make a portrait video square and centered
ffmpeg -i in.mp4 -filter:v "crop=iw:iw:0:(ih-iw)/2" out.mp4
make a landscape video square and centered
ffmpeg -i in.mp4 -filter:v "crop=ih:ih:0:(iw-ih)/2" out.mp4
Overlay subtitle file (burn into video)
ffmpeg -i in.mp4 -filter:v subtitles=subtitles.srt out.mp4
Put a semi-transparent logo (85x85) in the folder with the video
ffmpeg -i in.mp4 -i logo.png -filter_complex "overlay=x=W-w-10:y=10" out.mp4
Remove the first part of a video
ffmpeg -i in.mp4 -ss hh:mm:ss -vcodec copy -acodec copy out.mp4
Remove last part of the video
ffmpeg -i in.mp4 -to hh:mm:ss -vcodec copy -acodec copy out.mp4
Remove beginning and end of video
ffmpeg -i in.mp4 -ss hh:mm:ss -to hh:mm:ss -vcodec copy -acodec copy out.mp4
Last modified: October 5th, 2021