7

RTP ストリーム経由で gstreamer を使用して、あるデバイスから別のデバイスに mp4(mpeg-4) ファイルをストリーミングしています。基本的に、mp4 ファイルをオーディオ ファイルとビデオ ファイルに分割し、それをすべて他のデバイスに送信してストリーミングします。今、mp4ファイルを他のデバイスのディスクに保存したいのですが、オーディオファイルとビデオファイルを別々に保存でき、個別に再生できないという問題があります。

オーディオとビデオの両方の rtp ストリームを結合して mp4 ファイルを形成し、それを他のデバイスのファイルに保存する方法について混乱しています。

コマンドラインコードは次のとおりです。

送信者(サーバー)

gst-launch-0.10 -v filesrc location=/home/kuber/Desktop/sample.mp4 \
             ! qtdemux name=d \
             ! queue \
             ! rtpmp4vpay \
             ! udpsink port=5000 \
             d. \
             ! queue \
             ! rtpmp4gpay \
             ! udpsink port=5002

受信者(クライアント)

gst-launch-0.10 udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)243, config=(string)000001b0f3000001b50ee040c0cf0000010000000120008440fa282fa0f0a21f, payload=(int)96, ssrc=(uint)4291479415, clock-base=(uint)4002140493, seqnum-base=(uint)57180" \
             ! rtpmp4vdepay \
             ! ffdec_mpeg4 \
             ! xvimagesink sync=false \
             udpsrc port=5002 caps="application/x-rtp, media=(string)audio, clock-rate=(int)32000, encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)2, streamtype=(string)5, profile-level-id=(string)2, mode=(string)AAC-hbr, config=(string)1290, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3, payload=(int)96, ssrc=(uint)501975200, clock-base=(uint)4248495069, seqnum-base=(uint)37039"\
             ! rtpmp4gdepay \
             ! faad \
             ! alsasink sync=false
4

1 に答える 1