fraunhoferhhi / vvenc

VVenC, the Fraunhofer Versatile Video Encoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
943 stars 170 forks source link

Can vvenc generate user-mandated IDRs #311

Open nicepubworld opened 1 year ago

nicepubworld commented 1 year ago

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

adamjw24 commented 1 year ago

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.

nicepubworld commented 1 year ago

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 commented 1 year ago

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 commented 4 months ago

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?