Stripping out encoders from the ffmpeg and mplayer package

Reinhard Tartler siretart at debian.org
Sun Sep 21 13:01:19 UTC 2008


Hello ftp-master.

I'm sorry to approach you with an pretty uneasy question, but this is
something which is on my TODO list for quite some time, and I hereby
request your input on this matter.

On Debconf 7, Sam Hocevar and me, had a conversation with James Troup
and Joerg Jaspert about mpeg encoders in the ffmpeg package. The ftpteam
was pretty surprised about the accepted encoders, and admitted that they
were accepted by accident. We therefore had no choice but removing
them. We agreed on a plan that rather disables than removes the encoders
rendering those encoders unusable.

The shell script currently found in lenny is pasted for convenience here:

# strip/clean the code from potentially dangerous patented code
for codec in 'h26.*' mpeg2video mpeg4 'msmpeg4.*'; do
    F=libavcodec/allcodecs.c
    sed -i "/REGISTER_ENCODER.*\\<$codec\\>/d" $F
    sed -i "s/REGISTER_ENCDEC\\(.*\\<$codec\\>\\)/REGISTER_DECODER\\1/" $F
    F=libavcodec/*.c
    sed -i "/AVCodec *${codec}_encoder *=/,/^[[:space:]]*}/d" $F
done

Today I did a quick check on the mplayer package to see if and how they
are complying to the request of not distributing mpeg encoders. I found
the following snippet in debian/rules:

fix-orig-source: $(D)/$(M)
	mkdir $(D)/$(E)
	# This contains the dreaded DVD decryption code. We can live without it
	#  by using libdvdread3 (and the optional library installed by
	#    http://www.debian-unofficial.org/   :-)
	cd $(D) &&  mv $(M)/libdvdcss  $(E)
	# Well this may seem a bit excessive... But this code is not useful
	#  for building the package, and most of it does not correctly state
	#  author-license-copyright:  So I throw out the baby and the bath...
	# When and if someone needs this stuff, I will carefully scrutinize
	#  it and add what is suitable.
	cd $(D) && mv $(M)/TOOLS $(E)
	#Check if upstream includes DOCS and then don't rebuild them.
	cd $(D)/$(M)/DOCS && if [ -r HTML ] ; then touch .upstream_ships_docs; fi
	# My debian dir is too different.
	cd $(D)/$(M) && mv debian debian_upstream
	# Do not support encoding in any way.
	cd $(D) && mv $(M)/mencoder.c  $(E)
	# OK, let's repackage.
	cd $(D) && mv MPlayer-$(upstreamversion) $(S) && 	 tar czf  ../mplayer_$(debian_version).orig.tar.gz $(S) &&  rm -r $(S)

This means that the mplayer package contains the objected encoders. Based
on these observations, I have the following questions:

 1. Does ftpmaster still require to remove some encoders to be removed
    from the source package?
 2. If yes, is the approach taken with the strip.sh package
    acceptable to you?
 3. What codecs do you request to be removed? I'm asking because #476644
    is requesting h261 to be reenabled again, and I've been approached
    to enable h263 as well. From what I've heared both codecs seem to be
    not be legally enforced. With your permission, I'd like to reenable
    both on the next upload to experimental.
 4. Do you request changes to be done on either the ffmpeg or mplayer 
    package?

I ask you to be constructive in your answer. I cannot give you a legal
investigation on this issue, since I don't have enough legal expertise,
motivation nor money to spend on this. Most helpful would be an answer
that allowed me to tweak the strip.sh quoted above to be edited to
comply to your request.

From what I've heard from the ffmpeg guys, it seems that the patent
holders don't really distinguish between decoders or encoders (like
debian does). They rather distinguish between distributors making money
of it and non-commercial distributions, which they do not prosecute.
This all is of course only hearsay without quotes, so YMMV. However
getting reliable references to such claims is really hard.

FWIW, I don't think redistributing unmodified ffmpeg sources is a big
problem. We have done this since the mplayer package has been accepted
into the debian archive, and nobody even noticed this. If MPEG-LA or
other organisations managing mpeg related patents would have wanted to
stop debian doing this, they would have approached us already. I
therefore believe that it would be okay for debian to leave the sources
unmangled, but disable them from the resulting binaries. If we went that
way, I could and would modify the 'stripping script' to run the
disabling at build time hed
    to enable h263 as well. From what I've heared both codecs seem to be
    not be legally enforced. With your permission, I'd like to reenable
    both on the next upload to experimental.
 4. Do you request changes to be done on either the ffmpeg or mplayer 
    package?

I ask you to be constructive in your answer. I cannot give you a legal
investigation on this issue, since I don't have enough legal expertise,
motivation nor money to spend on this. Most help



More information about the pkg-multimedia-maintainers mailing list