45 ms·
> As long as you cut a compressed audio / video file at the groups / jumps, you can cut it losslessly. If you had a video with keyframes 'd'K and delta frames
by philsnow 2y ago
> As long as you cut a compressed audio / video file at the groups / jumps, you can cut it losslessly.
If you had a video with keyframes 'd'K and delta frames 'd' like
0 1 |<-->| 2
KdddddddddddKdddddddddddKddddddddddd
and you wanted to cut out the indicated frames, could you create a new keyframe from the keyframe marked '1' + the two following delta frames, and then another new keyframe from K{1}dddddddd? Something like
0 1 |<-->| 2
KdddddddddddKdddddddddddKddddddddddd
Kdd = keyframe "L"
Kdddddddd = keyframe "M"
KdddddddddddKdLMddKddddddddddd
Or I guess if you're creating new frames that weren't in the original, could you just rewrite all the deltas in between K1 and K2 such that those 5 frames aren't there?
0 1 |<-->| 2
KdddddddddddKdddddddddddKddddddddddd
KdddddddddddKddeeeKddddddddddd
(where 'e' marks recomputed deltas)
- gwbas1c 2y agoYou're speculating quite a bit about what the codecs support. See https://news.ycombinator.com/item?id=40844633 https://news.ycombinator.com/item?id=40844633. Some container formats support metadata so you can cut without reencoding.