X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/d636571e739d8d24ad4944eb0d43f2e16f8a9ee7..6f195c493d8a9a4a73a4097c61401f37b1578377:/shell/gst-raiplay-download.sh diff --git a/shell/gst-raiplay-download.sh b/shell/gst-raiplay-download.sh index 4fc86d8..a5ac690 100755 --- a/shell/gst-raiplay-download.sh +++ b/shell/gst-raiplay-download.sh @@ -4,26 +4,28 @@ set -e -[ "x$1" = "x" -o "x$2" = x ] && { echo "usage: $(basename $0) " 1>&2; exit 1; } +{ [ "x$1" = "x" ] || [ "x$2" = x ]; } && { echo "usage: $(basename "$0") " 1>&2; exit 1; } SOURCE_URL="$1" OUTPUT_FILE="$2" -# use a fixed and high value for connection-speed to download the best quality video +# use the avimux element because my TV set does not like the output of mp4mux +# use a high value for connection-speed to download the best quality video gst-launch-1.0 \ \ - mp4mux name=mp4 fragment-duration=10 ! \ + mp4mux name=mux fragment-duration=10 ! \ filesink location="$OUTPUT_FILE" \ \ "$SOURCE_URL" ! \ hlsdemux connection-speed=4294967 ! \ - tsdemux name=ts \ + tsdemux name=demux \ \ - ts.video_0_0100 ! h264parse ! queue ! \ - mp4.video_00 \ + demux.video_0_0100 ! queue ! h264parse ! queue ! \ + mux.video_00 \ \ - ts.audio_0_0101 ! decodebin ! audioconvert ! lamemp3enc ! queue ! \ - mp4.audio_00 + demux.audio_0_0101 ! queue ! decodebin ! audioconvert ! lamemp3enc ! queue ! \ + mux.audio_00 # NOTE: the audio re-encoding is necessary because aacparse lacks some -# functionality, see: https://bugzilla.gnome.org/show_bug.cgi?id=723551 +# functionality, see: +# https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/106