2016-08-28 2 views
0

rtp를 통해 스트리밍하려는 pcm 오디오 파일이 있습니다. 내가 Gstreamer. PCM 스트리밍

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 

작업을 수행 할 때 내가 메시지

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 ... 

의 종류가 그러나 나는이 오디오를 재생할 수 있습니다, 즉 오디오 괜찮 것을 의미한다.

gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw, format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc ! rtppcmapay ! rtppcmdepay ! alawdec ! audiosink 

나는이 같은 일을하지만, avi 파일에서 오디오를 그것에서 오디오를 가지고, 다른 파일 AVI 파일을 찍어 보았습니다과 같은 일
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 

보시다시피

을 표시했습니다. 모든 것이 작동합니다. 그래서 여기

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

문제이다 : 나는 와이어 샤크를 열 때

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

은 내가 PCM 내 파이프 라인을 실행할 때, 그것은 어떤 지체없이 모든 데이터를 발생 내가 보내는 모든 패킷에 있음을 볼 수 . 나는 내가 할 때 타임 스탬프 또는 그와 비슷한 것에 문제가 있다고 생각한다! alawenc (G711로 인코딩), 맞습니까? 그리고이 문제를 해결할 수있는 솔루션은 무엇입니까?

+0

내가 비디오를받을 수 있지만 내가 그리워 무엇 오디오되지는? –

답변

1

첫 번째 질문. 두 번째 예제가 실행됩니까? 더

몇 가지 의견 :

  • file.avi 및 qtdemux 잘못 소리, 그냥 decodebin 사용 (또는 uridecodebin)는 pligging가있는 GStreamer을 떠나. 원시 오디오
  • 은 내가 audioparse 요소를

를 사용하는 것이 좋습니다 그리고 마지막으로 자식의 repo에서 RTP 예제의 무리가 있습니다 : https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-PCMA.sh

+0

>> 첫 번째 질문. 두 번째 예제가 실행됩니까? 예 감사합니다. 지금 시도해 보겠습니다. –

+0

발견 한 부분 : filesrc는 주어진 파일의 데이터를 원시 바이트로 읽습니다. 나는 alawenc로 이러한 raw 바이트를 인코딩 할 수 없다. 그래서 파일 src 다음에 오디오 피어를 추가하고 출력은 입니다.'ERROR : from element/GstPipeline : pipeline0/GstAudioParse : audioparse0 : 내부 데이터 스트림 오류입니다. 추가 디버그 정보 : gstrawparse.c (471) : gst_raw_parse_loop() :/GstPipeline : pipeline0/GstAudioParse : audioparse0' –

+0

감사합니다. 모든 것이 작동합니다. –

관련 문제