GNOME Bugzilla – Bug 160894
[audioscale] support resampling >2 channel audio or floating-point
Last modified: 2006-07-24 16:15:18 UTC
This produces noise when the DVD title has 6-channel sound (works fine with 2-channel titles): % gst-launch-0.8 -v dvdreadsrc ! dvddemux ! a52dec !audioconvert ! audioscale ! audio/x-raw-int,rate=44100 ! alsasink RUNNING pipeline ... /pipeline0/dvdreadsrc0.src: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvddemux0.sink: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvdreadsrc0.src: active = TRUE /pipeline0/dvddemux0.sink: active = TRUE /pipeline0/dvddemux0.src: active = TRUE /pipeline0/dvddemux0.current_video: active = TRUE /pipeline0/dvddemux0.current_audio: active = TRUE /pipeline0/dvddemux0.current_subpicture: active = TRUE /pipeline0/a52dec0.sink: active = TRUE /pipeline0/a52dec0.src: active = TRUE /pipeline0/audioconvert0.sink: active = TRUE /pipeline0/audioconvert0.src: active = TRUE /pipeline0/audioscale0.sink: active = TRUE /pipeline0/audioscale0.src: active = TRUE /pipeline0/alsasink0.sink: active = TRUE /pipeline0/dvddemux0.video_00: active = TRUE /pipeline0/dvddemux0.current_audio: caps = audio/x-ac3 /pipeline0/a52dec0.sink: caps = audio/x-ac3 /pipeline0/dvddemux0.audio_00: active = TRUE /pipeline0/audioscale0.src: caps = audio/x-raw-int, rate=(int)44100, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/alsasink0.sink: caps = audio/x-raw-int, rate=(int)44100, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioconvert0.src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioscale0.sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/a52dec0.src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/audioconvert0.sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/dvddemux0.audio_01: active = TRUE /pipeline0/dvddemux0.audio_03: active = TRUE /pipeline0/dvddemux0.audio_04: active = TRUE Caught interrupt. This, however, works (note: a52dec outputs @ 48kHz by default): % gst-launch-0.8 -v dvdreadsrc ! dvddemux ! a52dec !audioconvert ! audioscale ! audio/x-raw-int,rate=48000 ! alsasink RUNNING pipeline ... /pipeline0/dvdreadsrc0.src: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvddemux0.sink: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvdreadsrc0.src: active = TRUE /pipeline0/dvddemux0.sink: active = TRUE /pipeline0/dvddemux0.src: active = TRUE /pipeline0/dvddemux0.current_video: active = TRUE /pipeline0/dvddemux0.current_audio: active = TRUE /pipeline0/dvddemux0.current_subpicture: active = TRUE /pipeline0/a52dec0.sink: active = TRUE /pipeline0/a52dec0.src: active = TRUE /pipeline0/audioconvert0.sink: active = TRUE /pipeline0/audioconvert0.src: active = TRUE /pipeline0/audioscale0.sink: active = TRUE /pipeline0/audioscale0.src: active = TRUE /pipeline0/alsasink0.sink: active = TRUE /pipeline0/dvddemux0.video_00: active = TRUE /pipeline0/dvddemux0.current_audio: caps = audio/x-ac3 /pipeline0/a52dec0.sink: caps = audio/x-ac3 /pipeline0/dvddemux0.audio_00: active = TRUE /pipeline0/audioscale0.src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/alsasink0.sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioconvert0.src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioscale0.sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/a52dec0.src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/audioconvert0.sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/dvddemux0.audio_01: active = TRUE /pipeline0/dvddemux0.audio_03: active = TRUE /pipeline0/dvddemux0.audio_04: active = TRUE /pipeline0/dvddemux0.subpicture_02: active = TRUE Caught interrupt. Strangely, however, this works though (despite same caps on audioscale pads as above): % gst-launch-0.8 -v dvdreadsrc ! dvddemux ! a52dec !audioconvert ! audioscale ! alsasink RUNNING pipeline ... /pipeline0/dvdreadsrc0.src: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvddemux0.sink: caps = video/mpeg, mpegversion=(int)1, systemstream=(boolean)true /pipeline0/dvdreadsrc0.src: active = TRUE /pipeline0/dvddemux0.sink: active = TRUE /pipeline0/dvddemux0.src: active = TRUE /pipeline0/dvddemux0.current_video: active = TRUE /pipeline0/dvddemux0.current_audio: active = TRUE /pipeline0/dvddemux0.current_subpicture: active = TRUE /pipeline0/a52dec0.sink: active = TRUE /pipeline0/a52dec0.src: active = TRUE /pipeline0/audioconvert0.sink: active = TRUE /pipeline0/audioconvert0.src: active = TRUE /pipeline0/audioscale0.sink: active = TRUE /pipeline0/audioscale0.src: active = TRUE /pipeline0/alsasink0.sink: active = TRUE /pipeline0/dvddemux0.video_00: active = TRUE /pipeline0/dvddemux0.current_audio: caps = audio/x-ac3 /pipeline0/a52dec0.sink: caps = audio/x-ac3 /pipeline0/dvddemux0.audio_00: active = TRUE /pipeline0/audioscale0.src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/alsasink0.sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioconvert0.src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/audioscale0.sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)6, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE > /pipeline0/a52dec0.src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/audioconvert0.sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, channels=(int)6, rate=(int)48000, buffer-frames=(int)0, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/dvddemux0.audio_01: active = TRUE /pipeline0/dvddemux0.audio_03: active = TRUE /pipeline0/dvddemux0.audio_04: active = TRUE /pipeline0/dvddemux0.subpicture_02: active = TRUE /pipeline0/dvddemux0.subpicture_01: active = TRUE /pipeline0/dvddemux0.subpicture_00: active = TRUE Caught interrupt. Cheers -Tim
Errm, ignore third remark please - it doesn't make sense ;) Cheers -Tim
audioscale doesn't handle more than 2 channels, and should probably enforce that in caps. Fixed.
That's a good fix, but I'd still like to have a decent >2 channels resampler.
I reenabled passthru of multichannel audio, which should cover many use cases.
Thomas, passthrough != resampling. This needs to stay open as an enhancement request.
This works all fine these days, at least in HEAD, closing.