-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AV1Packet incompatible with sample builder #189
Comments
I was hoping the solution was just as simple as patching https://github.com/pion/rtp/blob/master/codecs/av1_packet.go with: diff --git a/codecs/av1_packet.go b/codecs/av1_packet.go
index 7aa3a55..d52e920 100644
--- a/codecs/av1_packet.go
+++ b/codecs/av1_packet.go
@@ -104,6 +104,8 @@ type AV1Packet struct {
// Each AV1 RTP Packet is a collection of OBU Elements. Each OBU Element may be a full OBU, or just a fragment of one.
// AV1Frame provides the tools to construct a collection of OBUs from a collection of OBU Elements
OBUElements [][]byte
+
+ videoDepacketizer
}
// Unmarshal parses the passed byte slice and stores the result in the AV1Packet this method is called upon
@@ -156,3 +158,11 @@ func (p *AV1Packet) Unmarshal(payload []byte) ([]byte, error) {
return payload[1:], nil
}
+
+// IsPartitionHead checks whether if this is a head of the AV1 partition
+func (*AV1Packet) IsPartitionHead(payload []byte) bool {
+ if len(payload) < 1 {
+ return false
+ }
+ return (payload[0] & 0x08) != 0
+} but I'm a bit skeptical. |
@tmatth did you try it out? I can give it a go if not? |
I did not, it's basically just the same code from the vp9 depacketizer and I'm guessing it means it's checking the RTP marker bit (which is also at position 0x08 for av1), see: but again I'd be surprised if this worked. |
Any news on this fix? |
@tmatth I'm pretty sure your patch is not correct. IsPartitionHead should be checking the Z bit in the AV1 aggregation header. That's bit 0x80, see https://aomediacodec.github.io/av1-rtp-spec/#44-av1-aggregation-header. You'll also need some code to remove the aggregation headers when you generate samples. This will require some changes to the samplebuilder itself. |
I kind of assumed that'd be the case.
That's good to know. FWIW I started working an rtp muxer for AV1 in C so that should give me a better handle on the format, but if someone else wants to take a stab at this here it'd be most welcome. |
Oh I see you've already started on this, tremendous: #264 |
When trying to use
AV1Packet
as a depacketiser I get an error...The text was updated successfully, but these errors were encountered: