zhttp
V2EX  ›  FFmpeg

最近学 rtmp 协议,使用 ffmpeg 推流然后抓包,对抓到的数据有些疑问

  •  
  •   zhttp · Jun 18, 2021 · 2359 views
    This topic created in 1832 days ago, the information mentioned may be changed or developed.
    具体:connect 指令中有个 tcurl 字段,是 rtmp 地址,我抓到的数据在地址的端口号那里多了一个点,例如地址是 rtmp://11.11.11.11:1935,实际抓包得到的地址是 rtmp://11.11.11.11:1.935 ,中间多了个点,这是为啥。。
    zhttp
        1
    zhttp  
    OP
       Jun 18, 2021   ❤️ 1
    找到原因了,这里解释 https://serverfault.com/questions/1034291/rtmp-tcp-extra-byte-in-packet,Chunk 的默认长度是 128,多的就会分块,分到第二个块中,它的头就类型就是 3(前两位),长度是一个字节,多的这个.是 0xc3,二进制是 11000011,就是这第二个包的头,后六位和第一个包一样都是 3
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3140 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:59 · PVG 21:59 · LAX 06:59 · JFK 09:59
    ♥ Do have faith in what you're doing.