From: Antonio Ospite Date: Fri, 2 Dec 2016 11:52:28 +0000 (+0100) Subject: Add gst-concat-tests.sh X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/commitdiff_plain/162b057235141ed25a30e715098d0c3b722692a4?ds=inline;hp=d636571e739d8d24ad4944eb0d43f2e16f8a9ee7 Add gst-concat-tests.sh --- diff --git a/shell/gst-concat-tests.sh b/shell/gst-concat-tests.sh new file mode 100755 index 0000000..88c6817 --- /dev/null +++ b/shell/gst-concat-tests.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +set -e +set -x + +FILE1=sample_440hz.webm +FILE2=sample_880hz.webm + +# This pipeline works fine +#gst-launch-1.0 \ +# concat name=c ! videoconvert ! videoscale ! autovideosink \ +# videotestsrc num-buffers=100 ! c. \ +# videotestsrc num-buffers=100 pattern=ball ! c. + +# Here only the video from the first stream is shown +gst-launch-1.0 \ + concat name=c ! decodebin ! autovideosink \ + filesrc location="$FILE1" ! c. \ + filesrc location="$FILE2" ! c. + +# This pipeline using one decoder per filesrc works fine +gst-launch-1.0 \ + concat name=c ! videoconvert ! videoscale ! autovideosink \ + filesrc location="$FILE1" ! matroskademux ! vp9dec ! c. \ + filesrc location="$FILE2" ! matroskademux ! vp9dec ! c. + + +# These pipelines work fine, but should a streamsynchronizer be added? +# And if so, where? +gst-launch-1.0 \ + concat name=video_concat ! autovideosink \ + concat name=audio_concat ! autoaudiosink \ + filesrc location="$FILE1" ! decodebin name=d1 \ + filesrc location="$FILE2" ! decodebin name=d2 \ + d1. ! video/x-raw ! queue ! video_concat. \ + d1. ! audio/x-raw ! queue ! audio_concat. \ + d2. ! video/x-raw ! queue ! video_concat. \ + d2. ! audio/x-raw ! queue ! audio_concat. + +gst-launch-1.0 -e \ + mp4mux name=mp4 ! filesink location=out.mp4 \ + concat name=video_concat ! videoconvert ! x264enc tune=4 ! mp4. \ + concat name=audio_concat ! audioconvert ! voaacenc ! mp4. \ + filesrc location="$FILE1" ! decodebin name=d1 \ + filesrc location="$FILE2" ! decodebin name=d2 \ + d1. ! video/x-raw ! queue ! video_concat. \ + d1. ! audio/x-raw ! queue ! audio_concat. \ + d2. ! video/x-raw ! queue ! video_concat. \ + d2. ! audio/x-raw ! queue ! audio_concat.