KallDrexx[/url]":34fp1a2a]O...M...G...
I'm stubborn as all hell and couldn't let my last 6 months of working on this project go to waste. After 2 weeks of going over packet captures byte by byte, trying to figure out wtf other projects work and mine doesn't work I came across an off the cuff comment that most likely explains why I can't get H264 video to stream properly.
What is it? Adobe's RTMP specification is extremely clear about the protocol's handshake. First byte is 3, next 4 bytes is a timestamp, next 4 bytes MUST be zeros, and the next 1528 bytes are random data that needs to be repeated by the peer for the connection to be successful.
So what does this have to do with anything? Let me quote from the first blog I found with an explanation:
Also, the RTMP specification 1.0 that is widely available online is "outdated". The reason it is "outdated" because this specification defined the handshake only for flv streaming.
:facepalm:
Turns out in order to do H.264 streaming you have to do some SHA 256 hashing of specific values (I guess?) in order to successfully do a handshake that allows playback clients to display H.264 video. The best part is that even though the specification is considered "outdated" there is no other specification, and half the questions related to this say to look at the source of an open source product that was pulled (because they took it commercial).
This is stupid as well because the video data that gets sent to the client already contains information explicitly stating "hey fyi I'm h.264 video" but for whatever reason Adobe hard coded their handshake format to require extra stuff.
So now I'm deep diving these other code bases trying to understand what they are doing so I can get this working.
I'm so pissed right now I can't even start to work on implementing this at the moment.