Page 1 of 1

codec samplerate changing causes unknown payload

Posted: 17 Feb 2012 09:18
by baboom
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!

Re: codec samplerate changing causes unknown payload

Posted: 17 Feb 2012 14:36
by Rémi Denis-Courmont
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.

Re: codec samplerate changing causes unknown payload

Posted: 20 Feb 2012 08:37
by baboom
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!!

Re: codec samplerate changing causes unknown payload

Posted: 22 Feb 2012 12:52
by baboom
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!

Re: codec samplerate changing causes unknown payload

Posted: 01 Mar 2012 13:58
by Rémi Denis-Courmont
It might work, but it will never be accepted in the official VLC.

Re: codec samplerate changing causes unknown payload

Posted: 05 Mar 2012 11:26
by baboom
ok, thx!