Page 1 of 1
Posted: Tue Dec 13, 2016 5:55 am
How to know what are the FFMpeg APIs are used during a FFMpeg Command.
A simple command FFmpeg -i Input_file output_file
is calling APIs like
avformat_open_input(&FFMpegContext, fileNameBuffer, NULL, NULL)
avcodec_decode_video2(pVideoCodecCtx, pFrame, &frameFinished, &avPacket)
Re: FFMPEG API
Posted: Fri Jan 13, 2017 10:26 pm
As far as I have been able to tell, the only means is to compile as debug on some flavor of Linux and then step-wise debug your media's logic traveling through the ff-executable you're interested. I am doing that on ubuntu at the moment, to debug a Windows video playback library. Creating a Virtualbox unbuntu instance, with an operating and debuggable suite of ffmpeg executables took about a day. The compile guides on ffmpeg for unbuntu worked without issue.
After that, the source code itself is fairly well documented, headers specifically. What I'm lacking is good overview of avfilter, as it appears that might be necessary to filter out corrupted streamed data. But I'm not 100% on that...
Anyone knowing a better method, I'd love to know.
Re: FFMPEG API
Posted: Thu Jun 06, 2019 10:14 pm
This is the workflow that I known:
Code: Select all
transcode()->transcode_step() on ffmpeg_git\fftools\ffmpeg.c
reap_filters() on ffmpeg_git\fftools\ffmpeg.c
init_output_stream() on ffmpeg_git\fftools\ffmpeg.c
avcodec_open2() on ffmpeg_git\libavcodec\utils.c
do_video_out() on ffmpeg_git\fftools\ffmpeg.c
avcodec_send_frame() on ffmpeg_git\libavcodec\encode.c
do_encode() on ffmpeg_git\libavcodec\encode.c
avcodec_encode_video2() on ffmpeg_git\libavcodec\encode.c
I strongly recommend you to compile Ffmpeg with some printf's if you want to know more about the pipeline.