Stripping out encoders from the ffmpeg and mplayer package

Reinhard Tartler siretart at
Tue Sep 23 10:39:33 UTC 2008

(I'm resending this email because
cannot be read. Let's hope this one gets better)

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
    sed -i "/REGISTER_ENCODER.*\\<$codec\\>/d" $F
    sed -i "s/REGISTER_ENCDEC\\(.*\\<$codec\\>\\)/REGISTER_DECODER\\1/" $F
    sed -i "/AVCodec *${codec}_encoder *=/,/^[[:space:]]*}/d" $F

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
	#   :-)
	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 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 

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 quoted above to be edited to
comply to your request.

More information about the pkg-multimedia-maintainers mailing list