func: void avcodec_string(char *buf,int buf_size,AVCodecContext *enc,int encode) const char * codec_type ; const char * codec_name ; if ( ! buf || buf_size <= 0 )  codec_type = av_get_media_type_string ( enc -> codec_type ); codec_name = avcodec_get_name ( enc -> codec_id ); const char *avcodec_get_name(enum AVCodecID id) const AVCodecDescriptor * cd ; AVCodec * codec ; if ( id == AV_CODEC_ID_NONE )  return "none" ; cd = avcodec_descriptor_get ( id ); if ( cd )  return cd -> name ; codec = avcodec_find_decoder ( id ); AVCodec *avcodec_find_decoder(enum AVCodecID id) return find_encdec ( id , 0 ) ; static AVCodec *find_encdec(enum AVCodecID id,int encoder) AVCodec * p ; AVCodec * experimental = ( ( void * ) 0 ) ; p = first_avcodec; id = remap_deprecated_codec_id ( id ); static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) switch ( id )  return AV_CODEC_ID_OPUS ; return AV_CODEC_ID_TAK ; return id ; while ( p )  if ( ( ( encoder ? av_codec_is_encoder ( p ) : av_codec_is_decoder ( p ) ) ) && ( p -> id ) == id )  int av_codec_is_decoder(const AVCodec *codec) return codec && codec -> decode ; int av_codec_is_encoder(const AVCodec *codec) return codec && ( codec -> encode_sub || codec -> encode2 ) ; if ( p -> capabilities & 0x0200 && ! experimental )  experimental = p; return p ; p = p -> next; return experimental ; if ( codec )  return codec -> name ; codec = avcodec_find_encoder ( id ); AVCodec *avcodec_find_encoder(enum AVCodecID id) return find_encdec ( id , 1 ) ; static AVCodec *find_encdec(enum AVCodecID id,int encoder) AVCodec * p ; AVCodec * experimental = ( ( void * ) 0 ) ; p = first_avcodec; id = remap_deprecated_codec_id ( id ); while ( p )  if ( ( ( encoder ? av_codec_is_encoder ( p ) : av_codec_is_decoder ( p ) ) ) && ( p -> id ) == id )  if ( p -> capabilities & 0x0200 && ! experimental )  experimental = p; return p ; p = p -> next; return experimental ; if ( codec )  return codec -> name ; return "unknown_codec" ; snprintf ( buf , buf_size , "%s: %s%s" , ( codec_type ? codec_type : "unknown" ) , codec_name , ( enc -> mb_decision ? " (hq)" : "" ) ); buf [ 0 ] ^= 'a' ^ 'A'; snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , " (%s)" , profile ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , " (%s / 0x%04X)" , tag_buf , enc -> codec_tag ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %s" , av_get_pix_fmt_name ( enc -> pix_fmt ) ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , " (%d bpc)" , enc -> bits_per_raw_sample ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %dx%d" , enc -> width , enc -> height ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , " [SAR %d:%d DAR %d:%d]" , enc -> sample_aspect_ratio . num , enc -> sample_aspect_ratio . den , display_aspect_ratio . num , display_aspect_ratio . den ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %d/%d" , enc -> time_base . num / g , enc -> time_base . den / g ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", q=%d-%d" , enc -> qmin , enc -> qmax ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %d Hz" , enc -> sample_rate ); av_strlcat ( buf , ", " , buf_size ); av_get_channel_layout_string ( buf + strlen ( buf ) , ( buf_size - strlen ( buf ) ) , enc -> channels , enc -> channel_layout ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %s" , av_get_sample_fmt_name ( enc -> sample_fmt ) ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %d/%d" , enc -> time_base . num / g , enc -> time_base . den / g ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", pass 1" ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", pass 2" ); snprintf ( buf + strlen ( buf ) , buf_size - strlen ( buf ) , ", %d kb/s" , bitrate / 1000 ); 