3 ms·
"naively you could turn the entire cut GOP into i-frames couldn't you" Yes, but then you'd have to render the result into a truly uncompressed format and it wo
by ShadowBanThis01 3y ago
"naively you could turn the entire cut GOP into i-frames couldn't you"
Yes, but then you'd have to render the result into a truly uncompressed format and it would have to stay in that format perpetually. If you wanted to deliver in another lossy format, you'd actually lose quality across the entire file instead of just the one GOP.
What I'm curious about is whether you can cut in the middle of GOPs, recompress the afflicted ones, and then concatenate the stream back together without recompressing all GOPs. If the file specifies a 12-frame GOP, cutting any GOPs is going to break that cadence. So can you have, say, a few thousand 12-frame GOPs... then an 8-frame GOP... then go back to 12-frame GOPs?
Update: Did some research and you can have "adaptive" GOPs of varying lengths: https://docs.aws.amazon.com/mediaconvert/latest/ug/gop-structure.html https://docs.aws.amazon.com/mediaconvert/latest/ug/gop-struc...
- thot_experiment 3y agoYeah there's no issue there, most codecs support variable bitrates and variable iframe-pacing, and ffmpeg will happily concat such files. Also, there's no need to render into an "uncompressed format" the i-frames are still compressed, and even in the naive case you'd only need small number of i-frames because you only need to replace any orphans in the cut GOP after which you can just go back to normal decoding.
- izacus 3y agoYeah, you can absolutely reencode just the GOP where the cut happens and IIRC quite a few tools support that.