ngraziano / SharpRTSP

A RTSP handling library
Other
538 stars 180 forks source link

feed aac raw data to rtspserver #77

Closed SolarisYan closed 2 years ago

SolarisYan commented 2 years ago

I use the RtspCameraExample's RTSP Server in iOS with ReplayKit2, If I pass the pcm data directly into the server with Audio_source_ReceivedAudioFrame, it's not work. So i convert the pcm data to aac format, Is it possible to pass the raw data of aac directly to the server? like rtspServer.FeedInAudioPacket(timestamp_ms, aac_data); and i see sdp.Append(media header info if we had AAC or other audio codec) at here, and i have add them like here.

m= audio 49230 RTP/AVP 96 a= rtpmap:96 mpeg4-generic/48000/6 a= fmtp:96 streamtype= 5; profile-level-id= 16; mode= AAC-hbr;config= 11B0; sizeLength= 13; indexLength= 3;indexDeltaLength= 3; constantDuration= 1024

i use VLC Player, but there no Channels and Bits per sample info, how i can play it, thanks a lot

SolarisYan commented 2 years ago

does the aac_data need with the ADTS header?