---
title: 'The basics of FFMPEG | DenshiHelp'
source: 'https://youtube.com/watch?v=2p_Ks1ErH78'
video_id: '2p_Ks1ErH78'
date: 2026-06-16
duration_sec: 0
---

# The basics of FFMPEG | DenshiHelp

> Source: [The basics of FFMPEG | DenshiHelp](https://youtube.com/watch?v=2p_Ks1ErH78)

## Summary



## Transcript

hello i'm denchi and in today's video
i'm going to be showing you how to use
ffmpeg with some basic examples so i'll
just get rid of a bunch of files here
real quick
and just pretend i only have one file
here outro.mp4 now if i double click on
this and i play it back
[Music]
you'll notice just the outro from all my
videos and
yeah that's what i use is my outro let's
say i want to convert it
to an mkv for example well i have a
program named
ffmpeg and if you're running linux and
you have a desktop environment installed
this is already on your system including
all the codecs that are going to need to
do all the conversions
so let's say i want to convert this file
so i'm going to do ffmpeg-i
outro so i means input and if i don't
give it any
any other parameters and just press
enter it will give me information on the
file
so as you can see here it tells me that
um stream00
it's using the hevc encoder which is a
modern functional
encoder you 420p like pixel format
it's at 1920 by 1080 in terms of
resolution it's at 60fps
and all of the stuff for audio it's
using aac it's a 48
000 hertz sample rate stereo and 128
kilobytes per second as the bit rate um
so yeah all of that stuff
now let's say i want to convert it to an
mkv without
any parameters fmpeg defaults to a bunch
of stuff that it has pre-built in it
i can just tell it to convert it to
outro dot mk so it might take a little
bit of time because this is
a 20 second long video but eventually
after i've done running this command so
outro that mp4
auto mkv just specifying i want it to go
from this is my input to just this
output
i get an output and if i double click
and play this
you'll see it's it's pretty much the
same thing now what if i want to specify
a different encoder so
this used h264 as the encoder because by
default
ffmpeg will try to use h64 when
converting things to mkv
let's say i want to use um h265 or hevc
i can do dash c v
and specify lib x265
as my video codec same for audio if i
want to use aac for example which is
higher quality
lossless audio i can do dash c colon a
aac i can give them more options
so for example i want to scale the video
i can do dash
s and like 1280 x 720
that's 720p let's say i want to give it
a rate i'll i'll keep this for now
in the meantime before i talk about more
options i'm going to quickly um
run this and cancel it so i have it
saved i'm going to talk about how to
actually get the encoder list so
you saw me write out lib x265 how do i
know what all the encoders are well if
you want to see all the encoders
you do ffmpeg dash encoders
and that will print them all out if i
want all of those to go to like a file
just do ffmpeg
encoders and send them over to like i
don't know
[Music]
encoders.txt so there you go
and it will create encoders.txt you can
look through these uh
and there's all the encoders you can
possibly use on a system
now not all of these might work with
your system maybe you don't have the
hardware for some of the some of these
or your processors too old or
or maybe they're just not supporting
enough that certain things downloaded or
something like that
but most of these should work and the
reason all of these are here is because
video comes in many variations so the
one i use
was let's see if i can spot it here we
are uh lib
x265 so this is s265 also known as hevc
uh h264 this is the nvidia version but
up here
we got h64va api so that's the version
for um video accelerated stuff
um and then somewhere up there here we
are you'll find
libx 264 so that's h64 so that's the
actual you know
standard codec anyway but this isn't
what's important now let's go back to
where we were uh before i think i need
to go
uh wait a second you know open up the
main toolbar
and not maintain sorry uh settings uh
show tabs go back to the previous file i
was in
this one anyway so back to what i was
talking about before
let's say i want to take i don't know
let's just delete this file let's say i
want to take
outro that mp4 and convert it uh with
what i was doing before
uh this um i want to use aac as my audio
codec
x265 as my video codec basically the
best ones out there pretty much
and i want the resolution to be 720p
let's say i want to
change the audio rate so rate colon
a and i give it something like 44
100 a common audio rate uh just
give it a couple spaces so things are a
little bit more evenly formatted here
um spaces don't matter let's say i want
to change the
video bit rate dash b the one megabyte
at most it can reach one megabyte per
second
most likely won't but if i really want
to uh or let's say i want the audio
bitrate to be something i can do
dash b a and bitrate audio and set it to
192 kilo
kilobytes per second or kilohertz no not
killer it's kilobytes per second
um now setting video like uh bitrates is
pretty pointless when you're using
something like x365 or h264 all that
stuff because there's already an inbuilt
utility for it it's called
crf and it's much better it's uh very
varying the bit rate
uh based off a number you give it so the
lower the number is
the better the quality will be but the
bigger the following follows
so let's say i want it to be 24. 24 is a
good number uh i
most of my videos are you know 20 i set
the crf rate to 24 when i compress them
including this one it's 24. and um
you know as you can see it looks pretty
good if you need higher quality
20 but like it's pretty
indistinguishable like a little bit
maybe with more noisy video but you know
for most video it's perfectly fine
anyway moving on let's say i want to
change the duration as well this video
i can do dash ss to declare what i
wanted to start i wanted to start at
well zero hours zero minutes zero
seconds
and zero milliseconds and let's say i
want it to end so dash
t at zero hours zero minutes
and zero five seconds and zero
milliseconds
i can also that's pretty much it no so
i'm going to do after outside mp4 i'm
going to use x265 i'm going to set my
codec to aac for audio
i'm going to scale it down to 720p
change the audio bitrate to
44 100. i use crf 24 so you know pretty
good quality for
h.265 and stuff set my bitrate of audio
to 192 kilobytes per second
uh start the video at zero zero just the
beginning of the video
and end it at five seconds so let's
press enter and let it work
since it only had to do five seconds it
was relatively quick and if we play this
back
as you can see it lasts five seconds
it's in 720p and
everything has been applied so ffmpeg is
a really powerful tool when you want to
mask convert files because you could
just write a script and and mass convert
every single mp4 file to
a different format or every single mp4
file compress it to something else or or
something like that
and let's say i want to take this
outro.mp4 file
and turn it into audio well that's the
same concept dash i
altered it before if i want to specify a
specific audio codec i guess i don't
know
lib opus or something but i'm just going
to say outro dot wav
let's just turn it into a waff instantly
done there you go australia double click
that
and as you can see it plays back because
i've converted it to audio
and here right before i end this video
because i've talked about all the main
options
let's do a fun little experiment let's
transform this outdoor.web and this
image into a video
so i'm going to take out that wav and
essentially mix it with this image so
i'm going to do ffmpeg
dash i outro
and then dash i image.png and i'm going
to specify
a specific codec so let's say i want
libx265 relatively good the crf
i don't know 20
20 20 is pretty good in terms of quality
images are a little bit messed up when
it comes to this kind of stuff
and let's say i want um something like
uh
audio codecs okay i might want to
specify a bitrate for audio though so
i'm going to do b
a and set it to 192 kilohertz so let's
press enter on this
and oh yeah i forgot to set an output
file so wait a second i'm going to
specify i want it to be
outro image dot mp4 press
enter and just let it convert there you
go it's already done double click on
this
and as you can see it's the image with
the audio it's just you know the image
playing back in it and it has the audio
from uh outro dot uh wove which is just
you know just the raw
20 second audio and it mixes it with
this image so if you've ever wanted to
just have a still image
and you're talking you can make that
pretty easily in the file itself is
negligible in terms of sizes it's
minuscule it's 489 kilobytes so if you
ever need to make a video where it's
just like
an image and that's all you can do that
pretty easily with this
so anyway thanks for watching my video
on how to use you know ffmpeg with some
basic options
i'll have all a bunch of examples in the
description if you want to take a look
at them i'll just have this entire thing
in the description actually
um and yeah ffmpeg is a really useful
tool i recommend if you're into video
stuff
you learn how to use it uh the best
encoders for video
are at the moment lib x265
best encoder for audio is aac because
high quality
x265 is you know as long as you set your
crf rate appropriately it's going to be
perfectly fine in terms of quality
might be a little slow because
processors and stuff um if you need to
deal with
something like nvidia and coding you can
do obviously what was it called um
nvenk uh underscore hevc that's another
codec you can use but it's it's or
actually i think it's hebc underscore
and bank
and it's it's fast but it isn't as
precise because
gpus aren't like perfect like processors
when it comes to video and
the file sizes will be larger and it
won't be as you know good
it won't be as high quality video but
yeah that's pretty much it
thanks for watching my video goodbye
[Music]
you
