Summary

作者:罗上文,微信:Loken1,公众号:FFmpeg弦外之音

Usually, the relationship between raw data, the encoding system, and the container format is shown below:

1-1

FLV is just one of the commonly used container formats. In fact, the audio and video field has many container formats, such as MKV, RMVB, AVI, and WMV.

The codecs supported by each container format differ. For example, before 2022, H.265 was not supported by FLV in Adobe's standard documents. The rules for putting H.265 in an FLV container were only an informal convention. For details, see runner365 (Shi Wei)'s open-source ffmpeg_rtmp_h265 project.

If you want to know which codecs a container format supports, you can read the FFmpeg source code or ask GPT.

The following is part of the flvenc.c file in the FFmpeg project. This array shows which codecs are supported in the FLV container format.

static const AVCodecTag flv_video_codec_ids[] = {
    { AV_CODEC_ID_FLV1,     FLV_CODECID_H263 },
    { AV_CODEC_ID_H263,     FLV_CODECID_REALH263 },
    { AV_CODEC_ID_MPEG4,    FLV_CODECID_MPEG4 },
    { AV_CODEC_ID_FLASHSV,  FLV_CODECID_SCREEN },
    { AV_CODEC_ID_FLASHSV2, FLV_CODECID_SCREEN2 },
    { AV_CODEC_ID_VP6F,     FLV_CODECID_VP6 },
    { AV_CODEC_ID_VP6,      FLV_CODECID_VP6 },
    { AV_CODEC_ID_VP6A,     FLV_CODECID_VP6A },
    { AV_CODEC_ID_H264,     FLV_CODECID_H264 },
    { AV_CODEC_ID_HEVC,     FLV_CODECID_HEVC },
    { AV_CODEC_ID_VP8,      FLV_CODECID_VP8 },
    { AV_CODEC_ID_VP9,      FLV_CODECID_VP9 },
    { AV_CODEC_ID_NONE,     0 }
};

copyright ffmpeg-principle.com loken 2026 all right reserved,powered by Gitbookedit time: 2026-08-16 13:06:13

results matching ""

    No results matching ""