disguise-one / hap-encoder-adobe-cc

Community-supported exporter of HAP codec family for Adobe CC applications
Other
169 stars 15 forks source link

Bit rate mode #54

Open Telecino opened 2 years ago

Telecino commented 2 years ago

Hi,

First question, is this project still supported? If so, it would be of great value to everyone to expose the bit rate mode to support "constant" bit rate, It would improve the overall playback instead of the default VBR mode.

Thank you,

Stéphane https://oasis.im

VuiMuich commented 2 years ago

I might be wrong but afaik HAP is an intra-frame codec and as such should not suffer from the typical VBR issues, right?

Since each frame is encoded in its own texture image the encoder wouldn't even know about the size of its neighbor frames.

The metadata need to flag it VBR though, exactly because byte sizes of frames may vary.

Telecino commented 2 years ago

I might be wrong but afaik HAP is an intra-frame codec and as such should not suffer from the typical VBR issues, right?

Since each frame is encoded in its own texture image the encoder wouldn't even know about the size of its neighbor frames.

The metadata need to flag it VBR though, exactly because byte sizes of frames may vary.

I wish I knew the answer, but I couldn't find any info on the HAP site regarding how its encoding, but you look to be more informed than I. Thank you for your help,

VuiMuich commented 2 years ago

You are very welcome. I can recommend the hap codec documentation for a deeper dive, if you're interested.

And maybe have also a look at the older Adobe Plugin from Vidvox, I believe in this implementation it was stated that HAP entirely relies on input Bitrate in general.

GregBakker commented 2 years ago

@VuiMuich is correct - this is a not a variable bitrate codec, and the quality / compression is the same for every frame in the entire export.

One of the goals of this style of codec is that it's easy for playback software to locate and present any frame at will.

bangnoise commented 2 years ago

To be clear, the encoded bitrate of Hap does vary due to the use of a secondary compressor - this secondary compressor does a better job of compressing some frames than others, so the bitrate varies between frames.

The bitrate is not, however, variable by the encoder in the sense of VBR: we cannot increase compression to achieve a constant rate at encode time. The secondary compressor is lossless so it can't make the trade-off between visual quality and bitrate that some other codecs can.