[FFmpeg-devel] [RFC] Question Regarding Parsing Files with Sections of Unknown Length and No Delimiters

Anton Khirnov anton at khirnov.net
Mon Mar 16 16:05:35 EET 2020


Quoting Anamitra Ghorui (2020-03-16 13:31:53)
> March 16, 2020 3:25 PM, "Anton Khirnov" <anton at khirnov.net> wrote:
> 
> > Quoting Anamitra Ghorui (2020-03-15 13:40:58)
> > 
> >> Hello,
> >> 
> >> I am dealing dealing with a video (gif-like) file format in which there
> >> are compressed (entropy coded) segments of unknown length. However, the length
> >> of the uncompressed segment of the file is already known. Please check the
> >> previous mail by thread if context is required. There are no markers that
> >> indicate the end of these segments, and these segments are present at the end
> >> of the file.
> >> 
> >> One additional problem is that the frames of the video are interleaved, which
> >> means that the parser will have to be provided with the whole pixel data/frame
> >> data at once, and cannot be broken into individual frames.
> > 
> > What do you mean by "interleaved" exactly?
> 
> By interleaved I meant that the frames are not stored one after the another.
> Instead, the nth row of pixels of all the frames are stored together. All
> of these pixel row blocks (from row 0 to height) are stored together for 
> each colour channel. Please refer to the diagram here for better 
> visualisation if required:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2020-February/257797.html

Impressively overcomplicated.

So yeah, either the decoder takes in the entire bitstream and then spits
out frames one by one or the demuxer does the decoding and exports
rawvideo data. The former is most likely better.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list