5

I'm using wireshark to inspect the packets but I'm confused by how exactly flv format is followed in RTMP streaming. FLV doc specifies the tag to be: tag type, datasize, timestamp, timestampExtended, streamID, VideoTagHeader, but I'm getting

[fmt]    [timestamp 2000]  [body size], [typeID (tag type)] [stream ID]
 04        00 07 d0         00 00 2c      09                01 00 00 00 

When streaming, does the FLV timestamp just use the RTMP timestamp? and therefore doesn't follow the big-endian format but rather use the RTMP extended timestamp?

So how exactly does FLV container get used in RTMP video streaming?

TurtleTread
  • 1,297
  • 2
  • 12
  • 23
  • 1
    Rtmp can send realitive timestamps on the wire that are converted to absolute before written to the flv. It’s all documented in the RTMP spec. – szatmary Jan 08 '20 at 15:12
  • The client (player) receive the packets in the same format it seems. When is it actually "written to flv"? Does the player itself parse the rtmp to flv tags and then try to play the flv? – TurtleTread Jan 09 '20 at 09:45
  • 1
    Yes. The player plays flv. – szatmary Jan 09 '20 at 14:15
  • .. what I meant is when exactly are these messages assembled into flv tags like in the specs? does the client player do that itself? it seems redundant to get the info and then write it to flv tags and decode the flv stuff again. – TurtleTread Jan 10 '20 at 02:17
  • 1
    Its not part fo the spec because its implementation dependent. It's possible to write an mkv, or mp4, or delete the frame, or decode it and display it. But by far the most common thing to do it to compile it to flv tags and pass it off to something else to handle. flv is by far the simplest container to parse. Rtmp to flv does not require decoding. flv is just a container that support the same codecs as rtmp – szatmary Jan 10 '20 at 02:41
  • so basically a player is usually an RTMP to flv converter and a flv player? – TurtleTread Jan 10 '20 at 02:48
  • or better yet, when the spec says "RTMP message is designed to work with RTMP Chunk Stream", it just means you can grab the info from the chunks and assemble them into the actually messages? – TurtleTread Jan 10 '20 at 03:40

0 Answers0