Difference between pages "Install/ru/Overview" and "FLOP:FFmpeg"

From Funtoo
< Install‎ | ru(Difference between pages)
Jump to navigation Jump to search
 
(add technical details to the FLOP)
 
Line 1: Line 1:
<noinclude>
{{FLOP
{{InstallPart|начальный обзор процесса установки, включая скачивние LiveCD и инструкцию по загрузке.}}
|Created on=2015/01/31
</noinclude>
|Summary=Funtoo Linux prefers FFmpeg. Some enlightenment about our choice and why we prefer this  or could switch to alternative in future.
== Обзор Установки ==
|Author=Oleg, Mgorny
|Maintainer=Oleg, Mgorny
|Reference Bug=FL-844
}}
== Introduction ==
FFmpeg and Libav are library sets for multimedia decoding (and more). Both libraries expose similar API and features.


Общий обзор по установке Funtoo:
Both project have common origins and diverged only recently. The developers share the same bad coding practices causing permanent lack of API and ABI stability, therefore requiring frequent rebuilds of reverse dependencies.


# [[#Live CD|Скачивание и загрузка живого диска]].
Worse than that, after the split projects use colliding SONAMEs for libraries with potentially different ABI. This means that after switching from one implementation to another, the reverse dependencies may become broken instantly (preserved-libs doesn't help) and need to be rebuilt ASAP.
# [[#Подготовка жесткого диска|Подготовка диска]].
# [[#Создание файловой системы|Создание]] и [[#Монтирование файловых систем|монтирование]] файловых систем.
# [[#Установка архива Stage 3|Установка  архива Funtoo stage]] по Вашему выбору.
# [[#Изменение корневого каталога в Funtoo|Изменение корневого каталога в новую систему]].
# [[#Скачивание дерева Portage |Скачивние дерева Portage]].
# [[#Настройка Вашей системы|Настройка вашей системы]] и [[#Настройка сети|сети]].
# [[#Конфигурация и установка ядра Линукс|Установка ядра]].
# [[#Установка загрузчика|Установка загрузчика]].
# [[#Заключительные Шаги|Заключительные шаги]].
# [[#Перегрузка системы|Перегрузка системы]].


=== Загрузочный Диск ===
Many packages for video decoding, are done via FFmpeg or Libav.  Differences between FFmpeg and Libav can have a major impact on its behavior: the number of files it can decode, whether it decodes correctly, what video and audio filters are provided, network behavior, and more.


Funtoo не предоставляет оффициального загрузочного диска Funtoo Live CD. Мы рекомендуем основанный на Gentoo- [http://www.sysresccd.org/ System Rescue CD]. Он содержит множество полезных программ и утилит и поддерживает 32-битные и 64-битные системы соответственно. Скачайте диск по следующей ссылке:
== Current status ==
=== Gentoo ===
Gentoo supports both ffmpeg and libav, with a weak preference towards libav. The preference is caused by package order in virtual/ffmpeg — when no other circumstance affects the package choice, Portage will prefer libav. However, if ffmpeg is already installed or a package incompatible with libav is requested, Portage will use ffmpeg instead.


http://www.sysresccd.org/Download
There are two major technical issues with this design:
# there is no technically correct way of forcing rebuilds on ABI changes — subslot dependencies do not work with virtuals or || () deps,
# there is no way of forcing rebuilds when switching from libav to ffmpeg, and the other way around.


{{Note|Если Вы используете старую версию System Rescue CD, '''убедитесь, что Вы выбрали <code>rescue64</code> ядро в меню загрузки, если Вы устанавливаете 64-битную систему'''. По-умолчанию, System Rescue CD ранее загружался в 32-битном режиме, хотя последние версии пытаются автоматически распознать 64-битные процессоры.}}
=== Funtoo ===
Funtoo supports only FFmpeg. It is forced by Funtoo version of virtual/ffmpeg. While this provides the ability to avoid the Gentoo issues, virtual still breaks ABI rebuilds.


==== Доступ к интернету ====
Decision made by Oleg, forced by #funtoo community and bugtracker reports.


Загрузившись с System Rescue CD, проверьте если доступ к Интернет. Доступ к Интернет необходим для установки Funtoo Linux:
== Future status ==
=== Gentoo ===
There is a planned Gentoo change which will eventually replace virtual/ffmpeg and explicit || () deps with 'libav' USE flag. The flag will be added to all packages that support both FFmpeg and libav. When the flag is enabled, the package will use libav; otherwise it will use FFmpeg. The choice of flag name is forced by the fact that USE=ffmpeg is already used as generic ffmpeg-or-libav flag.


<console>
This change fixes both Gentoo issues:
# ##i##ping www.google.com
# USE-conditional dependencies allow subslot dependencies to force rebuilds on ABI changes,
PING www.google.com (216.58.217.36) 56(84) bytes of data.
# provider change will force rebuild because of USE flag change.
64 bytes from den03s10-in-f4.1e100.net (216.58.217.36): icmp_seq=1 ttl=57 time=30.1 ms
</console>


Если пинг успешен ( Вы видите <code>64 bytes</code> сообщения как показано выше) значит Ваша сеть настроена. Нажмите Control-C для остановки комманды ping.  
The change may also eventually make it possible to install FFmpeg and libav side-by-side. Until then, the flag state would involve 'strong' preference of one implementation over the other, and user will have to change USE=libav as a global flag. '''Installing a package that supports only one of the two implementations will result in blocker that needs to be handled manually'''.


Если Вам необходимо настроить Wi-Fi для доступа к Интернет, то необходимо включить графический интерфейс System Rescue CD. Для этого запустите <code>startx</code>
=== Funtoo ===
If Funtoo decides to keep supporting FFmpeg only, it only needs to mask libav in the profiles. Then dependencies on updated packages will unconditionally use FFmpeg. Eventually Funtoo will want to remove virtual/ffmpeg and depend on media-video/ffmpeg:0= directly in forked packages.


<console>
If Funtoo decides to start supporting libav as an option, it may need to add USE="-libav" to profiles if Gentoo decides for libav default. Funtoo will want to progressively update forked packages to match Gentoo dependency specifications.
# ##i##startx
</console>


Далее, используйте NetworkManager апплет (иконка в правом нижнем углу) для подключения к доступной сети Wi-Fi. Затем, откройте консоль для осуществления последующих шагов по установке.
== Detailed information on FFmpeg and libav ==
=== FFmpeg and Libav history ===
In 2011, parts of the FFmpeg developers were unhappy about the FFmpeg leadership, and decided to take over. This didn't quite work out. Apparently Fabrice Bellard, original FFmpeg developer and owner of the ffmpeg.org domain name, decided not to hand over the domain name to the new maintainers. So they followed Plan B, and forked FFmpeg, resulting in Libav. Since then, Libav did its own development, and completely ignored whatever FFmpeg did. FFmpeg, on the other hand, started to merge literally everything Libav did.


==== Удаленная установка ====
The reason for the fork is most likely that the developers hate each other. While this formulation seems somewhat sloppy, it is most likely the truth. To this date, the #libav-devel IRC channel still has Michael Niedermayer (the FFmpeg maintainer since 2004 according to Wikipedia) on their ban list (similar misbehavior is exhibited by some FFmpeg developers). There is little to no cooperation between the two projects.


Как вариант, Вы можете использовать System Rescue CD удаленно по сети посредством SSH и осуществить установку используя другой компютер,  и это может быть более удобным способом установки Funtoo Linux.
More about FFmpeg's history and the fork incident can be found on Wikipedia


Если Вы желаете провести установку удаленно примите во внимание следующие шаги. Во-первых, Вы должны убедиться что System Rescue CD имеет настроенную сеть. Во-вторых, Вам необходимо создать пароль суперпользователя для System Rescue CD:
=== Situation today ===
FFmpeg has more features and slightly more active development than Libav, going by mailing list and commit volume. In particular, FFmpeg's features are a superset of Libav's features. This is because FFmpeg merges Libav's git master on a daily basis. Libav on the other hand seems to prefer to ignore FFmpeg development (with occasional cherry-picking of bug fixes and features).


<console>
Some Linux distributions, especially those that had Libav developers as FFmpeg package maintainers, replaced FFmpeg with Libav, while other distributions stick with FFmpeg. Application developers typically have to make sure their code works with both libraries. This can be trivial to hard, depending on the details. One larger problem is that the difference between the libraries makes it hard to keep up a consistent level of the user experience, since either library might silently or blatantly be not up to the task. It also encourages library users to implement some features themselves, rather than dealing with the library differences, or the question to which project to contribute.
# ##i##passwd
New password: ##i##********
Retype new password: ##i##********
passwd: password updated successfully
#
</console>


После введения пароля, Вам необходимо определить ай-пи адрес System Rescue CD, далее Вы можете ипользовать <code>ssh</code> для коннекта. Определить ай-пи используемый System Rescue CD,  можно коммандой <code>ifconfig</code>:
FFmpeg and Libav developers also seem to have the tendency to ignore the damage their rivalry is causing. Apparently fighting out these issues on the users' backs is better than reconciling. This means everyone using these libraries either has to suffer from the differences, or reimplement functionality that is not the same between FFmpeg and Libav.
 
{{FLOPFooter}}
<console>
# ##i##ifconfig
</console>
 
One of the interfaces should have an IP address (listed as <code>inet addr:</code>) from your LAN. You can then connect remotely, from another system on your LAN, to System Rescue CD, and perform steps from the comfort of an existing OS. On your remote system, type the following, replacing <code>1.2.3.4</code> with the IP address of System Rescue CD. Connecting from an existing Linux or MacOS system would look something like this:
 
<console>
(remote system) $ ##i##ssh root@1.2.3.4
Password: ##i##**********
</console>
 
{{Note|If you'd like to connect remotely from an existing Microsoft Windows system, you'll need to download an SSH client for Windows, such as [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].}}
 
After you've logged in via SSH, you're now connected remotely to System Rescue CD and can perform the installation steps.

Revision as of 23:22, January 31, 2015

Funtoo Linux Optimization Proposal: FFmpeg

Funtoo Linux prefers FFmpeg. Some enlightenment about our choice and why we prefer this or could switch to alternative in future.

Introduction

FFmpeg and Libav are library sets for multimedia decoding (and more). Both libraries expose similar API and features.

Both project have common origins and diverged only recently. The developers share the same bad coding practices causing permanent lack of API and ABI stability, therefore requiring frequent rebuilds of reverse dependencies.

Worse than that, after the split projects use colliding SONAMEs for libraries with potentially different ABI. This means that after switching from one implementation to another, the reverse dependencies may become broken instantly (preserved-libs doesn't help) and need to be rebuilt ASAP.

Many packages for video decoding, are done via FFmpeg or Libav. Differences between FFmpeg and Libav can have a major impact on its behavior: the number of files it can decode, whether it decodes correctly, what video and audio filters are provided, network behavior, and more.

Current status

Gentoo

Gentoo supports both ffmpeg and libav, with a weak preference towards libav. The preference is caused by package order in virtual/ffmpeg — when no other circumstance affects the package choice, Portage will prefer libav. However, if ffmpeg is already installed or a package incompatible with libav is requested, Portage will use ffmpeg instead.

There are two major technical issues with this design:

  1. there is no technically correct way of forcing rebuilds on ABI changes — subslot dependencies do not work with virtuals or || () deps,
  2. there is no way of forcing rebuilds when switching from libav to ffmpeg, and the other way around.

Funtoo

Funtoo supports only FFmpeg. It is forced by Funtoo version of virtual/ffmpeg. While this provides the ability to avoid the Gentoo issues, virtual still breaks ABI rebuilds.

Decision made by Oleg, forced by #funtoo community and bugtracker reports.

Future status

Gentoo

There is a planned Gentoo change which will eventually replace virtual/ffmpeg and explicit || () deps with 'libav' USE flag. The flag will be added to all packages that support both FFmpeg and libav. When the flag is enabled, the package will use libav; otherwise it will use FFmpeg. The choice of flag name is forced by the fact that USE=ffmpeg is already used as generic ffmpeg-or-libav flag.

This change fixes both Gentoo issues:

  1. USE-conditional dependencies allow subslot dependencies to force rebuilds on ABI changes,
  2. provider change will force rebuild because of USE flag change.

The change may also eventually make it possible to install FFmpeg and libav side-by-side. Until then, the flag state would involve 'strong' preference of one implementation over the other, and user will have to change USE=libav as a global flag. Installing a package that supports only one of the two implementations will result in blocker that needs to be handled manually.

Funtoo

If Funtoo decides to keep supporting FFmpeg only, it only needs to mask libav in the profiles. Then dependencies on updated packages will unconditionally use FFmpeg. Eventually Funtoo will want to remove virtual/ffmpeg and depend on media-video/ffmpeg:0= directly in forked packages.

If Funtoo decides to start supporting libav as an option, it may need to add USE="-libav" to profiles if Gentoo decides for libav default. Funtoo will want to progressively update forked packages to match Gentoo dependency specifications.

Detailed information on FFmpeg and libav

FFmpeg and Libav history

In 2011, parts of the FFmpeg developers were unhappy about the FFmpeg leadership, and decided to take over. This didn't quite work out. Apparently Fabrice Bellard, original FFmpeg developer and owner of the ffmpeg.org domain name, decided not to hand over the domain name to the new maintainers. So they followed Plan B, and forked FFmpeg, resulting in Libav. Since then, Libav did its own development, and completely ignored whatever FFmpeg did. FFmpeg, on the other hand, started to merge literally everything Libav did.

The reason for the fork is most likely that the developers hate each other. While this formulation seems somewhat sloppy, it is most likely the truth. To this date, the #libav-devel IRC channel still has Michael Niedermayer (the FFmpeg maintainer since 2004 according to Wikipedia) on their ban list (similar misbehavior is exhibited by some FFmpeg developers). There is little to no cooperation between the two projects.

More about FFmpeg's history and the fork incident can be found on Wikipedia

Situation today

FFmpeg has more features and slightly more active development than Libav, going by mailing list and commit volume. In particular, FFmpeg's features are a superset of Libav's features. This is because FFmpeg merges Libav's git master on a daily basis. Libav on the other hand seems to prefer to ignore FFmpeg development (with occasional cherry-picking of bug fixes and features).

Some Linux distributions, especially those that had Libav developers as FFmpeg package maintainers, replaced FFmpeg with Libav, while other distributions stick with FFmpeg. Application developers typically have to make sure their code works with both libraries. This can be trivial to hard, depending on the details. One larger problem is that the difference between the libraries makes it hard to keep up a consistent level of the user experience, since either library might silently or blatantly be not up to the task. It also encourages library users to implement some features themselves, rather than dealing with the library differences, or the question to which project to contribute.

FFmpeg and Libav developers also seem to have the tendency to ignore the damage their rivalry is causing. Apparently fighting out these issues on the users' backs is better than reconciling. This means everyone using these libraries either has to suffer from the differences, or reimplement functionality that is not the same between FFmpeg and Libav.