FFmpegの入出力機能プロセス

重要な構造

AVFormatContext 
AVCodecContext

 

0公開部分

av_register_all(); 
avfilter_register_all(); 
avformat_network_init(); 
avdevice_register_all(); 
av_log_set_level(AV_LOG_ERROR)。

 

1. INPUTパーツ

avformat_alloc_context 
av_find_input_format 
avformat_open_input 

avformat_find_stream_info 

avcodec_find_decoder 
avcodec_open2 

av_read_frame 

avcodec_decode_video2 



avformat_close_input

 

2.outputパーツ

avformat_alloc_output_context2 

avio_open2 

avcodec_find_encoder 
avcodec_alloc_context3 
avcodec_open2 

avformat_new_stream 
avcodec_copy_context 

avformat_write_header 

avcodec_encode_video2 

av_interleaved_write_frame 



av_write_trailer 
avcodec_close 
avformat_close_input

 

おすすめ

転載: www.cnblogs.com/diaoss/p/11582924.html