Search code examples
rtmpred5

Is there any method that I can print the metadata info in live stream in red5 server


all cause I found our live Stream is not smooth, I doubt it is caused by the publish stream. So I want to get the detail of the stream I publish. just like using the demo to play a mp4 file showing me.

15:54:13:160 - Playback - NetStream.Play.Start
15:54:15:584 - Metadata - avclevel: 30
15:54:15:584 - Metadata - aacaot: 1
15:54:15:584 - Metadata - height: 480
15:54:15:585 - Metadata - canSeekToEnd: true
15:54:15:585 - Metadata - audiosamplerate: 44100
15:54:15:585 - Metadata - audiocodecid: mp4a
15:54:15:585 - Metadata - videocodecid: avc1
15:54:15:585 - Metadata - videoframerate: 15.999947776588245
15:54:15:585 - Metadata - avcprofile: 100
15:54:15:585 - Metadata - trackinfo: ,
15:54:15:585 - Metadata - width: 860
15:54:15:585 - Metadata - duration: 153.188
15:54:15:585 - Metadata - audiochannels: 2
15:54:15:585 - Metadata - seekpoints: 0,1688,4813,7500,8500,10125,11438,12563,14438,16313,18188,20813,23313,25563,26563,27563,28563,29938,32688,34063,36563,38000,39750,41250,42313,43313,45000,47250,48500,49875,52063,53188,56438,58563,62875,64313,65625,66750,68063,69250,70375,71938,73125,75375,77313,78938,81375,83063,86875,89000,90125,93063,94188,95563,100125,102563,103938,104938,106500,108438,109875,111063,112313,115063,116563,117938,119125,120250,121250,122625,123625,125313,126813,127875,129500,131875,135500,144063,149438

so, how I can get it? I found the parameters IBroadcastStream in streamPublishStart and streamRecordStart methods, does it help if I code in thoes method with the IBroadcastStream parameter?


Solution

  • You have to create your own listener, like RecordingListener and intercept the data; once you get Notify type with metadata in it, you then do whatever you want with the data.