<p>Here are some general guidelines how to use FFmpeg. The command to use FFmpeg includes: input(s) and output(s), codec(s) and filter(s). It can include also other options, like map(s), but these are probably the very basic ones.</p>
<p>The most basic command is:</p>
<pre><code>ffmpeg -i input.mkv output.mp4
</code></pre>
<p>It includes the input file (it is defined by <code>-i</code> option) and the output file (it does not need any definition, just put its name at the end of the command). This command will convert <code>input.mkv</code> to <code>output.mp4</code> by using all the defaults of FFmpeg (including the re-encoding of streams from the input file).</p>
<p>The more advanced (but still basic) command is:</p>
<pre><code>ffmpeg -i input.mkv -c copy output.mp4
</code></pre>
<p>It will do the same as previous one but the streams from input file will not be re-encoded, they will be copied, as <code>-c</code> parameter defines a codec to use (<code>copy</code> means to copy the existing one, you can define other codec). You can define codec for video by using <code>-c:v</code> and a codec for audio by using <code>-c:a</code>. For example:</p>
<pre><code>ffmpeg -i input.mkv -c:v libx264 -c:a copy output.mp4
</code></pre>
<p>This command will re-encode video stream and copy audio stream.</p>
<p>If you want to do some more operations with the input streams (like to scale the resolution of video stream) you need to add some filters, like here:</p>
<pre><code>ffmpeg -i input.mkv -c:v libx264 -c:a copy -filter:v scale=1920:1080 output.mp4
</code></pre>
<p>The <code>-filter:v</code> defines the use of <code>scale</code> filter to set the resolution of the output. You can use many different filters and you can use many different parameters with these filters. For example:</p>
<pre><code>ffmpeg -i input.mkv -c:v libx264 -c:a copy -filter:v scale=1920:1080:flags=lanczos output.mp4
</code></pre>
<p>This command will scale the input video stream with the use of Lanczos algorithm.</p>
<p>These all options above are really just the basic ones.</p>
<p>You can find <strong>much</strong> more of them in <a href="https://ffmpeg.org/ffmpeg.html" rel="nofollow noreferrer">the documentation</a>.</p>

CC BY-SA 4.0
2022-02-05T13:27:16.513Z
2022-02-05T22:34:02.300Z
2022-02-05T22:34:02.300Z
Lex
<p>That's a very general question, you will have to ask for a specific command if you want help since ffmpeg has a loooooot of options. But you can use the following command to get help:</p>
<pre><code>-h      -- print basic options
-h long -- print more options
-h full -- print all options (including all format and codec specific options, very long)
-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol
See man ffmpeg for detailed description of the options.
</code></pre>
<p>If the output is to long you something like: ffmpeg -h |more
And it shows a part of the text on the screen everytime you pess a key...</p>

CC BY-SA 4.0
2021-05-12T08:51:41.830Z
I guess I wanted to know how to do the things that you could normally do in editors like Virtualdub or any media editor. Like for example, how do you do PointResize, Lanzcos, Fade In, Fade, Fade Out, etc.?
GAP
CC BY-SA 4.0
2021-05-11T06:36:02.910Z
2021-05-11T06:36:02.910Z
Ricardo Bohner
<p>I am finally using FFMPEG after using programs like Virtualdub2 but I do need some clarity with some of the commands. Do not get me wrong, the resources that some people sent to me do help but I do some clarity on some of the commands. When you are inputting a video to convert another video, do need to type out the file location or just the video file?</p>

CC BY-SA 4.0
2021-05-01T15:34:25.750Z
If you are in the same folder as the input video you only have to specify the name of the video. Otherwise the whole path + filename + extension, the same is valid for the output video.
Ricardo Bohner
CC BY-SA 4.0
2021-05-03T21:53:27.907Z
Are you supposed to put the path + filename + extension in quotes? I heard from another forum that you are supposed to put it in quotes as it is a command line and not a GUI.
GAP
CC BY-SA 4.0
2021-05-03T22:57:46.307Z
If the input or output file have spaces in it you have to put it in quotes but if not it is not necessary. For example:

