Skip to content
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

Can vvenc generate user-mandated IDRs #311

Open
nicepubworld opened this issue Aug 29, 2023 · 6 comments
Open

Can vvenc generate user-mandated IDRs #311

nicepubworld opened this issue Aug 29, 2023 · 6 comments
Labels
enhancement New feature or request library Concerns the VVenC library question Further information is requested

Comments

@nicepubworld
Copy link

we want to keep key frames from source video,it need to force vvenc to generate key frames at any encoding time

@adamjw24 adamjw24 added question Further information is requested library Concerns the VVenC library labels Aug 29, 2023
@adamjw24
Copy link
Member

adamjw24 commented Aug 29, 2023

For now this is not possible. The only thing you could do, would be to chunk the video into pieces starting at your desired IDR points and encode each chunk separately. Than you could just cat the chunks together.

We will discuss internally if this is something we want to support. But either way, because it is an interface change and quite out of our current way of doing things, this will take quite some time. I will keep the issue open as a reminder.

@adamjw24 adamjw24 added the enhancement New feature or request label Aug 29, 2023
@nicepubworld
Copy link
Author

nicepubworld commented Aug 29, 2023

For now this is not possible. The only thing you could do, would be to chunk the video into pieces starting at your desired IDR points and encode each chunk separately. Than you could just cat the chunks together.

We will discuss internally if this is something we want to support. But either way, because it is an interface change and quite out of our current way of doing things, this will take quite some time. I will keep the issue open as a reminder.

Noted , thks!
This is a common function that x265 x264 and nvenc have supported!

@K-os
Copy link
Contributor

K-os commented Sep 19, 2023

Is there a use case for that feature besides live transmissions (e.g., conferencing), where you want to insert key frames to compensate for packet loss or joined participants?

/edit: Ignore this question. I was just made aware of multiple other use cases :-)

@mfuchs-iis
Copy link

Hi @adamjw24 ,

it was nice meeting you at the previous JVET / MPEG meeting!

As discussed there, for us (Fraunhofer IIS), it would also be very convenient to have an IDR-on-demand functionality in VVenC.
Our use case is that with MPEG-H 3D Audio, the bitstream can contain configuration changes at arbitrary, but video frame grid aligned positions. For DASH we would ideally like to start at new Period at each of these configuration change positions to enable e.g. ad insertion by DASH Period replacement. This would require an IDR at this position s.t. we can start a new video segment aligned with the audio segment. Ideally, at least for this use case, the IDR-on-demand would also restart the regular IDR grid at the IDR-on-demand position s.t. we can keep using a Segment Template in the new Period.

Do you think it would be possible to enable this in the future?

@adamjw24
Copy link
Member

adamjw24 commented Dec 3, 2024

Btw, this can be easily achieved by encoding each IDR in a separate encoder instance. It will cause some overhead, more so the more threads are used. But the functionality would be achieved.

@mfuchs-iis
Copy link

Btw, this can be easily achieved by encoding each IDR in a separate encoder instance. It will cause some overhead, more so the more threads are used. But the functionality would be achieved.

Sure, that is what we currently do, however we could simplify our architecture (and get rid of the mentioned overhead) if it wasn't necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request library Concerns the VVenC library question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants