bentasker / HLS-Stream-Creator

Simple Bash Script to take a media file, segment it and create an M3U8 playlist for serving using HLS
BSD 3-Clause "New" or "Revised" License
273 stars 101 forks source link

line 230: * 1000 : syntax error: operand expected (error token is "* 1000 #40

Closed wobeng closed 3 years ago

wobeng commented 3 years ago

First, thank you for this script. It is very helpful

I'm getting the error below for some video. Is there anything I can do


COMMAND ==> bash /tmp/y-batch/jobs/encode/HLS-Stream-Creator.sh -i /tmp/ca-develop-cdn-private-caseactive/2cd35405-d7ab-48f7-8d28-c5ebab93d2a1.mp4 -s 10 -b  -o /tmp/2cd35405-d7ab-48f7-8d28-c5ebab93d2a1

ffmpeg command found.... continuing

Creating ./output

/tmp/y-batch/jobs/encode/HLS-Stream-Creator.sh: line 230: * 1000 : syntax error: operand expected (error token is "* 1000 ")
bentasker commented 3 years ago

Hi,

You've an error in your syntax (though really we should pick up on that and alert on it rather than continuing and failing)

You've got

HLS-Stream-Creator.sh ... -b  -o /tmp....

The argument -b expects an argument - the bitrate(s) to use. For example

HLS-Stream-Creator.sh ... -b 4096,8192  -o /tmp

To generate 4Mbps and 8Mbps presentations.

If you want to create a stream using the input bitrate, just omit -b entirely

wobeng commented 3 years ago

Thank you :)