[XviD-devel] Subtle modification to codec
pascal.massimino@free.fr
pascal.massimino at free.fr
Fri Nov 2 09:19:43 CET 2007
Alejandro,
Selon "Alejandro V.N." <anvillarroel at gmail.com>:
> Hi,
> I'd like to know if someone can help me with the following requirement:
> I would like to modifiy the codec in a very simple way (maybe change the
> header or the order of some bytes) in order to encode some video streams
> (that will be saved on a file). By doing this I'm expceting that this video
> files won't be played in using the normal xvid codec, unless I install this
> modified codec.
please try to avoid doing that. This is quite orthogonal to Open-Source
premises.
If however you still want to persue, and avoid actually using the codec
itself (for whatever reasons, including GPL), one way to proceed is to
modify the output bitstream itself, possibly on-the-fly.
At saving time: you can flip some bits here and there (e.g.: the sign
bits of AC coeffs. Using some key-generated random pattern whatever).
This only requires a minimal parsing of the video, independently of
Xvid's sources utilization.
And of course, at decoding time (when you want to play the modified video),
restore the altered bits here and there (you can even store the locations
of the bits to flip back in some metadata index or something).
Note: if you flip sign bits of AC coeffs, the video will still be
playable, but unwatchable because of the distortion.
skal
More information about the XviD-devel
mailing list