codec samplerate changing causes unknown payload

About encoding, codec settings, muxers and filter usage
baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

codec samplerate changing causes unknown payload

Postby baboom » 17 Feb 2012 09:18

Hello,
I'm trying to use one of the pcm codecs (ulaw, alaw, s16b) to stream audio, but I'd like to change the samplerate to 32000 Hz. If I change this at the sout string,(transcode{acodec=s16b,ab=128,channels=2,samplerate=32000}) it uses a different RTP Payload Type value at SDP; 96 in this case. Having this changed, the receiver is not able to understand this type of payload and sends "rtp debug: unknown payload (96)" messages.

So, how can I get the receiver to accept this stream?
Should I change something else in the server?

Thank you!

Rémi Denis-Courmont
Developer
Developer
Posts: 15324
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: codec samplerate changing causes unknown payload

Postby Rémi Denis-Courmont » 17 Feb 2012 14:36

If the RTP payload format does not have a static number, you need to use an SDP. There are no other ways to determine the parameters (codec, channel count, sample rate). And SDP are not currently by the native VLC RTP receiver due to lack of time and resources on my end.

Basically, you have to use one of the static payload formats. s16b stereo 44,1 kHz is the closest.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Re: codec samplerate changing causes unknown payload

Postby baboom » 20 Feb 2012 08:37

Thanks Rémi,
But if I choose to use that, it won't be compatible with my idea of 32 kHz samplerate.
I'm having a look at the source code "modules/access/rtp/rtp.c" and it looks as if I could add a case for a known dynamic payload type (synchronising with "modules/services_discovery/sap.c").
Would it work if I add some lines of code just there? or I must add/change much more things?
Thank you!!

baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Re: codec samplerate changing causes unknown payload

Postby baboom » 22 Feb 2012 12:52

please, i need to get this working...
would it be enough to add something similar to http://git.videolan.org/?p=vlc.git;a=bl ... /rtp/rtp.c ?
or there must be much more code added?

Thank you!

Rémi Denis-Courmont
Developer
Developer
Posts: 15324
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: codec samplerate changing causes unknown payload

Postby Rémi Denis-Courmont » 01 Mar 2012 13:58

It might work, but it will never be accepted in the official VLC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Re: codec samplerate changing causes unknown payload

Postby baboom » 05 Mar 2012 11:26

ok, thx!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 15 guests