zezhong zhang
zezhong zhang

Reputation: 11

How to avoid `--enable-small` compiling option in FFmpeg causing hevc decoder’s profiles to be null and throwing an error?

When compiling FFmpeg 7.1 with the --enable-small option, I encountered an issue where the profiles field in the ff_hevc_decoder structure is set to null, causing the following error: Unknown profile bitstream.
error image here (using AV_LOG_DEBUG debug level for easier analysis. This error still occurs when not using that)
This error does not affect decoding itself, but it prints an annoying error message in the browser's console.

Cause of the issue I guess: The --enable-small option causes the profiles field in the ff_hevc_decoder structure to be set to null (see here).

I tried disabling --enable-small, and the error no longer appeared, but frustratingly, the compiled file size increased significantly, which is unacceptable for me. Therefore, I am looking for a way to retain this option while avoiding the error.

Upvotes: 1

Views: 45

Answers (1)

w shen
w shen

Reputation: 21

you can use below options to compile FFmpeg with a small size executable:

  1. option "--disable-decoders --enable-decoder=h264,hevc,mpeg4,aac,mp3" to select partial decoders

  2. option "--disable-encoders --enable-encoder=libx264,libx265" to select partial encoders, or just "--disable-encoders" to disable all encoders

  3. option "--disable-muxers --enable-muxer=mov,mp4,image2" to select partial muxers

  4. option "--disable-demuxers --enable-demuxer=avi,mov,mp4,mpeg,image2" to select partial demuxers

  5. option "--disable-hwaccels --disable-indevs --disable-outdevs --disable-devices" to disable other modules

Upvotes: 1

Related Questions