diff --git a/sources/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md b/sources/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md deleted file mode 100644 index 3b0c307b9c..0000000000 --- a/sources/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" -[#]: via: "https://www.debugpoint.com/install-ffmpeg-ubuntu/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install FFmpeg in Ubuntu and Other Linux -====== - -**This tutorial outlines the steps required to install FFmpeg in Ubuntu and Other Linux systems.** - -The ffmpeg is a collection library and software program to manipulate multimedia files. The entire ffmpeg is a robust set of libraries that allows you to convert, stream, and manipulate audio and video files. Many frontend Linux applications use it as a backend and hence depend on it. For example, a screen recording application may need ffmpeg to convert recorded streams to gif images. - -Popular applications and services that use FFmpeg are VLC Media Player, YouTube, Blender, Kodi, Shotcut, and Handbrake – to name a few. - -Fun fact: NASA’s Mars 2020 mission rover Perseverance used FFmpeg to complete and process images and video before beaming back to Earth! - -### About ffmpeg package - -The [ffmpeg][1] itself is a powerful program as a command-line utility. It is available for Linux, Windows, and macOS and supports many architectures. It is written in C and Assembly, providing extensive performance and a cross-platform utility. - -#### The Core - -The core of ffmpeg is the command-line utility or programs. They can be used on the command line or called from any programming language. For example, you can use these from your shell program, python script, etc. - -- **ffmpeg**: Used to convert audio and video streams, including sources from LIVE streams such as TV cards -- **ffplay**: Media player bundled in this package to play media -- **ffprobe**: Command line tool to show media information – can output as txtm csv, xml, json formats - -### FFmpeg Installation - -Installing FFmpeg is easy in Ubuntu and other Linux distributions. Open a terminal prompt and run the following commands to install. - -#### Ubuntu and similar distro - -``` -sudo apt install ffmpeg -``` - -#### Fedora - -For Fedora Linux, you need to add the [RPM Fusion repo][2] for FFmpeg. The official Fedora repo doesn’t have the FFmpeg package. - -``` -sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -``` - -``` -sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- -``` - -``` -sudo dnf install ffmpeg -``` - -#### Arch Linux - -``` -pacman -S ffmpeg -``` - -After the successful installation, you can verify the installation using the below command. - -``` -ffmpeg --version -``` - -![FFmpeg installed in Ubuntu Linux][3] - -### Example: How to do basic tasks using ffmpeg - -First, let me give you a simple example of the basic syntax. Consider the following example. It simply converts an mp4 file to mkv file. - -- **Convert a basic video file** - -``` -ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv -``` - -Of course, this is the easiest method, but it’s not complete because it doesn’t have the bit rate, resolution and other attributes of the video file required for the conversion. - -- **Convert an audio file** - -Secondly, you can convert an audio file using a similar command. - -``` -ffmpeg -i sunny_day.ogg sunny_day.mp3 -``` - -- **Convert with an audio and video codec** - -Finally, the following example can convert a video file using specified codecs. The parameter `-c` with `a` or `v` defines audio and video, respectively. The below command uses `libvpx` video and `libvorbis` audio codec for conversion. - -``` -ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm -``` - -### How to find out about the available codecs, encoders and decoders in your system? - -#### List all codecs - -To list all the codecs available, run the below command. - -``` -ffmpeg -codecs -``` - -This command lists all the codecs available with their capability, whether they support decoding or encoding, etc. Moreover, they are identified with the position as per the below table. - -``` -D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression -``` - -![FFmpeg Codec list][4] - -#### List all encoders - -Listing all the encoders is accessible via the below command. - -``` -ffmpeg -encoders -``` - -#### List all decoders - -Similarly, the decoders list you can get via the below command. - -``` -ffmpeg -decoders -``` - -#### Details - -You can also get more details about the encoders or decoders using the parameter -h. - -``` -ffmpeg -h decoder=mp3 -``` - -### Summary - -I hope you learned the basics of FFmpeg and its commands. You can learn more about the program via the official [documentation][5]. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/install-ffmpeg-ubuntu/ - -作者:[Arindam][a] -选题:[lkxed][b] -译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lkxed -[1]: https://ffmpeg.org/ -[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ -[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg -[5]: https://ffmpeg.org/documentation.html diff --git a/translated/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md b/translated/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..63ebd28355 --- /dev/null +++ b/translated/tech/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md @@ -0,0 +1,171 @@ +[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/install-ffmpeg-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 和其他 Linux 发行版中安装 FFmpeg +====== + +**本教程讲述了在 Ubuntu 和其他 Linux 系统中安装 FFmpeg 所需的步骤。** + +FFmpeg 是一系列用于操作多媒体文件的库和软件程序。整个 ffmpeg 是一组强大的库,允许您转换,推流和操作音频和视频文件。许多前端 Linux 应用程序将其用作后端并依赖它。例如,屏幕录制应用程序可能需要 ffmpeg 将录制的流转换为 gif 图像。 + +主流的应用程序和服务,如 VLC 媒体播放器,YouTube,Blender,Kodi,Shotcut 和 Handbrake 等,都使用 FFmpeg。 + +趣事:NASA 2020 年发射的毅力号火星探测器使用 FFmpeg 完成和处理图像和视频,然后将其发送回地球! + +### 关于 ffmpeg 包 + +[FFmped][1] 是一个强大的命令行工具。它支持 Linux,Windows 和 macOS,并支持多种架构。它是用 C 和汇编编写的,提供了强大的性能和跨平台实用性。 + +#### 核心 + +FFmpeg 的核心是命令行实用程序。它们可以在命令行上使用,也可以从任何编程语言中调用。例如,您可以从 shell 程序,python 脚本等程序中使用它们。 + +- **ffmpeg**:用于转换音频和视频流,包括来自 TV 卡等 LIVE 流的源 +- **ffplay**:此软件包中捆绑的媒体播放器,用于播放媒体 +- **ffprobe**:命令行工具,用于显示媒体信息 - 可以以 txtm,csv,xml,json 格式输出 + +### FFmpeg 安装 + +安装 FFmpeg 在 Ubuntu 和其他 Linux 发行版中很容易。打开终端并运行以下命令以安装。 + +#### Ubuntu 以及相似的发行版 + +``` bash +sudo apt install ffmpeg +``` + +#### Fedora + +对于 Fedora Linux,您需要添加 [RPM Fusion repo][2]。Fedora 官方仓库没有 FFmpeg 包。 + +``` bash +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +``` bash +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- +``` + +``` bash +sudo dnf install ffmpeg +``` + +#### Arch Linux + +``` bash +pacman -S ffmpeg +``` + +在安装完成后,您可以使用以下命令验证安装。 + +``` bash +ffmpeg --version +``` + +![Ubuntu Linux 中安装的 FFmpeg][3] + +### 示例:ffmpeg 的基础用法 + +首先,让我给你一个简单的例子。考虑以下示例。它只是将 mp4 文件转换为 mkv 文件。 + +- **转换基本视频文件** + +``` bash +ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +``` + +当然,这是最简单的方法,但它不完整,因为它没有转换所需的视频文件的比特率,分辨率和其他属性。 + +- **转换一个音频文件** + +第二,您可以使用类似的命令转换音频文件。 + +``` bash +ffmpeg -i sunny_day.ogg sunny_day.mp3 +``` + +- **使用音频和视频编解码器转换** + +最后,以下示例可以使用指定的编解码器转换视频文件。参数 `-c` 与 `a` 或 `v` 分别定义音频和视频。下面的命令使用 `libvpx` 视频和 `libvorbis` 音频编解码器进行转换。 + +``` bash +ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +``` + +### 如何找出系统中可用的编解码器,编码器和解码器? + +#### 列出所有编解码器 + +要列出所有可用的编解码器,请运行以下命令。 + +``` bash +ffmpeg -codecs +``` + +该命令列出了所有可用的编解码器及其功能,是否支持解码或编码等。此外,它们根据下表的位置进行标识。 + +``` plain +D..... = Decoding supported +.E.... = Encoding supported +..V... = Video codec +..A... = Audio codec +..S... = Subtitle codec +...I.. = Intra frame-only codec +....L. = Lossy compression +.....S = Lossless compression +``` + +![FFmpeg 编码器列表][4] + +### 列出所有编码器 + +通过以下命令列出所有编码器。 + +``` bash +ffmpeg -encoders +``` + +#### 列出所有解码器 + +同样的,您可以通过以下命令获取解码器列表。 + +``` bash +ffmpeg -decoders +``` + +#### 详细信息 + +你还可以使用参数 -h 获取编码器或解码器的更多详细信息。 + +``` bash +ffmpeg -h decoder=mp3 +``` + +### 总结 + +我希望你学会了 FFmpeg 和它的命令的基础知识。您可以通过[官方文档][5]了解更多有关该程序的信息。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-ffmpeg-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://ffmpeg.org/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg +[5]: https://ffmpeg.org/documentation.html