Hii,
How to know what are the FFMpeg APIs are used during a FFMpeg Command.
e.g.
A simple command FFmpeg -i Input_file output_file
is calling APIs like
av_register_all()
avformat_open_input(&FFMpegContext, fileNameBuffer, NULL, NULL)
avformat_find_stream_info(FFMpegContext, NULL)
avcodec_find_decoder(codec_id)
avcodec_decode_video2(pVideoCodecCtx, pFrame, &frameFinished, &avPacket)
etc..
Thanks
FFMPEG API
Re: FFMPEG API
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.
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.
-
- Posts: 3
- Joined: Thu Jun 06, 2019 9:44 pm
Re: FFMPEG API
This is the workflow that I known:
I strongly recommend you to compile Ffmpeg with some printf's if you want to know more about the pipeline.
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
//codecs pipeline
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
//codec pipeline
'