No Audio Output on Stream

101 views
Skip to first unread message

Rafayel Tobelyan

unread,
Nov 27, 2020, 4:16:27 AM11/27/20
to kurento

Hello,
I have issues getting audio output on DASH

Setup
Kurento-Media-Server
Node JS
FFMPEG
Nginx RTMP with Dash and HLS

SDP data
var sdpRtpOfferString = 'v=0\n';
    sdpRtpOfferString += 'o=- 0 0 IN IP4 ' + nodeStreamIp + '\n';
    sdpRtpOfferString += 's=KMS\n';
    sdpRtpOfferString += 'c=IN IP4 ' + nodeStreamIp + '\n';
    sdpRtpOfferString += 't=0 0\n';
    sdpRtpOfferString += 'm=audio ' + audioport + ' RTP/AVP 97\n';
    sdpRtpOfferString += 'a=recvonly\n';
    sdpRtpOfferString += 'a=rtpmap:97 PCMU/8000\n';
    sdpRtpOfferString += 'a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1508\n';
    sdpRtpOfferString += 'm=video ' + port + ' RTP/AVP 96\n';
    sdpRtpOfferString += 'a=rtpmap:96 H264/90000\n';
    sdpRtpOfferString += 'a=fmtp:96 packetization-mode=1\n';

FFMPEG args
'-protocol_whitelist''file,udp,rtp',
        '-i', path.join(__dirname'sdp/'+currentUser.name + '.sdp'),
        '-vcodec''copy',
        '-acodec''copy',
        '-g''24',
        "-fflags""nobuffer",
        '-flags''low_delay',
        '-f''flv',
        'rtmp://'+rtmp_server_address+'/live/'+currentUser.name

Actual Behavior
Video Call between two peers is okay,
Streaming to RTMP is okay
Playback via RTMP using VLC player is Okay
Playback via DASH.js or  HLS.js Video is okay, but audio is empty [no Audio output]
Playing Recorded FLV also has an Audio

Desired Behavior
I want to receive audio on Dash.js as well,
i guess the problem is with audio codec

What i have tried
Lots of stuff, in details
Changed codec from PCMU to MPEG4-GENERIC tried in many Khz - no Audio
when i use MPEG4-GENERIC/44100/2 Dash.js sees that there is audio input coming with video, but still i can't hear anything,
PCMU doesn't see audio input at all.

Tried to change the codec in ffmpeg

    '-vcodec', 'libx264',
        '-acodec', 'aac',

Getting an error  - Conversion failed

Sending Video Stream from OBS to my RTMP everything works as expected - verdict something is broken between webrtc - sdp - kms


Juan Navarro

unread,
Nov 27, 2020, 5:31:34 AM11/27/20
to kur...@googlegroups.com
Hi, please do this so it's easier that someone can help you:

1. Write the actual SDP and messages, not the source code. So, in this case, provide what is the real SDP and FFmpeg commands that are generated

2. Provide a diagram that represents your setup. You can use something like draw.io to draw some boxes and arrows to explan what comes from where.

3. Review the contents of your SDP. For example in your sdpRtpOfferString I can see the PCMU audio codec, but then the format is "mode=AAC-hbr". So, is it PCMU or AAC? Note Kurento only supports the audio codecs used for WebRTC, which means either OPUS or PCMU, but not AAC.

--
Juan Navarro
Kurento developer
@j1elo at GitHub & Twitter
--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/4b58f687-3963-430f-81f4-586bb85b86d5n%40googlegroups.com.

Rafayel Tobelyan

unread,
Nov 27, 2020, 12:39:39 PM11/27/20
to kurento
my SDP
v=0
o=- 0 0 IN IP4 167.99.141.53
s=KMS
c=IN IP4 167.99.141.53
t=0 0
m=audio 49172 RTP/AVP 97
a=recvonly
a=rtpmap:97 PCMU/8000
a=fmtp:97 profile-level-id=1;mode= mode=AAC-hbr ;sizelength=13;indexlength=3;indexdeltalength=3;config=1508
m=video 55002 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1


GEnerated FFMPEG
ffmpeg -protocol_whitelist file,udp,rtp  -i /var/www/media-server/sdp/User2_17.sdp -vcodec copy   -acodec copy  -g 24 -fflags nobuffer  -flags low_delay  -f flv  rtmp://localhost/live/User2_17


3. what should i put there? i did PCMU nothing happened is the same


Rafayel Tobelyan

unread,
Nov 27, 2020, 12:45:18 PM11/27/20
to kurento
Untitled Diagram.jpg
Reply all
Reply to author
Forward
0 new messages