Description
In Stream (console) page srs report always 44100 as sampling frequency for audio regardless of real value.
At the moment srs can manage/recognize only four sampling frequency (5512, 11025, 22050, 44100).
Any other sampling feequency, apart from the four mentioned, are displayed as 44100.
Version
srs docker v6.x/5.x
To Reproduce
push some rtmp stream to srs (OBS/ffmpeg, etc,) like:
ffmpeg -re -i input.mp4 -c:v libx264 -profile:v high -preset:v ultrafast -b:v 8M -c:a aac -ar 48000 -ac 2 -b:a 256k -f flv rtmp://192.168.1.1:1935/live/test
or with any other sampling frequency (48000, 96000, whatever)
Checking outputed stream with ffmpeg/ffprobe/ffplay we got corectly the expected audio sampling frequency:
Expected behavior
Display real (detected) value (48000, 96000...).
Additional context
Related to this issue:
srs doen't display any info about received streams if "srt_to_rtmp" option is set to "off".
If "srt_to_rtmp" is set to "on" srs display altered info for video and always "44100" as sampling frequency for audio regardless real input values.
Don't know in this case if this is the expected behavior (no info if "srt_to_rtmp" is set to "off")
To Reproduce
Push srt stream to srs:
ffmpeg -re -i input.mp4 -c:v libx264 -profile:v high -preset:v ultrafast -b:v 8M -c:a aac -ar 48000 -ac 2 -b:a 256k -f mpegts srt://192.168.1.1:10080?streamid=#!::r=live/test,m=publish
Check output stream data with:
ffplay srt://192.168.1.1:10080?streamid=#!::r=live/test,m=request
or with
ffprobe srt://192.168.1.1:10080?streamid=#!::r=live/test,m=request
and compare with info reported by srs
regards,
Laur