Mix two audio inputs and one video input to filesink

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Mix two audio inputs and one video input to filesink

pradeep.linux
Hi All,

I am trying to mix two audio inputs(alsasrc) & one video (v4l2src) input to a file. I am getting one audio and one video in the filesink, other audio is missing from filesink. I have tried playing one audio at a time, both audio's are fine.

can you please check below gstreamer command . correct and suggest me how to get both audio's in the filesink?

gst-launch-1.0 -e mp4mux name=muxy ! filesink location=out.mp4 \
-e alsasrc device="plughw:0,2" do-timestamp=true ! 'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=10000000000 max-size-bytes=104857600 max-size-buffers=2000 ! lamemp3enc ! muxy.audio_0 \
-e alsasrc device="plughw:1,0" do-timestamp=true ! 'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=10000000000 max-size-bytes=104857600 max-size-buffers=2000 ! lamemp3enc ! muxy.audio_1 \
-e v4l2src device=/dev/video10 !  videoconvert ! video/x-raw,format=NV12,width=1280,height=720 ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=20000000;" ! h264parse ! queue ! muxy.video_0

Thanks,
Pradeep

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mix two audio inputs and one video input to filesink

Geek-Gst
Below pipeline store audio streams in 2 different tracks(Line Multiple
Language English/Hindi).
In player any one of the track can be played at a time. To change the track
you have to go to Audio setting in player and change the track.

If you are expecting both the alsasrc in same track then use audiomixer.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mix two audio inputs and one video input to filesink

pradeep.linux
Thanks Vinod.

Both tracks are there but Volume is low for one track. Please suggest how to
increase the volume.

Also I have tried to combine two audio's with audiomixer. Please check below
gstreamer command. Here also low volume for one track and some buzz noise is
there in the background.

gst-launch-1.0 -e *audiomixer* name=mix ! lamemp3enc ! filesink
location=out.mp3 *alsasrc* device="plughw:1,0" name=hello1 !
'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=20000000000
max-size-bytes=204857600 max-size-buffers=3000 ! mix. *alsasrc*
device="plughw:0,2" name=hello2 ! 'audio/x-raw,format=S16LE, rate=48000' !
queue  max-size-time=20000000000 max-size-bytes=204857600
max-size-buffers=3000 ! mix.

Thanks,
Pradeep



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mix two audio inputs and one video input to filesink

pradeep.linux
Hi Vinod,

I increased the volume with below element. Now volume is fine for both
tracks. Both audio tracks are combined to single file. i will try to combine
the video to the audio.

*volume volume=10.0 ! level
*
Thanks,
Pradeep



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel