Streaming webp encoder?

465 കാഴ്‌ചകൾ
വായിക്കാത്ത ആദ്യ സന്ദേശത്തിലേക്ക് പോവുക

Victor Loh

വായിക്കാത്തത്,
2023, സെപ്റ്റം 25 3:48:40 AM25/9/23
സ്വീകർത്താവ് WebP Discussion
I was looking into whether it is possible to do:
1. Encode webp frame by frame while generating webp bitstreams
2. Decoding webp while step (1) is ongoing

Technically, the only difficulty seems to be the assumption that the total image size is known at the beginning (A potential hack is to set it to 0 and ignore that value). Setting that aside, digging into libwebp source code, my understanding is the following:
* There is incremental decoding API which potentially can be used for (2)
* For the animated encoder API, there is the encoding part and muxing. The encoding part seems to be able to be done in a streaming fashion. However, because the muxing is written in a fashion that requires all the frames to be present, the API exposed by animated encoder is that way.

Hence my questions:
* Is my understanding correct?
* Is there any streaming webp encoders?

Thanks!

Regards,
Victor

James Zern

വായിക്കാത്തത്,
2023, ഒക്ടോ 6 10:50:14 PM6/10/23
സ്വീകർത്താവ് webp-d...@webmproject.org
Hi Victor,

No, there isn't anything in the libwebp project to emit chunks of an animated file on the fly. This could be done, but for it to be decodable in most cases the RIFF header would need to be updated or set to an arbitrarily large value. The incremental decoder works on individual frames and doesn't support animated files directly, you would need to use the demuxer to retrieve partial frames.
For a streaming case like this you might consider using a video format like fragmented mp4 or webm.
 

Thanks!

Regards,
Victor
എല്ലാവർക്കും മറുപടി നൽകുക
എഴുതിയ ആൾക്ക് മറുപടി അയയ്ക്കുക
കൈമാറുക
പുതിയ 0 സന്ദേശങ്ങൾ