简体   繁体   English

gstreamer管道,用于在两个覆盆子pi之间传输多路复用的h.264和aac音频

[英]gstreamer pipeline for streaming multiplexed h.264 and aac audio between two raspberry pi's

I have been stuck on this for days now. 我已经被困在这几天了。 I am trying to come up with a GStreamer pipeline that will stream h.264 video and compressed audio (aac, mulaw, whatever, I don't really care) over a single rtp stream. 我试图想出一个GStreamer管道,它将在单个rtp流上传输h.264视频和压缩音频(aac,mulaw,无论如何,我真的不在乎)。 The problem seems to always be with the multiplexer. 问题似乎总是在多路复用器上。 I've tried asf, avi, mpegts, Matroska and flv multiplexers and it seems they are all oriented towards files (not network streaming) and are therefore requiring header information. 我尝试过asf,avi,mpegts,Matroska和flv多路复用器,看起来它们都面向文件(不是网络流),因此需要标题信息。 Anyway, here's my latest attempt: 无论如何,这是我最近的尝试:

gst-launch-1.0 -e --gst-debug-level=4 \\ flvmux name=flashmux streamable=true ! gst-launch-1.0 -e --gst-debug-level = 4 \\ flvmux name = flashmux streamable = true! flvdemux name=flashdemux ! flvdemux name = flashdemux! decodebin name=decode \\ videotestsrc ! decodebin name = decode \\ videotestsrc! 'video/x-raw,width=640,height=480,framerate=15/1' ! 'video / x-raw,width = 640,height = 480,framerate = 15/1'! omxh264enc ! omxh264enc! flashmux. flashmux。 \\ audiotestsrc ! \\ audiotestsrc! 'audio/x-raw,format=S16LE,rate=22050,channels=2,layout=interleaved' ! 'audio / x-raw,format = S16LE,rate = 22050,channels = 2,layout = interleaved'! flashmux. flashmux。 \\ decode. \\解码。 ! queue ! 排队! autovideoconvert ! autovideoconvert! fpsdisplaysink sync=false \\ decode. fpsdisplaysink sync = false \\ decode。 ! queue ! 排队! audioconvert ! audioconvert! alsasink device="hw:1,0" alsasink device =“hw:1,0”

This pipeline removes rtp and simply feeds the decoder with the encoder. 该管道移除rtp并简单地将解码器与编码器一起馈送。 Also, this attempt uses raw audio, not encoded. 此外,此尝试使用未编码的原始音频。 Any help will be greatly appreciated! 任何帮助将不胜感激!

  1. To stream video+audio you should use 2 different ports. 要流式传输视频+音频,您应该使用2个不同的端口。
  2. Using rtpbin element to manage rtp session 使用rtpbin元素来管理rtp会话

Example http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh 示例http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM