I'm aware of the differences between intra and inter, but I'm not the most savvy about reencoding them after the fact. Is encoding with intra from an inter-coded video the same as if you originally used intra to begin with? Or does it need to be kept as intra from the start to preserve complete images? Maybe I didn't search well enough, but I'm surprised I couldn't find info on this anywhere.
1 Answer
An encoder receives and works upon uncompressed frames and does not know or care about the encoding of the source stream.
To avoid any information loss, you have to set lossless mode. For x264, this is by done by adding -qp 0
to your ffmpeg command. But for most purposes, strict mathematical losslessness is not required. See What's the difference between "visually lossless" and real lossless and what does this mean for future encodes?
-
I am not referring to lossy encoding. Perhaps I should've specified mathematically lossless video. Intra and inter can both be lossless (although one could argue that inter isn't "pure"). Assuming lossless inter-frame, would reencoding as intra produce the same output as starting with intra?– HDLCommented Sep 28, 2019 at 13:43
-
1Yes, as long as the source stream's integrity is intact and the decoder is conformant, the source encoding does not matter.– GyanCommented Sep 28, 2019 at 13:50
-
Thank you, that's what I was curious about. My goal is to use inter lossless for live recording and reencode to intra for intermediate editing afterwards.– HDLCommented Sep 28, 2019 at 14:54