I am capturing a YouTube Video on Wireshark. I can see the FLV file coming on the capture with the metadata information like this on itag=34:
...K.........
onMetaData.......duration.@.y.C.....starttime..........
totalduration.@.y.C.....width.@.........height.@v....... videodatarate.@v.....|.
audiodatarate.@`.=ET8N. totaldatarate.@~.z..m+..framerate.@7...f...
bytelength.A~....... canseekontime...
sourcedata..
Now, i switch the resolution to 480p so the itag changes to 35 but the video dont start form the starting but from the next timestamp from where the 360p stopped and the switch ahppened so this new fragment of the FLV dont have the metadata information. Instead i can see an amf message like the following:
.'bytelength_low_word.....)bytelength_high_word...width..V
height..`.video_duration...Y.audio_duration...F.avc.W......M@.....gM@....=..............H..
.h.. .aac.%...................timestamp..K..
Now, i need to make the header for the new fragment to fed to my FLV parser but i am not able understand the AMF message structure and how to mak th e new header for the FLV parser. Can anyone help?