PCM Streaming

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PCM Streaming

BogdanS
Hello

I have a pcm audio file that I want to stream via rtp. When I do

gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw, format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc ! rtppcmapay ! udpsink host=192.168.2.5 port=5010
I have that kind of message

Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.019270487
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

But I can play this audio, That means that audio is ok.

gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw, format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc ! rtppcmapay ! rtppcmdepay ! alawdec ! audiosink
I tried to take another file-avi file, take audio from it and maked the same thing

gst-launch-1.0 filesrc location=file.avi ^
    ! qtdemux name=mux^
    ! queue ^
    ! faad ^
    ! audioconvert ^
    ! audioresample ^
    ! "audio/x-raw, layout=(string)interleaved, rate=(int)8000" ^
    ! alawenc ^
    ! rtppcmapay ^
        ! queue ^
        ! udpsink host=192.168.2.5 port=5010

As you see, this the same thing but with audio from avi. Everything works.

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

When I open Wireshark I see that when I run my pipeline with PCM, it fires all data without any delay and in every packet that I send is:

Header checksum: 0x0000 [incorrect, should be 0x40b5 (may be caused by "IP checksum offload"?)]
Message: Bad checksum

So here is a question. I think that I have a problem with timestamps or something like that, when I do !alawenc (encoding to G711), I am right? And what solution can fix that problem?
Reply | Threaded
Open this post in threaded view
|

Re: PCM Streaming

Olivier Crête-3
Hi,

On Sun, 2016-08-28 at 02:56 -0700, BogdanS wrote:
> Hello
>
> I have a pcm audio file that I want to stream via rtp. When I do
>
> gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw,
> format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc !
> rtppcmapay ! udpsink host=192.168.2.5 port=5010
> I have that kind of message

You need some element to timestamp the audio packets, for raw audio,
the element is named "audioparse", so you'd use it like
filesrc ! audioparse rate=8000 raw-format=s16le channels=1 ! ...


--
Olivier Crête
[hidden email]
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: PCM Streaming

BogdanS
Thank you! It works well!

gst-launch-1.0 -v filesrc location=AudioRaw515151.pcm ^
 ! audioparse channels=1 rate=8000  ^
 ! alawenc ! rtppcmapay ! udpsink host=10.0.0.11 port=5010