You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Please file an issue if you know what this does, because I have no idea.
pub fn annexb(mut self, annexb: bool) -> Self {
This repo doesn't seem very active anymore, but maybe this helps someone else struggling with the same thing as me.
The way I understand it, "Annex B" start codes are a way to be able to seek to the next/previous NAL unit from anywhere in a stream. The mp4 container does not use Annex B start codes, so if you're trying to use this library in combination with for example the mp4 crate, you need to make sure to turn off the Annex B start codes, because they're enabled by default. For example:
let mut encoder =
Setup::preset(Preset::Medium, Tune::None, false, true)
.annexb(false)
.build(Colorspace::I420, WIDTH as _, HEIGHT as _)
.unwrap();
(also, make sure to crop off the first 4 bytes of the SPS and PPS headers before passing them to mp4)
The text was updated successfully, but these errors were encountered:
Hi! Filing this issue because of the comment:
This repo doesn't seem very active anymore, but maybe this helps someone else struggling with the same thing as me.
The way I understand it, "Annex B" start codes are a way to be able to seek to the next/previous NAL unit from anywhere in a stream. The mp4 container does not use Annex B start codes, so if you're trying to use this library in combination with for example the
mp4
crate, you need to make sure to turn off the Annex B start codes, because they're enabled by default. For example:(also, make sure to crop off the first 4 bytes of the SPS and PPS headers before passing them to
mp4
)The text was updated successfully, but these errors were encountered: