Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not switch codebooks error while streaming audio #44

Open
Harishrelysys opened this issue May 24, 2018 · 1 comment
Open

Could not switch codebooks error while streaming audio #44

Harishrelysys opened this issue May 24, 2018 · 1 comment

Comments

@Harishrelysys
Copy link

Hi all,
I am trying to stream vorbis encoded audio using gstreamer.I am getting Redistribute latency error.
Please tell me is their anymistake in the command

Thank you all inadvance

Sender:

command:

gst-launch-1.0 -e --gst-debug-level=2 alsasrc device=hw:0,0 latency-time=30000 num-buffers=1000 buffer-time=800000 ! \
audio/x-raw,format=S16LE,layout=interleaved,rate=44100,channels=2 ! audioconvert ! audio/x-raw,format=F32LE,rate=44100,channels=2,layout=interleaved ! \
vorbisenc ! audio/x-vorbis,rate=44100,channels=2 ! vorbisparse ! rtpvorbispay name=pay pt=96 config-interval=3 ! application/x-rtp,media=audio,channel=2,payload=96,clock-rate=44100,encoding-name=VORBIS ! \
udpsink host=192.168.5.30 port=5000

error log:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...

Reciever:

command:

gst-launch-1.0 -e --gst-debug-level=2 udpsrc port=5000 ! application/x-rtp,media=audio,channel=2,payload=96,clock-rate=44100,encoding-name=VORBIS ! \
rtpvorbisdepay name=pay0 ! vorbisparse ! vorbisdec ! audio/x-raw,format=F32LE,rate=44100,channel=2 ! audioconvert ! \
autoaudiosink sync=false

error log:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.997245066 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:376:gst_rtp_vorbis_depay_setcaps: no configuration specified
0:00:00.997436314 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks
WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream.
Additional debug info:
gstrtpvorbisdepay.c(635): gst_rtp_vorbis_depay_process (): /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0:
Could not switch codebooks
0:00:01.048326551 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks
WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream.
Additional debug info:
gstrtpvorbisdepay.c(635): gst_rtp_vorbis_depay_process (): /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0:
Could not switch codebooks
0:00:01.073574969 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks
WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream.
Additional debug info:
@tdaede
Copy link
Contributor

tdaede commented May 24, 2018

You must pass the configuration along to the rtp payloaders/depayloaders. See section 3 of https://datatracker.ietf.org/doc/rfc5215/

That said, I'd highly recommend using opus instead if you can, as you will get higher quality over RTP, and it does not require sending any configuration parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants