Re:FFmpeg Lands CLI Multi-Threading as Its "Most Complex Ref...
by danielrhodes on Tuesday December 12, 2023 @12:45PM
(#38615611)
Isn't that delta partially based on the last keyframe? I guess it would be codec dependent, but my understanding is that keyframes are like a synchronization mechanism where the decoder catches up to where it should be in time.
[ Parent
| on HN ]
Re:FFmpeg Lands CLI Multi-Threading as Its "Most Complex Ref...
by 0x457 on Tuesday December 12, 2023 @02:31PM
(#38617145)
Yes, key frames are fully encoded, and some delta frames are based on the previous frame (which could be keyframe or another delta frame). Some delta frames (b-frames) can be based on next frame instead of previous. That's why sometimes you could have a visual glitch and mess up the image until the next key frame.
I'd assume if each thread is working on its own key frame, it would be difficult to make b-frames work? Live content also probably makes it hard.
Re:FFmpeg Lands CLI Multi-Threading as Its "Most Complex Ref...
by astrange on Tuesday December 12, 2023 @02:08PM
(#38616811)
In most codecs the entropy coder doesn't reset across frames, so there is enough freedom that you can do multithreaded decoding. ffmpeg has frame-based and slice-based threading for this.
It also has a lossless codec ffv1 where the entropy coder doesn't reset, so it truly can't be multithreaded.