I receive from a third party application, a stream of packests containing raw H264 frames and a timestamp. I want to take the raw frames and the timestamp and re-stream, so I can see the video in a player like VLC

I tried to just take the raw H264 frames as they arrive and stream them over a TCP socket, and I'm actually able to see the video in VLC. But of course without timestamps, the video play at maximum speed and then it stop to wait other frames, and then it starts again at max speed.
I guess I need to put those raw frames in a container and mark each frame with the timestamp, but I don't know how.
Any help appreceated (if in C# even better)

Thanks