Page 1 of 1

Transcode on the fly using Python binding

Posted: 10 Nov 2017 00:15
by peppy.player
Hi,

For my Peppy Player project I need to detect sample rate of the stream and if it's 22kHz then convert it into 44kHz.
Is it possible to implement this functionality using VLC Python binding?

That's necessary because the hardware which I use for the project doesn't support sample rate 22kHz. It supports
only 44kHz.

Any code samples would be very helpful.

Thanks in advance!

Re: Transcode on the fly using Python binding

Posted: 11 Nov 2017 14:40
by Jean-Baptiste Kempf
VLC should automatically resample.

Re: Transcode on the fly using Python binding

Posted: 11 Nov 2017 18:44
by peppy.player
Should I set any parameter for that? Right now I start VLC instance using these parameters:
--aout=alsa --alsa-audio-device=hw --verbose=-1