Closed GeekenDev closed 2 years ago
obs-studio dev here; i wrote the srt support. i can confirm the issue which occurs with your transmuxer to rtmp. We don't observe such an issue with competing servers like Wowza or Nimble Server.
Pinpointed the issue: in obs-studio, the nvenc encoder is set to have AUD (access unit delimiter), see : here It seems the srt_to_rtmp.cpp transmuxer doesn't know how to deal with them. It is true that per spec it is not mandatory to have NALU AUDs in h264. But in mpegts container it is mandatory. So your transmuxer must be able to parse them correctly. Currently your code for dealing with AUD is: https://github.com/ossrs/srs/blob/4.0release/trunk/src/srt/srt_to_rtmp.cpp#L525-L529 I'm not sure why these lines of code to ignore the AUD don't work though. Why not write them into the video instead of ignoring them ? What's very odd though is that x264 also is set to have AUD but the srt mpegts is transmuxed fine.
https://github.com/ossrs/srs/blob/4.0release/trunk/src/srt/srt_to_rtmp.cpp#L525-L529
Yes, you are right, we must not ignore AUD in the h264 stream. We will fix it later. Had you test remove the code https://github.com/ossrs/srs/blob/4.0release/trunk/src/srt/srt_to_rtmp.cpp#L525-L529, and can ingest SRT success?
Description
SRS Version:
4.0.261(Leo)
SRS Log:
TRANS_BY_GPT3