Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Conversation

yatinmaan
Copy link

This depends on rtpav1 and some changes to av1enc so those would need to be merged first.

.field("format", &gst::List::new(&[&"NV12", &"YV12", &"I420"]));
}
"rav1enc" => {
// Unfortunately other formats don't yet work.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please provide more information here, the existing restriction is a workaround, which is why I tried to document it as precisely as possible :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably, due to buggy encoder elements.

By default rav1enc would negotiate Y444_12LE and segfault.
av1enc (and rav1enc for other less verbose formats) seemed to work fine but Chromium fails to decode any of the frames sent over.

I could only get GRAY8, I420 and YV12 to actually render.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, that should probably be reported. If I understand you correctly, av1enc with Y444_12LE was working fine with chrome?

Can you create issues against rav1e (not the GStreamer plugin) for that and CC me there?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand you correctly, av1enc with Y444_12LE was working fine with chrome?

No, the av1enc element doesn't have caps for Y444_12LE. For Y444, its same as other formats where chrome receives the frames but fails to decode them.

Can you create issues against rav1e (not the GStreamer plugin) for that and CC me there?

The segfault was from sometime ago. I rebuilt it now and that's fixed already. Y444_12LE just fails to render in chrome like the others now.

Interestingly gst-launch-1.0 videotestsrc ! video/x-raw,height=480,width=640,framerate=30/1,format="Y42B" ! av1enc ! rsdav1ddec ! videoconvert ! autovideosink fails for me. But it works if I use av1dec instead of dav1d.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, please create issues about all this and link them from the code here with some more explanation :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chrome only supports the main profile for AV1 at the moment.

The issue here is that av1enc doesn't set its sink caps based on downstream profile [1] (even when its present). Also, we need to interpret a missing profile parameter in the SDP to mean to the main profile. We would probably need to special case this optional/missing param flow even after the av1enc bug is fixed.

A similar problem crashes Firefox for vp9enc [2]. Its decoder only supports the main profile for VP9.

For now, I updated the code to set the appropriate raw_filter based on downstream profile[-id] and added comments for the respective issues.

[1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1404
[2] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1403

@MathieuDuponchelle
Copy link
Collaborator

looks good to me otherwise

@MathieuDuponchelle
Copy link
Collaborator

What's the status here? :)

@sdroege
Copy link
Contributor

sdroege commented Oct 3, 2022

@MathieuDuponchelle
Copy link
Collaborator

I think this is blocked by https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/884#note_1569937 at least

OK thanks, would be nice to see this go forward :)

@MathieuDuponchelle
Copy link
Collaborator

Closing @yatinmaan please re-open against https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs when ready :)

@sdroege
Copy link
Contributor

sdroege commented Oct 24, 2022

I think it would be ready now

@MathieuDuponchelle
Copy link
Collaborator

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2743 is still listed as a dependency at the top though?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants