<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_22.04_FFMPEG</id>
	<title>Ubuntu 22.04 FFMPEG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_22.04_FFMPEG"/>
	<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=Ubuntu_22.04_FFMPEG&amp;action=history"/>
	<updated>2026-04-30T03:40:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.completenoobs.com/noobs/index.php?title=Ubuntu_22.04_FFMPEG&amp;diff=415&amp;oldid=prev</id>
		<title>Noob: Created page with &quot;=FFMPEG=  ===Installing FFmpeg on Ubuntu&lt;br&gt;=== To use FFmpeg on Ubuntu, you need to install it first. You can do this by running the following command in the terminal:&lt;br&gt; &lt;code&gt;sudo apt install ffmpeg&lt;/code&gt;&lt;br&gt; &lt;br&gt; ==Basic usage== Once you have installed FFmpeg, you can use it to perform various tasks related to video and audio processing. Here are some basic commands to get you started:&lt;br&gt;  === Convert video from one format to another=== * This command will convert...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=Ubuntu_22.04_FFMPEG&amp;diff=415&amp;oldid=prev"/>
		<updated>2023-05-11T18:45:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=FFMPEG=  ===Installing FFmpeg on Ubuntu&amp;lt;br&amp;gt;=== To use FFmpeg on Ubuntu, you need to install it first. You can do this by running the following command in the terminal:&amp;lt;br&amp;gt; &amp;lt;code&amp;gt;sudo apt install ffmpeg&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; ==Basic usage== Once you have installed FFmpeg, you can use it to perform various tasks related to video and audio processing. Here are some basic commands to get you started:&amp;lt;br&amp;gt;  === Convert video from one format to another=== * This command will convert...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=FFMPEG=&lt;br /&gt;
&lt;br /&gt;
===Installing FFmpeg on Ubuntu&amp;lt;br&amp;gt;===&lt;br /&gt;
To use FFmpeg on Ubuntu, you need to install it first. You can do this by running the following command in the terminal:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt install ffmpeg&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Basic usage==&lt;br /&gt;
Once you have installed FFmpeg, you can use it to perform various tasks related to video and audio processing. Here are some basic commands to get you started:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Convert video from one format to another===&lt;br /&gt;
* This command will convert the input_video.avi file to output_video.mp4 format.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.avi output_video.mp4&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Convert audio from one format to another===&lt;br /&gt;
* This command will convert the input_audio.mp3 file to output_audio.ogg format.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_audio.mp3 output_audio.ogg&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Extract audio from a video file===&lt;br /&gt;
* This command will extract the audio from the input_video.mp4 file and save it as output_audio.mp3.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -vn output_audio.mp3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Extract frames from a video file===&lt;br /&gt;
* This command will extract one frame per second from the input_video.mp4 file and save them as PNG images in the output_frames folder.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -r 1 -f image2 output_frames/frame05d.png&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Merge audio and video files===&lt;br /&gt;
* This command will merge the input_video.mp4 and input_audio.mp3 files and save the result as output_video.mp4.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -i input_audio.mp3 -c:v copy -c:a aac -strict experimental output_video.mp4&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==More advanced usage==&lt;br /&gt;
FFmpeg can be used for many advanced video and audio processing tasks, such as trimming, cropping, resizing, adding watermarks, etc. Here are some examples:&amp;lt;br&amp;gt;&lt;br /&gt;
=== Trim a video file===&lt;br /&gt;
* This command will trim the input_video.mp4 file from the 10th to the 20th second and save the result as output_video.mp4.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -ss 00:00:10 -to 00:00:20 -c copy output_video.mp4&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Trim a Audio file===&lt;br /&gt;
* This command will will make a 5 second copy. From 00:00:05 to 00:00:10 &lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input.mp3 -ss 00:00:05 -t 00:00:05 output.mp3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;-i&amp;lt;/b&amp;gt; input&lt;br /&gt;
* &amp;lt;b&amp;gt;-ss&amp;lt;/b&amp;gt; start time&lt;br /&gt;
* &amp;lt;b&amp;gt;-t&amp;lt;/b&amp;gt; time, for how long.&lt;br /&gt;
* Time syntax HH:MM:SS&lt;br /&gt;
* &amp;lt;b&amp;gt;output.mp3&amp;lt;/b&amp;gt; name of output file&lt;br /&gt;
&lt;br /&gt;
=== Crop a video file===&lt;br /&gt;
* This command will crop the input_video.mp4 file to 480x360 pixels, starting from (120,60) coordinates, and save the result as output_video.mp4.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -filter:v &amp;quot;crop=480:360:120:60&amp;quot; -c:a copy output_video.mp4&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Resize a video file===&lt;br /&gt;
* This command will resize the input_video.mp4 file to a width of 640 pixels and adjust the height automatically, maintaining the aspect ratio, and save the result as output_video.mp4.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -vf scale=640:-2 -c:a copy output_video.mp4&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Add a watermark to a video file===&lt;br /&gt;
* This command will add a watermark.png image to the top-left corner of the input_video.mp4 file and save the result as output_video.mp4.&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -i input_video.mp4 -i watermark.png -filter_complex &amp;quot;overlay=10:10&amp;quot; -codec:a copy output_video.mp4&amp;lt;/code&amp;gt;,br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Concatenating Videos===&lt;br /&gt;
Concatenating videos using the concat demuxer&lt;br /&gt;
The concat demuxer is a FFmpeg component that allows you to concatenate videos by creating a text file that lists the paths of the input video files in the order you want them to be concatenated.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====Create a text file====&lt;br /&gt;
Create a new text file called concat.txt and list the paths of the input video files in the order you want them to be concatenated. For example:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
file &amp;#039;/path/to/video1.mp4&amp;#039;&lt;br /&gt;
file &amp;#039;/path/to/video2.mp4&amp;#039;&lt;br /&gt;
file &amp;#039;/path/to/video3.mp4&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Concatenate the videos====&lt;br /&gt;
&amp;lt;code&amp;gt;ffmpeg -f concat -safe 0 -i concat.txt -c copy output.mp4&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This command tells FFmpeg to use the concat demuxer (&amp;lt;b&amp;gt;-f concat&amp;lt;/b&amp;gt;) and to read the input file paths from the &amp;lt;b&amp;gt;concat.txt&amp;lt;/b&amp;gt; file (&amp;lt;b&amp;gt;-i concat.txt&amp;lt;/b&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
The &amp;lt;b&amp;gt;-safe 0&amp;lt;/b&amp;gt; option is used to disable some security checks that could prevent FFmpeg from accessing the input files.&amp;lt;br&amp;gt;The &amp;lt;b&amp;gt;-c copy&amp;lt;/b&amp;gt; option is used to copy the video and audio streams from the input files to the output file without re-encoding them, which is faster and preserves the original quality.&lt;br /&gt;
&amp;lt;br&amp;gt;The &amp;lt;b&amp;gt;output.mp4&amp;lt;/b&amp;gt; parameter is the name of the output file.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Noob</name></author>
	</entry>
</feed>