2017-08-11 21 views
0

私はSAA7134テレビカードを持っています。 Gstreamerを使用してサウンド付きのビデオを録音したい。このコマンドは、このコマンドは正常に動作して私を可能にGstreamerを使用してTVカードからビデオとサウンドの両方を録音できません

gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink 

(も正常に動作します)このコマンドは、私はビデオを見ることができることを証明している私は、オーディオを聞くことができることを確認するために使用し、それは

gst-launch-1.0 alsasrc device="hw:1,0" ! queue ! audioconvert ! alsasink 

の作品ファイル

gst-launch-1.0 alsasrc device="hw:1,0" ! queue ! audioconvert ! wavenc ! filesink location=/home/out/testout.wav 

にサウンドを書き込む。しかし、このコマンドは、任意の音声なし動画を書き込みする

gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! videoconvert ! jpegenc ! mux. alsasrc device="hw:1,0" ! queue ! audioconvert ! lamemp3enc bitrate=192 ! mux. avimux name=mux ! filesink location=/home/out/testout.avi 

同じ問題を解決する方法

gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! videoconvert ! theoraenc ! mux. alsasrc device="hw:1,0" ! queue ! audioconvert ! vorbisenc ! mux. oggmux name=mux ! filesink location=/home/out/testout.ogg 

のため?ありがとうございました。

P.S.私はUbuntu 16.04.3 LTSを使用します。

答えて

0

gst-launch構文の使用に関する重要な情報が1つ欠落しているようです。私はよく見て、これを見つけた:

The -e option forces EOS on sources before shutting the pipeline down. This is useful when we write to files and want to shut down by killing gst-launch using CTRL+C or with the kill command 

私はこのオプションをテストしたところ、私はついにビデオとオーディオの両方を得ました。

関連する問題