I’m trying to convert raw audio, resample it and mux it with videotestsrc black video.
GST_DEBUG=3 gst-launch-1.0 -v videotestsrc pattern=2 num-buffers=53 ! video/x-raw,width=1920,height=1080,framerate=15/1,format=NV12 ! videoconvert ! x264enc ! h264parse ! queue2 ! mux. filesrc location=raw_audio.raw ! rawaudioparse use-sink-caps=false format=0 interleaved=false pcm-format=16 sample-rate=8000 num-channels=1 ! decodebin ! audioconvert ! audioresample resample-method=1 ! "audio/x-raw, rate=44100, channels=1, format=(string)S16LE", layout=interleaved ! audioconvert ! lamemp3enc ! queue2 ! mux. mp4mux name=mux ! filesink location=bv-w-audio.mp4
Here’s the pipeline I’m using, which does produce a black video of the right size, but no audio.
I’ve verified that the pipeline for the audio conversion works with:
gst-launch-1.0 filesrc location=raw_audio.raw ! rawaudioparse use-sink-caps=false format=0 interleaved=false pcm-format=16 sample-rate=8000 num-channels=1 ! decodebin ! audioconvert ! audioresample resample-method=1 ! "audio/x-raw, rate=44100, channels=1, format=(string)S16LE", layout=interleaved ! audioconvert ! lamemp3enc ! filesink location=resampled_audio.mp3
How can I get the black video muxed with the converted audio?
Miguellan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.