########################################################################################## HLS-11: Document Environment Variables ########################################################################################## Issue Type: Task ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Open Resolution: Unresolved Project: HLS Stream Creator (HLS) Reported By: btasker Assigned To: btasker Targeted for fix in version: - VNEXT Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== There are now quite a few variables used within the script, many of which can be set prior to running it in order to avoid needing to pass command line options (allowing use of wrapper scripts). It's probably worth creating a Markdown file containing a list of these and what they do/default to for easy reference (it'll also ensure that there aren't any which can _only_ be set using an option). ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2017-04-29 12:19:54 btasker ----------------------------------------------------------------------------------------- The current set of variables that are honoured is -- BEGIN SNIPPET -- # Basic config OUTPUT_DIRECTORY=${OUTPUT_DIRECTORY:-'./output'} # Change this if you want to specify a path to use a specific version of FFMPeg FFMPEG=${FFMPEG:-'ffmpeg'} # Number of threads which will be used for transcoding. With newer FFMPEGs and x264 # encoders "0" means "optimal". This is normally the number of CPU cores. NUMTHREADS=${NUMTHREADS:-"0"} # Video codec for the output video. Will be used as an value for the -vcodec argument VIDEO_CODEC=${VIDEO_CODEC:-"libx264"} # Audio codec for the output video. Will be used as an value for the -acodec argument AUDIO_CODEC=${AUDIO_CODEC:-"aac"} # Additional flags for ffmpeg FFMPEG_FLAGS=${FFMPEG_FLAGS:-""} # If the input is a live stream (i.e. linear video) this should be 1 LIVE_STREAM=${LIVE_STREAM:-0} # Video bitrates to use in output (comma seperated list if you want to create an adaptive stream.) # leave null to use the input bitrate OP_BITRATES=${OP_BITRATES:-''} # Determines whether the processing for adaptive streams should run sequentially or not NO_FORK=${NO_FORK:-0} # ... snip TMPDIR=${TMPDIR:-"/tmp"} -- END SNIPPET -- Some of which have corresponding flags -- BEGIN SNIPPET -- Usage: HLS-Stream-Creator.sh -[lf] [-c segmentcount] -i [inputfile] -s [segmentlength(seconds)] -o [outputdir] -b [bitrates] [-p filename] -i Input file -s Segment length (seconds) -o Output directory (default: ./output) -l Input is a live stream -c Number of segments to include in playlist (live streams only) - 0 is no limit -b Output video Bitrates (comma seperated list for adaptive streams) -f Foreground encoding only (don't fork the encoding processes into the background - adaptive non-live streams only) -p Playlist filename -t Segment filename prefix -S Segment directory name (default none) -e Encrypt the HLS segments (default none) -2 2-pass encoding -q Quality (changes to CRF) -C Constant Bit Rate (CBR as opposed to AVB) -- END SNIPPET -- The FFMPEG specific ones are already well documented in the README, so will just need to add some info for each of the others ----------------------------------------------------------------------------------------- 2019-11-23 12:09:15 ----------------------------------------------------------------------------------------- btasker added 'VNEXT' to Fix Version ----------------------------------------------------------------------------------------- 2019-11-23 12:09:15 ----------------------------------------------------------------------------------------- btasker removed '1.0' from Fix Version