ralfbiedert / openh264-rs

Idiomatic Rust wrappers around OpenH264.
66 stars 32 forks source link

Fix encoder by emitting all layers and nalus #3

Closed jelmansouri-legion closed 2 years ago

jelmansouri-legion commented 2 years ago

Add the missing data to properly write an h.265 stream, this include the sps/dps NAL units. The current implementation exposes the individual NAL units as it makes it easier to write them to an mp4 file.

ralfbiedert commented 2 years ago

I'll merge this for now but I'd like to avoid adding dependencies like smallvec if possible. I haven't really looked at the OpenH264 encoder struct but I think it should be possible to hand out either slices to these or extract them ad-hoc when requested.