Panda から RTSP ビデオ + オーディオから Android 4.1.2 アプリへの gstreamer パイプラインを構築しようとしています。Android アプリは以下を使用します。
videoView.setVideoURL(Uri.parse(":rtsp://..."))
をクリックしてビデオを表示します。Panda で gstreamer-0.10 をビルドし (動作する uvch264_src 要素を取得して Logitech C920 カメラから H.264 ビデオを取得するため)、gst-rtsp-server/exmaples/test-launch を使用して、次の方法でビデオとオーディオを提供します。
./test-launch 'uvch264_src do-timestamp=true mode=2 post-previews=false usage-type=1 iframe-period=2000 peak-bitrate=400000 rate-control=qp auto-start=true name=src ! queue ! video/x-h264,width=640,height=480,framerate=30/1,profile=constrained-baseline ! h264parse ! rtph264pay name=pay0 pt=96 \
alsasrc do-timestamp=true device=plughw:2,0 ! audio/x-raw-int,rate=44100 ! queue ! audioconvert ! ffenc_ac3 ! rtpac3pay name=pay1 pt=97'
VLC でストリームを表示できますが (音声が同期していません)、Android タブレットでストリームを再生できません。パイプラインのオーディオ部分を削除すると:
./test-launch 'uvch264_src do-timestamp=true mode=2 post-previews=false usage-type=1 iframe-period=2000 peak-bitrate=400000 rate-control=qp auto-start=true name=src ! queue ! video/x-h264,width=640,height=480,framerate=30/1,profile=constrained-baseline ! h264parse ! rtph264pay name=pay0 pt=96'
その後、Android アプリは問題なく再生できます。
videoView で再生できるように、オーディオ + ビデオ パイプラインをエンコードするにはどうすればよいですか? 最初にオーディオとビデオを一緒に MPEG-TS ストリームに多重化する必要がありますか?