Am So., 29. März 2020 um 16:45 Uhr schrieb Gautam Ramakrishnan
<gautamr...@gmail.com>:

> > > What exactly does a parser do and how is it different from a decoder?
> > > I am unable to understand the exact use case of a parser.
> >
> > Try the following:
> > $ cat 1.jpg 2.jpg | ffmpeg -i -f null -
> > (Is expected to decode two frames as can be seen in the console output,
> > also works for example with png)
> >
> > $ cat 1.j2k 2.j2k | ffmpeg -i - -f null -
> > Will only decode one frame because there is no parser to split the
> > input.
> >
> So does it basically try to find the SOC marker and EOC markers and
> split the streams into frames?

Basically, yes.
Look at existing parsers in libavcodec/*parser* (or git grep AVCodecParser),
especially the jpeg parser.

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to