3 # example pipeline to download HSL streams from raiplay.it
7 { [ "x$1" = "x" ] || [ "x$2" = x ]; } && { echo "usage: $(basename "$0") <source_m3u8_url> <output_file>" 1>&2; exit 1; }
12 # use the avimux element because my TV set does not like the output of mp4mux
13 # use a high value for connection-speed to download the best quality video
16 mp4mux name=mux fragment-duration=10 ! \
17 filesink location="$OUTPUT_FILE" \
20 hlsdemux connection-speed=4294967 ! \
23 demux.video_0_0100 ! queue ! h264parse ! queue ! \
26 demux.audio_0_0101 ! queue ! decodebin ! audioconvert ! lamemp3enc ! queue ! \
29 # NOTE: the audio re-encoding is necessary because aacparse lacks some
31 # https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/106