Skip to content

Upload RTMP to YT - closing after a couple of buffers (NAL units) #103

Open
@neilyoung

Description

This is probably not related to some malfunction of the lib. I'm just asking for similar experiences. I'm wondering, if some RTMP servers (namely Youtube) would need to have some special packets before the real video can flow. Especially I'm thinking about SPS and PPS units.

Look at this sequence: I'm getting NAL units from another source and forwarding it to the lib. Even though I'm sending video, the connection is torn down after a couple of ms (because of missing meta data?). You see that I'm just sending type 0x21 and 0x09 (the latter is ignored):

03-28 18:24:21.055 20872 20872 D: Opening RTMP 1280 720
03-28 18:24:21.118 20872 21033 D: Client connected true
03-28 18:24:21.246 20872 21033 D: Send NAL buffer, len 46058 (0 0 0 1 21 e0) -> 46078
03-28 18:24:21.252 20872 21033 D: Send NAL buffer, len 6 (0 0 0 1 9 10) -> 0
03-28 18:24:21.260 20872 21033 D: Send NAL buffer, len 45802 (0 0 0 1 21 e0) -> 45822
03-28 18:24:21.263 20872 21033 D: Send NAL buffer, len 6 (0 0 0 1 9 10) -> 0
03-28 18:24:21.268 20872 21033 D: Send NAL buffer, len 46259 (0 0 0 1 21 e0)  -> 46279
03-28 18:24:21.272 20872 21033 D: Send NAL buffer, len 6 (0 0 0 1 9 10) -> 0
03-28 18:24:21.279 20872 21033 D: Send NAL buffer, len 46638 (0 0 0 1 21 e0) -> 46658
03-28 18:24:21.285 20872 21033 D: Send NAL buffer, len 6 (0 0 0 1 9 10) -> 0
03-28 18:24:21.293 20872 21033 D: Send NAL buffer, len 46617 (0 0 0 1 21 e0) -> -20
03-28 18:24:21.295 20872 21033 D: Client connected false

I can see that my provided packet length is increased by 20 (dec) on return of the RTMPMuxer.writeVideo() routine until it is returning "-20" and reporting the disconnection.

Any pointer welcome.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions