Project Managment

week 2

Back to project managment

ffmpeg

ffmpeg

FFmpeg is a free and open-source software project consisting of a large suite of libraries and programs for handling video, audio, and other multimedia files and streams. it is cross-platform solution to record, convert and stream audio and video designed for command-line -based processing of video and audio files.

Download FFmpeg

what makes ffmpeg the best choice is

you can download ffmpeg from [here]{https://ffmpeg.org/download.html)

download

There is a lot of choice , I will use the one with gpl licence The one with capital are the build that are taken straight off the github source and build from there, the one with n and followed by 4.3 or something like that are the official releases that have been built and packaged up,

unzip

After you click it and download the zip folder

unzip and add to path

after downloading ffmpeg unzip the folder and save it in a reachable location such as c:/user/ unzip

now lets add it to our system path to make it recognize where its located to make it reachable from command line

unzip and add to path

to add ffmpeg to windows path follow these steps

path01 path02 path03 path04

ffmpeg in command line

to awake ffmpeg from the comand line just type ffmpeg

ffmpegcmd

ffmpeg -i

Using ffmpeg requires that you open a command prompt window, then type ffmpeg specific commands. Here is a typical ffmpeg command: And for video we can use ffmpeg to call ffmpeg in the command line to use it with videos The first command functuin here is

Ffmpeg –i

ffmpeg - This command tells cmd that we want to run ffmpeg commands. cmd will first look for ffmpeg.exe in one of the folders from step 6 in the Installation section. If it is found, it will attempt to run the command.

-i video.mp4 - This is an input file. We are going to be doing work on this file.

Example

ffmpeg -i video.mp4 -vn -ar 44100 -ac 1 -b:a 32k -f mp3 audio.mp3

This command has four parts:
ffmpeg -

This command tells cmd that we want to run ffmpeg commands. cmd will first look for ffmpeg.exe in one of the folders from step 6 in the Installation section. If it is found, it will attempt to run the command.

-i video.mp4 -

This is an input file. We are going to be doing work on this file.

-vn -ar 44100 -ac 1 -b:a 32k -f mp3 - These are the “arguments”.

These characters are like mini commands that specify exactly what we want to do. In this case, it is saying create an mp3 file from the input source.

audio.mp3- This is the output file.
ffmpeg-i
Metadata:

Meta data give information about the creation of the file

metadata
duration, stream ,

And also you can know the duration of it and bitrate Video h264 is the video codec The size is 1900*1004 The frame rate is 10 fps The size 4327 kb/s,

dar
resize video
ffmpeg -i “media.mp4” -vf scale=1280x720 vedio-resized01.mp4

-vf means adding video filter then when need to specify what is the filter and here we used the scale filter to resize the video And then we name the output file “vedio-resized01.mp4”

resize01

The video resized from 4.95Mb to 167 KB

resized.jpg
Now I try to skip 5second from the video file and the compress using -ss
ffmpegr
The Right Dimensions

YouTube allows you to upload videos of various sizes, ranging from 240p to 2160p (4K). Let’s try to understand the dimensions for each of these sizes.

References

How To: Download+Install FFMPEG on Windows 10 by TroubleChute

Fab Web Basics / Day 05 / Image and Video Optimization

next

project managment thumbnail
Tutorial 05

learn how to resize ,compress, trim video with image ffmpeg in command line

View
project managment thumbnail
Tutorial 06

learn how to build a website for documenting using ( Hugo )

View