I've been kind of going through an exercise trying to understand streaming a bit more. So please bear with my ignorance :)
I have mpeg-ts files with an h.264 stream within. I've been able to write a small program (in Java) following the ISO 13818-1 spec to extract PES packets. From there I can easily extract the PES packet data.
So my understanding is h.264 is mp4 but I suppose it isn't as easy as just chaining all the PES packet data into a file called *.mp4 to create a working mp4 file.
I'm not clear what actually the PES packet data is at this point.
But basically, I'm trying to get a handle on what that algorithm would basically look like to remux the data I have to an mp4 file.