mpeg2decode and mpeg2encode are the very old MPEG reference encoder and
decoder. The problem for distros is they are not F/OSS - the license
does not mention modification or redistribution rights, and you can't
consider them as implied. So we can't package them.

I've looked at patching ImageMagick to use something else. I think I
have a replacement that will work for decoding: this is quite simple, it
just involves replacing the 'mpeg2decode' command ImageMagick uses with
an ffmpeg command that does the same thing.

Encoding is not so straightforward. The problem is that mpeg2encode uses
a weird system that nothing else uses. The command is very simple -
mpeg2encode in.par out.mpeg . The trickery is all in the .par file,
which is essentially a one-time job configuration file: it specifies all
the details about what you actually want to encode. In the ImageMagick
source, coders/mpeg.c contains a big bunch of code to write an
appropriate .par file for the operation.

No modern, F/OSS encoder that I've found seems to be able to understand
.par files. They all expect you to just feed them a series of images
direct on the command line, which is a completely different system. So
to migrate ImageMagick from mpeg2encode to something modern you'd have
to substantially change mpeg.c to just feed out a series of YUV images,
not write a .par file, and call the delegate properly, *then* change the
delegate from mpeg2encode to mpeg2enc or ffmpeg or mencoder or whatever
you want to use. Unfortunately, my (non-existent) C skills don't extend
to that, really, though I may give it a bash.

I'll attach patches when I have something I know works.

-- 
identify command requires mpeg2decode
https://bugs.launchpad.net/bugs/59908
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to