My pipe line is simply trying to mux an audiotestsrc with a videotestsrc and output to a filesink.
videotestsrc num-buffers=150 ! video/x-raw-yuv,width=1920, height=1080 !
timeoverlay ! videorate ! queue ! xvidenc ! avimux name=mux mux.
! filesink sync=true location=new.avi
audiotestsrc num-buffers=150 !
queue ! audioconvert ! audiorate ! mux.
What am I missing here? I've tried every combination of sync="" properties, etc.
What pipeline would generate a test clip with autotestpattern and videotest pattern muxed together where audio and video are the same duration?
Thanks
GStreamer is an extremely powerful and versatile framework for creating streaming media applications. Many of the virtues of the GStreamer framework come from its modularity: GStreamer can seamlessly incorporate new plugin modules.
gst-launch is a tool that builds and runs basic GStreamer pipelines. In simple form, a PIPELINE-DESCRIPTION is a list of elements separated by exclamation marks (!). Options may be appended to elements, in the form "option=value".
audiotestsrc num-buffers=150
By default each buffer contains 1024 samples: samplesperbuffer Which means you are generating 150*1024=153600 samples. Asuming 44.1kHz, the duration would be 153600/44100=3.48 seconds.
So if you need 5 seconds audio, you need 5*44100=220500 samples. with samplesperbuffer==1024, this means 220500/1024=215.33 buffers. (ie 215 or 216 buffers).
It would be easier if you set samplesperbuffer to 441, then you need exactly 100 buffers for every second audio:
audiotestsrc num-buffers=500 samplesperbuffer=441
You can make use of the blocksize roperty of audiotesrc to match the duration of a frame. this is in bytes and thus you might want to use a caps filter after audiotestsrc to select a sampling-rate and sample format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With