[FFmpeg-devel] Reintroducing FFmpeg to Debian
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Mon Jul 28 01:20:59 CEST 2014
Hi all,
some of you may have noticed a weird ffmpeg package in the NEW queue[1].
Let me explain:
In 2011 Libav[2] was forked from FFmpeg[3]. It was a time of great
uncertainty, the fork happened with much drama that didn't help making a
technical cut, and at that peculiar time Debian switched to Libav.
Since then the two projects evolved differently, and we have now a
clearer view.
Some short answers to questions you might have now:
* Why is FFmpeg needed in Debian?
- It has features our users are asking for (mostly support for more
codecs, formats and filters)[4-6].
- Some applications break when built against Libav on Debian,
because they are developed using FFmpeg[7-10].
- There are issues[11-12] in Libav's command line tools, that can't
be reproduced with FFmpeg's tools.
- It has a big and active user and developer community. Those of
them who want to use Debian currently need to install FFmpeg from
third parties or compile their own version from source.
* Do you intend to replace Libav by FFmpeg in Debian?
No, there is no need to replace anything as long as it is maintained.
Currently the main goal is to give multimedia maintainers a choice
between the two sets of libraries to link against, and our users the
choice to use the 'ffmpeg' utility. That is possible, because the
packages are co-installable. (Only the *-dev packages conflict.)
* But I thought they were forks, why don't you just create conflicting
packages?
- Because it can't really work! If we do that, packages built with
FFmpeg won't be installable next to packages built with Libav
unless we have full binary compatibility.
- Binary compatibility can only be achieved with some tradeoffs:
a) Not all soversions of the libraries match, so we would have
to patch that away.
b) FFmpeg would have to be compiled with the configure option
--enable-incompatible-libav-abi, resulting in less tested
code paths.
c) FFmpeg and Libav would need to be updated at the same time.
d) The biggest problem is that this would allow applications only
to use the minimal set of the ABI supported by both.
* I do not believe you, explain that voodoo to me: How is it that it
won't break all of Debian and make kittens cry?
(aka: How is FFmpeg packaged for Debian?)
- We built the packages in a way that avoids filename conflicts.
The sonames of the FFmpeg libraries are suffixed with '-ffmpeg',
e.g. libavcodec-ffmpeg.so.55 instead of libavcodec.so.55.
This also means that only if a package uses pkg-config to detect
the correct linker flags, you can simply install e.g. the
libavcodec-ffmpeg-dev package and it will work transparently.
(About half the packages build with no further change, see
stats below.)
- From a user point of view, the tools have different names anyway,
e.g. ffmpeg and avconv, except for qt-faststart, which is
therefore packaged in a separate binary package that diverts
the Libav version to qt-faststart.libav.
Yes, you can have /usr/bin/ffmpeg and /usr/bin/avconv at the same
time without conflicts.
- The development packages have to conflict, because they provide
header files (and pkg-config files) with identical names in
identical locations.
- To avoid potential problems when a program is linked against
FFmpeg libraries and other libraries, which in turn are linked
against Libav, the symbol versions are changed to e.g.
LIBAVCODEC_FFMPEG_55 instead of LIBAVCODEC_55.
* Ok, let's say I'm a multimedia maintainer and want to try out
building my package against your ffmpeg, what should I do?
- If your package uses pkg-config, which is commonly the case, all
you have to do is to replace all lib{av,swscale,postproc}*-dev
build-dependencies by lib{av,swscale,postproc}*-ffmpeg-dev.
You can keep the Libav build-dependencies as alternatives.
- In the (odd) case your upstream doesn't use pkg-config
(52 packages), it's probably a good idea to start using it, so
that the program can be easily built with both.
The patches are usually quite simple as you can see in this
example:
--- squeezelite-1.6.orig/Makefile
+++ squeezelite-1.6/Makefile
@@ -26,7 +26,7 @@ LINK_ALSA = -lasound
LINK_PORTAUDIO = -lportaudio
LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
-LINKALL_FF = -lavcodec -lavformat -lavutil
+LINKALL_FF = $(shell pkg-config --libs libavcodec libavformat
libavutil)
LINKALL_RESAMPLE = -lsoxr
DEPS = squeezelite.h slimproto.h
Patches for packages using Autoconf or Cmake are similarly
straight-forward.
- Sometimes other minor adjustments are needed. (13 packages)
- There are only 2 packages (opencv and ffms2) that would trigger a
needed transition, but that would be quite manageable as only 4
packages (3 on opencv and 1 on ffms2) depend on both libav*-dev
and the transition-needed library (libopencv-highgui-dev and
libffms2-dev).
Note that the dependencies of libopencv-highgui-dev on
libavcodec-dev, libavformat-dev and libswcale-dev seem
to be unnecessary[13].
* Does it make sense for me to switch my package?
The rule of thumb is, if your upstream uses FFmpeg for development
you probably want to switch to using it, too.
Of the 108 current reverse-build-dependencies of src:libav,
50 only need build-dependency adjustments,
50 can be patched to work with FFmpeg already,
5 can only be patched once FFmpeg is through NEW,
2 FTBFS since a long time and are not in testing [14-15] and
1 currently FTBFS for unrelated reasons [16].
Attached results.txt contains a per package list.
Any maintainer interested in switching should get in touch, and we'll
gladly help preparing the transition. When we're done dealing with those
early birds we intend to file wishlist bugs with patches on other
packages to help maintainers transition if they want to. (We already
have patches for the affected packages.)
The FFmpeg version currently in NEW has been there for more than
2 months and is thus outdated. If you want to test the current
packages, you can build them from the repository on Alioth [17]
(e.g. using git-buildpackage).
Furthermore, we'd like to move the FFmpeg packaging under the umbrella
of the pkg-multimedia team, because this would facilitate future FFmpeg
transitions.
Best regards,
Andreas (on behalf of the FFmpeg team)
1: https://ftp-master.debian.org/new/ffmpeg_7:2.2.1-1.html
2: https://libav.org/
3: https://ffmpeg.org/
4: http://lucy.pkh.me/diff/
5: https://bugs.debian.org/707476
6: https://bugs.debian.org/694616
7: https://bugs.debian.org/732159
8: https://bugs.debian.org/741170
9: https://bugs.debian.org/742896
10: https://bugs.debian.org/745060
11: https://bugs.debian.org/692876
12: https://bugs.debian.org/753923
13: https://bugs.debian.org/745934
14: https://bugs.debian.org/723099
15: https://bugs.debian.org/720796
16: https://bugs.debian.org/747536
17: https://anonscm.debian.org/gitweb/?p=collab-maint/ffmpeg.git;a=summary
-------------- next part --------------
108 Packages in sid
1. Package: taoframework
1. result: FAILS // RC (not in testing); #723099: patch disabling FFmpeg plugin
2. Package: acoustid-fingerprinter
2. result: OK // PATCH pkg-config; PATCH CodecID
3. Package: alsa-plugins
3. result: OK
4. Package: amarok
4. result: FAILS // FTBFS: B-D conflict: #747536, pending; PATCH_pkg-config
5. Package: amide
5. result: OK // PATCH pkg-config
6. Package: aubio
6. result: OK
7. Package: audacious-plugins
7. result: OK
8. Package: audacity
8. result: OK
9. Package: avbin
9. result: OK // PATCH pkg-config
10. Package: avifile
10. result: OK // PATCH pkg-config
11. Package: bino
11. result: OK
12. Package: blender
12. result: OK // PATCH pkg-config
13. Package: cantata
13. result: OK // PATCH pkg-config
14. Package: chromaprint
14. result: OK // PATCH pkg-config
15. Package: cmus
15. result: OK
16. Package: dff
16. result: OK // PATCH pkg-config
17. Package: dvbcut
17. result: OK // PATCH pkg-config
18. Package: dvswitch
18. result: OK // PATCH CodecID -*- FTBFS Libav 10 (#747868): removed avcodec_encode_video, patch
19. Package: ffdiaporama
19. result: OK // PATCH pkg-config; PATCH remove incompatible-libav-ABI -*- breaks compilation with Libav 10
20. Package: ffmpeg2theora
20. result: OK
21. Package: ffmpegthumbnailer
21. result: OK
22. Package: ffmpegthumbs
22. result: OK // PATCH pkg-config
23. Package: ffms2 [STAGE1]
23. result: OK
24. Package: forked-daapd
24. result: OK // PATCH pkg-config
25. Package: freecad // BUILD-DEPENDENCY: libopencv-highgui-dev
25. result: OK
26. Package: freerdp
26. result: OK // PATCH pkg-config
27. Package: fuse-emulator-utils
27. result: OK // PATCH pkg-config
28. Package: gegl
28. result: OK
29. Package: gimp-gap
29. result: OK // spurious build-dependencies #748857
30. Package: gmerlin-avdecoder
30. result: OK
31. Package: gmerlin-encoders
31. result: OK
32. Package: gmic
32. result: OK // spurious build-dependencies #755815; BUILD_DEPENDENCY: libopencv-highgui-dev
33. Package: gnash
33. result: OK
34. Package: goldendict
34. result: OK
35. Package: gpac
35. result: OK // PATCH pkg-config
36. Package: gst-libav1.0
36. result: OK
37. Package: gstreamer0.10-ffmpeg
37. result: FAILS // RC (not in testing) FTBFS libav9: #720796
38. Package: guvcview
38. result: OK
39. Package: handbrake
39. result: OK // PATCH pkg-config
40. Package: harvid
40. result: OK
41. Package: hedgewars
41. result: OK // PATCH pkg-config
42. Package: idjc
42. result: OK // PATCH pkg-config
43. Package: jitsi
43. result: OK // PATCH pkg-config
44. Package: jugglemaster
44. result: OK // PATCH pkg-config
45. Package: k3b
45. result: OK // PATCH pkg-config; PATCH CodecID, reenable plugin (#739312) -*- removed av_close_input_file / avcodec_decode_audio3
46. Package: kdenlive
46. result: OK // spurious build-dependencies #748277
47. Package: kfilemetadata
47. result: OK // PATCH pkg-config
48. Package: kid3
48. result: OK // PATCH pkg-config
49. Package: kino
49. result: OK
50. Package: kradio4
50. result: OK
51. Package: lebiniou
51. result: OK
52. Package: libam7xxx
52. result: OK // PATCH pkg-config
53. Package: libavg
53. result: OK
54. Package: libextractor
54. result: OK // PATCH pkg-config; PATCH missing BDs for FFmpeg plugin (#755810)
55. Package: libgroove
55. result: OK // PATCH pkg-config
56. Package: libomxil-bellagio
56. result: OK // spurious build-dependencies #748156
57. Package: libphash // BUILD-DEPENDENCY: libopencv-highgui-dev
57. result: OK // PATCH pkg-config
58. Package: libpostproc
58. result: OK
59. Package: libquicktime
59. result: OK
60. Package: libvdpau-va-gl
60. result: OK
61. Package: lightspark
61. result: OK
62. Package: linphone
62. result: OK // PATCH pkg-config
63. Package: lives
63. result: OK // PATCH pkg-config
64. Package: lynkeos.app
64. result: OK // PATCH pkg-config
65. Package: mediatomb
65. result: OK // PATCH pkg-config
66. Package: minidlna
66. result: OK // PATCH pkg-config
67. Package: miro
67. result: OK // PATCH pkg-config; PATCH CodecID (#748861)
68. Package: mlt
68. result: OK // PATCH pkg-config
69. Package: moc
69. result: OK
70. Package: motion
70. result: OK // PATCH pkg-config
71. Package: mpd
71. result: OK
72. Package: mplayer2
72. result: OK // PATCH FF_INPUT_BUFFER_PADDING_SIZE
73. Package: mpv
73. result: OK
74. Package: nepomuk-core
74. result: OK // PATCH pkg-config
75. Package: netgen
75. result: OK // PATCH pkg-config; PATCH CodecID, reenable plugin (#751344) -*- FTBFS Libav 10: removed avcodec_encode_video
76. Package: opal
76. result: OK
77. Package: opencv [STAGE1]
77. result: OK
78. Package: openscenegraph
78. result: OK // PATCH pkg-config
79. Package: ovito
79. result: OK // PATCH pkg-config
80. Package: paraview
80. result: OK // PATCH pkg-config
81. Package: performous
81. result: OK // PATCH pkg-config
82. Package: qmmp
82. result: OK
83. Package: qutecom
83. result: OK // PATCH pkg-config
84. Package: renpy
84. result: OK // PATCH pkg-config; PATCH remove deprecated macros
85. Package: shotdetect
85. result: OK // PATCH pkg-config
86. Package: silan
86. result: OK
87. Package: spek
87. result: OK
88. Package: squeezelite
88. result: OK // PATCH pkg-config
89. Package: strigi
89. result: OK // PATCH pkg-config
90. Package: survex
90. result: OK // PATCH pkg-config
91. Package: transcode
91. result: OK
92. Package: tupi
92. result: OK // PATCH pkg-config
93. Package: vdr-plugin-xineliboutput
93. result: OK
94. Package: vice
94. result: OK
95. Package: visp // BUILD-DEPENDENCY: libopencv-highgui-dev
95. result: OK
96. Package: vlc
96. result: OK
97. Package: vtk
97. result: OK // PATCH pkg-config
98. Package: vtk6
98. result: OK // PATCH pkg-config
99. Package: wxsvg
99. result: OK
100. Package: x264 // BUILD-DEPENDENCY: libffms2-dev
100. result: OK
101. Package: xbmc
101. result: OK // PATCH remove --enable-libav -*- Libav incompatible
102. Package: xbmc-pvr-addons
102. result: OK // spurious build-dependencies #755818
103. Package: xine-lib-1.2
103. result: OK
104. Package: xjadeo
104. result: OK
105. Package: xmms2
105. result: OK
106. Package: xpra
106. result: OK
107. Package: yorick-av
107. result: OK // PATCH pkg-config
108. Package: zoneminder
108. result: OK // PATCH pkg-config; PATCH libgcrypt (#745819)
Summmary:
sid---------------------------------------------108
building: 41
spurious dependency: 5
build-dependency update: 4
pkg-config patch: 44
pkg-config + other patch: 8
other patch: 3
------------------------------------------------105
FTBFS: 1
RC buggy: 2
--------------------------------------------------3
More information about the ffmpeg-devel
mailing list