3 ms·
I wish there was a way to crop lossless and with deleting the unused data (not just metadata/bitstream filter). I feel like it must be technically possible with
by dsp_person 2y ago
I wish there was a way to crop lossless and with deleting the unused data (not just metadata/bitstream filter). I feel like it must be technically possible with some kind of partial re-encode.
- slimscsi 2y agoCodec standards are defined for decoder compatibility. So no matter what encoder produces a stream, a “standard” decoder can display it. But encoders are free to do whatever they want within those bounds. Each encoder may choose to make trade offs that are incompatible with each other. So stitching often requires using the same encoder. Getting everyone to agree on a common sequence header is just not going to happen. It would need to be built into the codec specification. And no modern codec has cross implementation stitching as a design goal. It would be possible to make an implementation that parsed an existing stream and created a stitchable output, but there is no financial incentive to create that encoder. EDIT. Some decoders can be reinitialized by adding parameters in band. But this is technically illegal in some formats (like mp4) but it may "just work" in some playback environments
- htthbjk 2y ago[dead]
- pjc50 2y agoIn general, this is only going to be possible if you crop a whole number of macroblocks. Worse, codecs do intra-prediction so you can't delete macroblocks which are used for other blocks you want to keep. https://courses.cs.washington.edu/courses/csep590a/07au/lectures/rahullarge.pdf https://courses.cs.washington.edu/courses/csep590a/07au/lect...