Question

I have integrated a custom decoder on FFMPEG framework. The output of this decoder is YUV420 frames, which if required i can convert it to RGB24 frames.

These frames are generated in one of my custom functions. So in order to render these frames on FFPLAY window what has to be done? Is there any specific syntax or procedure to follow?

I'm really new to FFPLAY and have searched enough over this topic on net, but have not got anything related to this issue. If anyone can provide any answers or suggestions regarding this, it will be of great help to me.

Thanks in advance.

--Regards

Was it helpful?

Solution

I'm a bit rusty on hacking codecs for FFmpeg, but I just checked out the latest git source and I'm assuming that you are working from the same copy. I am further assuming that you inserted your decoder alongside the rest of the codecs in the libavcodec/ directory and that when you build the program and run ffmpeg -formats, you see your new decoder mentioned.

If this is all true, then I will assume that your decoder module exports an init() function which expects to receive a pointer to a AVCodecContext function. This data structure has a member named pix_fmt and this should be set to AV_PIX_FMT_YUV420P in your decoder's case in order to indicate planar YUV 4:2:0.

If this doesn't work, try using the ffmpeg tool to decode the file to the null target, just to test that your decoder is doing something:

ffmpeg -i yourfile.ext -f null /dev/null

Amend your question with the output from this command to give us further clues.

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