Closed Kerblif closed 6 months ago
No, there is no code to serialise SPS/PSS, just parse and interpret them. What is your use case for generating or changing SPS/PPS?
I am engaged in reverse engineering of a Chinese registrar for public transport. The registrar uses its own protocol for video transmission, in which it sends SPS and PPS in some kind of chaotic order. Therefore, I was going to write code to read these SPS and PPS so that when initializing a new live broadcast, I could immediately send data to start it. In theory, it is possible to store data in byte array format, but I don't really like this implementation.
Deserialising the SPS and PPS should be fine with the code here, but there may be some details which are not fully correct since it is very hard to test this without integration with a decoder/encoder. The main use case of this library is to extract relevant parts/parameters, but also get the size of the slice header so that one can start encryption at the right byte.
In general, the newer MPEG standards are NAL-unit-based with SPS, PSS, and video slices all being NALUs. It is therefore quite natural to pass them around as byte-slices. If one also needs the interpretation of parameter sets, it is fairly easy to have that as side data.
@Kerblif I think I have answered your question, and don't think I can help you more. If no other aspect comes up, do you think it is OK to close this ticket next week?
Yes, of course, thank you so much for your help!
Hi,
I want to serialize SPS/PPS, but I haven't found the right methods. Do they exist?