A codec is the logic to encoding or decoding a media stream, there are many different types with popular ones being H.264, HEVC (H.265) and MPEG-4.
Codecs are different to containers like MP4, MKV and MOV because a codec manages the bitrate, resolution and frames whilst the container organizes and returns the data as sequence. Think putting many frames and audio together and playing them back or when you skip ahead providing the right data.
To list all codecs in FFmpeg simply do
ffmpeg -codecs
The guide for the returned codecs is:
D..... = Decoding supported .E.... = Encoding supported ..V... = Video codec ..A... = Audio codec ..S... = Subtitle codec ...I.. = Intra frame-only codec ....L. = Lossy compression .....S = Lossless compression
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_amf h264_nvenc h264_qsv nvenc nvenc_h264 ) DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_amf hevc_nvenc hevc_qsv )
Looking at two popular codecs returned, h264 has DEV.LS whilst h265 has DEV.L meaning h265 is missing Lossless compression ability (In this version).
You can also see the encoders and decoders for each codec.
List all encoders with:
ffmpeg -encoders
This again has a key
V..... = Video A..... = Audio S..... = Subtitle .F.... = Frame-level multithreading ..S... = Slice-level multithreading ...X.. = Codec is experimental ....B. = Supports draw_horiz_band .....D = Supports direct rendering method 1
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
libx264 encoder only supports video (V) also provided is the codec.
To view more details on an encoder
ffmpeg -h encoder=libx264
This will return all options and parameters when encoding with this encode method.
The same can be done with decoders, to list all of the decoders:
ffmpeg -decoders
View more details:
ffmpeg -h decoder=aac
List all containers (formats) with FFmpeg:
ffmpeg -formats
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…