Open belveder79 opened 1 year ago
Many thanks for this.
When I wrote the code to extract AAC, all I had to use was an online Big Buck Bunny test RTSP stream. I don't think I tested it on any RTSP source.
Many thanks for the code contribution. If you want to do it as a Pull Request then you will be listed in the Contributors section by github.
thx - will create a pull request....
Pull Request has been added. Many thanks for that. It is nice to keep your name in the history.
I had a quick question. What device was sending AAC that showed up the problem? For example, was it a particular make of IP camera?
thx... I was just testing with ffmpeg and streaming directly from an RTSP client like PHZ76/RtspServer I also passed it through a server like aler9/rtsp-simple-server, so the implementation just did not consider the case of more than one aac packet per payload...
Thx for your continued effort to improve this asset...
I was wondering how you tested the AACPayload, but at least for me it does not work with e.g. ffmpeg.
https://github.com/ngraziano/SharpRTSP/blob/3ce0caf142206488869523369ac8fa8c7c1cbb24/RTSP/AACPayload.cs#L112
Overall the code only works if there is just one AU unit present, as the AU units are usually lined up sequentially at the beginning of the payload and the header length (in byte / 2) gives the number of AUs present. The code assumes there is one AU unit, but as there are usually more, it might loose 2-3 other AU units and the outcome is choppy...
instead of using the while loop, I use this one, which seems to work fine:
Any feedback would be great... cheers...