user2936743
user2936743

Reputation: 71

play and record stream in the same time using gstreamer

Hi to all i try to play and record mp3 souphttpsrc in the same time but i don't have a good result someone can help please?

gst-launch-1.0 -e filesrc location=/dev/fd/0 ! h264parse ! tee name=myvid \! queue ! decodebin ! xvimagesink sync=false  \ myvid. ! queue ! mux.video_0 \ alsasrc device="plughw:2,0" ! "audio/x-raw,rate=44100,channels=1,depth=24" ! audioconvert ! queue ! filesink location=/tmp/out.mp4

thank you

Upvotes: 0

Views: 2356

Answers (1)

Zaheer Merali
Zaheer Merali

Reputation: 46

Hi your pipeline is slightly wrong.

  1. There is no encoding happening with the audio so you're saving raw audio into the container.
  2. There is no muxer and mux.video_0 therefore does not resolve to any pad on any element.

Here is a pipeline without these issues:

gst-launch-1.0 -e mp4mux name=mux ! filesink location=/tmp/out.mp4 filesrc location=/dev/fd/0 ! h264parse ! tee name=myvid ! queue ! decodebin ! xvimagesink sync=false  myvid. ! queue ! mux.video_0 \ alsasrc device="plughw:2,0" ! "audio/x-raw,rate=44100,channels=1,depth=24" ! audioconvert ! queue ! lame ! mux.audio_0 

Upvotes: 1

Related Questions