Relative Content

Tag Archive for c#video-processing

How do I parse an MPEG TS file in order to acquire the packets in C#

I want to parse split TS MPEG files acquiring the packets’ payloads. I am not sure how to accomplish this. What I have tried so far is iterating over the entire file reading 188 bytes and checking the first byte for 0x47 value. Though, this causes me two issues. I am thinking I could hit a false positive. Also, the amount of time it takes finding the 0x47 bytes is very long for a small. I have tried looking into github for libraries. I found some libraries which I could not get to compile because they were missing files. I did not find any library that would accomplish what I want. All I want is acquire the payloads and take note of their start and end indexes.