ffmpeg -i input.avi output.mp4

but if input or output is something like:

ffmpeg -i "My input video.avi" "My output video.mp4"

than you have to use quotes...
Ricardo Bohner
CC BY-SA 4.0
2021-05-11T02:53:12.410Z
What about the other commands that FFMPEG has? Like the codecs, sizes,etc.?
GAP
<ffmpeg>
Can anyone give me a thorough explanation of some of the FFMPEG commands?
GAP
# Can anyone give me a thorough explanation of some of the FFMPEG commands?

(Asked by: username_0 on 2021-05-01)

I am finally using FFMPEG after using programs like Virtualdub2 but I do need some clarity with some of the commands. Do not get me wrong, the resources that some people sent to me do help but I do some clarity on some of the commands. When you are inputting a video to convert another video, do need to type out the file location or just the video file?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: If you are in the same folder as the input video you only have to specify the name of the video. Otherwise the whole path + filename + extension, the same is valid for the output video.  
> **username_0**: Are you supposed to put the path + filename + extension in quotes? I heard from another forum that you are supposed to put it in quotes as it is a command line and not a GUI.  
> **username_1**: If the input or output file have spaces in it you have to put it in quotes but if not it is not necessary. For example:  ffmpeg -i input.avi output.mp4  but if input or output is something like:  ffmpeg -i "My input video.avi" "My output video.mp4"  than you have to use quotes...  
> **username_0**: What about the other commands that FFMPEG has? Like the codecs, sizes,etc.?  

---

## 2 answers

### Answer by username_2 on 2022-02-05. Score: 3

Here are some general guidelines how to use FFmpeg. The command to use FFmpeg includes: input(s) and output(s), codec(s) and filter(s). It can include also other options, like map(s), but these are probably the very basic ones.
The most basic command is:
ffmpeg -i input.mkv output.mp4

It includes the input file (it is defined by -i option) and the output file (it does not need any definition, just put its name at the end of the command). This command will convert input.mkv to output.mp4 by using all the defaults of FFmpeg (including the re-encoding of streams from the input file).
The more advanced (but still basic) command is:
ffmpeg -i input.mkv -c copy output.mp4

It will do the same as previous one but the streams from input file will not be re-encoded, they will be copied, as -c parameter defines a codec to use (copy means to copy the existing one, you can define other codec). You can define codec for video by using -c:v and a codec for audio by using -c:a. For example:
ffmpeg -i input.mkv -c:v libx264 -c:a copy output.mp4

This command will re-encode video stream and copy audio stream.
If you want to do some more operations with the input streams (like to scale the resolution of video stream) you need to add some filters, like here:
ffmpeg -i input.mkv -c:v libx264 -c:a copy -filter:v scale=1920:1080 output.mp4

The -filter:v defines the use of scale filter to set the resolution of the output. You can use many different filters and you can use many different parameters with these filters. For example:
ffmpeg -i input.mkv -c:v libx264 -c:a copy -filter:v scale=1920:1080:flags=lanczos output.mp4

This command will scale the input video stream with the use of Lanczos algorithm.
These all options above are really just the basic ones.
You can find much more of them in the documentation.


---

### Answer by username_1 on 2021-05-11. Score: 0

That's a very general question, you will have to ask for a specific command if you want help since ffmpeg has a loooooot of options. But you can use the following command to get help:
-h      -- print basic options
-h long -- print more options
-h full -- print all options (including all format and codec specific options, very long)
-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol
See man ffmpeg for detailed description of the options.

If the output is to long you something like: ffmpeg -h |more
And it shows a part of the text on the screen everytime you pess a key...

> **Comments:**
> **username_0**: I guess I wanted to know how to do the things that you could normally do in editors like Virtualdub or any media editor. Like for example, how do you do PointResize, Lanzcos, Fade In, Fade, Fade Out, etc.?  

---

