Lecture de l'arrivée d'un flux RTP avec GStreamer

Je suis l'élaboration d'un GStreamer application et de la difficulté peu avec la mise en œuvre d'un joueur entrant les flux RTP. Je suis en train de construire un gazoduc à travers le gstrtpbin élément. Je suis en train de modéliser le pipeline à l'aide d'un remboursement de la tps-lancement de la construction:

VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"

gst-launch -v udpsrc caps=$VIDEO_CAPS port=4444 \
              ! gstrtpbin .recv_rtp_sink_0 \
              ! rtph264depay ! ffdec_h264 ! xvimagesink

Lorsque je lance le script GStreamer rapports de ces erreurs:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0: ntp-ns-base = 3469468914024449000
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0.GstProxyPad:proxypad0: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_rtp_src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_960476599_33.GstProxyPad:proxypad1: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)33
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2378): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 209381685 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_960476599_33: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:src_33: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:src_960476599: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_rtp_src: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink: caps = NULL
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0: caps = NULL
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

Je dois mentionner qu'il fonctionne avec un playbin et fichier SDP. Par exemple ce fichier:

v=0
o=- 1188340656180883 1 IN IP4 127.0.0.1
s=Session streamed by GStreamer
i=server.sh
t=0 0
a=tool:GStreamer
a=type:broadcast
m=video 4444 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000

Peut être utilisé pour lire le contenu comme ceci:

gst-launch -vvv playbin uri=file://`pwd`/stream.sdp

Complet: je suis en utilisant VLC pour envoyer des données. C'est la commande:

vlc -I rc /usr/local/movies/sample.mp4 \
    --screen-fps=10 :screen-caching=100 \
    --sout='#transcode{vcodec=h264,venc=x264{bframes=0,keyint=40},vb=512}:\
                   rtp{mux=ts,dst=127.0.0.1,port=4444}'

Quelqu'un pour m'aider à comprendre pourquoi la tps-lancer le script échoue? Le message d'erreur "raison non liée" me fait penser que le lien entre gstrtpbin et la rtph264depay éléments est cassé. Mais je ne sais pas comment le résoudre.

Modifier
Suivant RAOF suggestions j'ai corrigé quelques erreurs dans ma commande. Cependant, je suis en utilisant ffdec_h264 et autovideosink parce que sur mon système Windows je n'ai pas le fluh264dec et xvimage évier plugins installés:

gst-launch-0.10 udpsrc port=4444 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! .recv_rtp_sink_0 gstrtpbin ! rtpmp2tdepay ! mpegtsdemux ! ffdec_h264 ! autovideosink 

Ce qui conduit à de nouvelles erreurs:

0:00:00.743000000   516   024070A8 ERROR                 ffmpeg .:0:: non-existing PPS referenced
0:00:00.744000000   516   024070A8 ERROR                 ffmpeg .:0:: non-existing PPS referenced
0:00:00.745000000   516   024070A8 ERROR                 ffmpeg .:0:: decode_slice_header error
0:00:00.745000000   516   024070A8 ERROR                 ffmpeg .:0:: no frame!
0:00:00.812000000   516   024070A8 ERROR                 ffmpeg .:0:: non-existing PPS referenced
0:00:00.813000000   516   024070A8 ERROR                 ffmpeg .:0:: non-existi
...
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow
 error.
Additional debug info:
..\Source\gstreamer\libs\gst\base\gstbasesrc.c(2378): gst_base_src_loop (): /Gst
Pipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 4790000000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Je suis encore à essayer de comprendre comment résoudre ce problème. Si vous pouvez aider, alors n'hésitez pas à le faire.

Edit2
J'ai testé à nouveau en utilisant le SDP solution et a observé que les "non-existant SPA" les erreurs se produisent également, mais la vidéo ne se jouer. D'autre part, le fatal "interne de flux de données d'erreur" affiche uniquement lors de l'utilisation du pipeline personnalisé solution.
Je soupçonne que le "non-existant SPA" les erreurs sont causées par le x264 encodeur. Le "interne de flux de données d'erreur" doit être causé par une erreur dans mon pipeline, ou peut-être un bug dans certains Windows plugin. Je vais donc des recherches plus poussées...

OriginalL'auteur StackedCrooked | 2009-12-10