Resampling audio from 88200 to 96000 samples per second
Nick
n.koi at usa.net
Fri Nov 23 11:02:17 PST 2012
Tim-Philipp Müller-2 wrote
> Try: ... ! decodebin2 ! audioconvert ! audioresample ! alsasink ...
Tim, thanks for your astonishingly fast response.
I've tried the following:
% gst-launch-0.10 filesrc location=Song.flac ! decodebin2 ! audioconvert !
audioresample ! alsasink, device=hw:0,0 -v
It produces sound but still at 48000 Hz rather than the desired 96000 Hz.
One thing that puzzles me is how the pipeline knows that the output should
be 96000 samples/sec. I tried many things:
(1)% gst-launch-0.10 filesrc location=Song.flac ! decodebin2 ! audioconvert
! audioresample ! 'alsasink, device=rate96000' -v
... where: /etc/asound.conf contains "pcm.rate96000 { type plug slave { pcm
"hw:0,0" rate 96000 }}" The idea being that since 'alsasink' doesn't have a
"rate" option, to do it indirectly in the alsa config.
(2)% gst-launch-0.10 filesrc location=Song.flac ! decodebin2 ! audioconvert
! audioresample ! 'alsasink, slave-method=0, device=rate96000' -v
... where "slave-method=0" signifies "resample".
I've tried dozens of variations with arguments to decodebin and decodebin2;
inserting audio/x-raw elements with rate=96000... all to no avail.
Here is some more information about the capabilities of the DAC I'm trying
to drive. My goal is to see it using "Altset 3" at "Momentary freq" of
96000.
> GFEC ASSP DigiHug USB Audio at usb-0000:00:13.0-1, full speed : USB Audio
>
> Playback:
> Status: Running
> Interface = 3
> Altset = 1
> URBs = 3 [ 7 7 8 ]
> Packet Size = 388
> Momentary freq = 48000 Hz (0x30.0000)
> Interface 3
> Altset 1
> Format: S16_LE
> Channels: 2
> Endpoint: 3 OUT (ADAPTIVE)
> Rates: 8000, 16000, 32000, 44100, 48000, 96000
> Interface 3
> Altset 2
> Format: S24_3LE
> Channels: 2
> Endpoint: 3 OUT (ADAPTIVE)
> Rates: 8000, 16000, 32000, 44100, 48000, 96000
>
Thanks again for your help.
n.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Resampling-audio-from-88200-to-96000-samples-per-second-tp4657048p4657051.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list