mbullington / yellowstone

:mount_fuji: The RTP/RTSP client for Node.js.
MIT License
148 stars 57 forks source link

capturing data stream #45

Closed telethonic closed 2 years ago

telethonic commented 4 years ago

Hi,

Thanks for a great library :-)

I'm connecting to an IP cam that also provides a data stream.

ffprobe for example reports: Input #0, rtsp, from 'rtsp://ADMIN:1234@localhost:12003/live/ch8': Metadata: title : Media Server Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc Stream #0:1: Data: none

Logging the "media" object in RTSPClient.js shows:

media object [[{"rtp":[{"payload":96,"codec":"H264","rate":90000}],"fmtp":[{"payload":96,"config":"packetization-mode=1;profile-level-id=64001F;sprop-parameter-sets=Z0IAKpY1QPAET8s3AQEBAg==,aM48gA=="}],"type":"video","port":0,"protocol":"RTP/AVP","payloads":96,"control":"rtsp://localhost:12003/live/ch8/video"},{"rtp":[{"payload":97,"codec":"VND.ONVIF.METADATA","rate":8000}],"fmtp":[],"type":"application","port":0,"protocol":"RTP/AVP","payloads":97,"control":"rtsp://localhost:12003/live/ch8/meta"}]]

I then changed the next line in RTSPClient.js to:

const mediaSource = media.find(source => source.type === "application" && source.protocol === RTP_AVP);

Which produces:

Connected. Video format is VND.ONVIF.METADATA

Is there anything else that should be changed to just dump data as it comes in?

Thanks for your time :-)

RogerHardiman commented 4 years ago

is it possible to make the camera available online and send me the log in details? I can then see what needs adding. Just tried my Hik and Axis cameras and none of the ones I have here include any meta data in the RTSP stream

telethonic commented 4 years ago

Thanks for your reply, and sorry for not responding sooner.

It turned out the camera had metadata streaming turned off by default :-/

After switching it on, it arrived ok :-)

RogerHardiman commented 4 years ago

Which make/model of camera were you using?

Thanks Roger