Question

In FFMPEG, there are many video decoders integrated. One of them is H264. Now, in FFMPEG, which part of the decoder is taking care of providing the decoder with necessary input data to the decoder, so that it can decode it?

I have gone through most of the code of the decoder, but am not able to find where fread of anything is happening.

All i got to know is there is a file called file.c in libavutils directory of the FFMPEG source. In this file there is a read() function used. But, how is it that the h.264 decoder conveying this to the ffmpeg to send some data to decode.

Any pointers regarding the same will be really helpful to me. Please do provide your valuable suggestions.

Thanks in advance.

Was it helpful?

Solution

ffmpeg is made of of several libraries. libavutil you already mentioned, this library provides low level access to reading data from a file or a network. Next that data is handled by libavformat. This library knows how to read the may different container formats and protocols (mp4, mkv, rtmp, etc), and extract the individual frames int the AVPacket structure. Each AVPacket is then given to the decoder which is part of libavcodec.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top