[NUT-devel] Codec id - random notes

Ivan Kalvachev ikalvachev at gmail.com
Sat Jun 24 00:41:15 CEST 2006


2006/6/24, Michael Niedermayer <michaelni at gmx.at>:
> Hi
>
>
> On Fri, Jun 23, 2006 at 10:17:58PM +0200, Luca Barbato wrote:
> > Michael Niedermayer wrote:
> > >
> > > please forget it! send a path to libnut and you will see its not feasable
> > >
> >
> > Well I believe you even if I'm missing why
> >
> > randomcodec_init(int workarounds) won't work
> >
> > the call would be something like codecs[tag].init(hints)
>
> i have not the faintest clue what you are talking about but storing
> workarund hints in nut would need you to solve the following
> 1. the muxer has a packet and some codec identifer (fourcc, string or other)
>    next the muxer must find the workaround hints, this requires decoding
>    several frames (the muxer needs at least a mpeg4 decoder and possible some
>    parsers for various headers of other codecs
>
> are you suggesting that the nut muxer should decode frames? yes ? no ?
> if no then from where do you want to find these hints? the muxer has
> a bunch of "opaque" bytes which are an encoded video frame and a codec
> id, things like width and height ...
>
>
> 2. the demuxer passes the hints to the codec, no codec in existance
>    can make any sense of such hints, they either can detect the buggy
>    encoder and deal with it or they cant, if half of the info has been
>    butchered (fourcc changed from xvid to mp4v) then chances are _slightly_
>    lower that the detecton will work, most of the time it will, but not
>    always
>
> you can of coarse just store the fourcc either alone or in addition to
> another identifer, that of coarse will help the decoder but i wouldnt
> call that "hints"

XviD stores  bitstream version id. It is just number that is increased
every time and encoder bug that affects decoding is fixed. If you have
this number you can set workaround for all bugs even before the first
decoded frame.
(I guess this is not available for the oldest xvid streams, but still...)

We have the trend to use tags/4cc that are format specific only,
without any codec information. If we have codec information a player
could prefer to decode the content with the same codec. For sure it
would be able to workaround its own bugs.



More information about the NUT-devel mailing list