FFmpeg记录:文件格式记录

一、输出mp3文件

支持格式:

AV_SAMPLE_FMT_U8P
AV_SAMPLE_FMT_S16P
AV_SAMPLE_FMT_S32P
AV_SAMPLE_FMT_S64P

二、输出mp4文件

  1. 支持音频格式(aac编码)
AV_SAMPLE_FMT_FLTP

  1. 支持视频格式(x264编码)
 static const enum AVPixelFormat pix_fmts_8bit[] = {
     AV_PIX_FMT_YUV420P,
     AV_PIX_FMT_YUVJ420P,
     AV_PIX_FMT_YUV422P,
     AV_PIX_FMT_YUVJ422P,
     AV_PIX_FMT_YUV444P,
     AV_PIX_FMT_YUVJ444P,
     AV_PIX_FMT_NV12,
     AV_PIX_FMT_NV16,
 #ifdef X264_CSP_NV21
     AV_PIX_FMT_NV21,
 #endif
     AV_PIX_FMT_NONE
 };
 static const enum AVPixelFormat pix_fmts_9bit[] = {
     AV_PIX_FMT_YUV420P9,
     AV_PIX_FMT_YUV444P9,
     AV_PIX_FMT_NONE
 };
 static const enum AVPixelFormat pix_fmts_10bit[] = {
     AV_PIX_FMT_YUV420P10,
     AV_PIX_FMT_YUV422P10,
     AV_PIX_FMT_YUV444P10,
     AV_PIX_FMT_NV20,
     AV_PIX_FMT_NONE
 };
 static const enum AVPixelFormat pix_fmts_all[] = {
     AV_PIX_FMT_YUV420P,
     AV_PIX_FMT_YUVJ420P,
     AV_PIX_FMT_YUV422P,
     AV_PIX_FMT_YUVJ422P,
     AV_PIX_FMT_YUV444P,
     AV_PIX_FMT_YUVJ444P,
     AV_PIX_FMT_NV12,
     AV_PIX_FMT_NV16,
 #ifdef X264_CSP_NV21
     AV_PIX_FMT_NV21,
 #endif
     AV_PIX_FMT_YUV420P10,
     AV_PIX_FMT_YUV422P10,
     AV_PIX_FMT_YUV444P10,
     AV_PIX_FMT_NV20,
 #ifdef X264_CSP_I400
     AV_PIX_FMT_GRAY8,
     AV_PIX_FMT_GRAY10,
 #endif
     AV_PIX_FMT_NONE
 };
 #if CONFIG_LIBX264RGB_ENCODER
 static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
     AV_PIX_FMT_BGR0,
     AV_PIX_FMT_BGR24,
     AV_PIX_FMT_RGB24,
     AV_PIX_FMT_NONE
 };
 #endif

三、输出 mkv 文件

四、输出 flv 文件

posted @ 2022-11-02 11:10  小超不挑食  阅读(77)  评论(0编辑  收藏  举报