Created
September 22, 2019 12:36
-
-
Save anselmobattisti/ba240422eac9dfeb1da447772adc4717 to your computer and use it in GitHub Desktop.
Send mp3 audio file via UDP gstreamer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Send audio data | |
gst-launch-1.0 multifilesrc location=sample.mp3 loop=true \ | |
! mpegaudioparse \ | |
! mpg123audiodec \ | |
! audioconvert \ | |
! audioresample \ | |
! audio/x-raw, rate=16000, channels=1, format=S16LE \ | |
! audiomixer blocksize=320 \ | |
! udpsink host=localhost port=10000 | |
VMS udp_to_udp | |
gst-launch-1.0 \ | |
udpsrc port=10000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \ | |
! udpsink host=localhost port=10001 | |
Consume audio data | |
gst-launch-1.0 -v udpsrc port=10001 \ | |
! rawaudioparse use-sink-caps=false format=pcm pcm-format=s16le sample-rate=16000 num-channels=1 \ | |
! queue \ | |
! audioconvert \ | |
! audioresample \ | |
! autoaudiosink |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment