When multiple transcodes are run at once, the monitor outputs when a bitrate finishes it's transcode process.
Expected output is
ffmpeg command found.... continuing
Generating HLS segments for bitrate 28k - this may take some time
Generating HLS segments for bitrate 36k - this may take some time
All transcoding processes started, awaiting completion
Encoding for bitrate 28k completed
Encoding for bitrate 36k completed
Actual output is
ffmpeg command found.... continuing
Generating HLS segments for bitrate 28k - this may take some time
Generating HLS segments for bitrate 36k - this may take some time
All transcoding processes started, awaiting completion
Encoding for bitrate 28k completed
Encoding for bitrate k completed
Marked as trivial as there's no impact on the actual work being completed
Activity
2015-12-14 16:30:18
2016-02-09 09:33:40
Taking a quick scan over, I think the user is correct. Have asked them if they want to create a pull, otherwise will look at reversing the order myself
2016-05-18 07:08:15
2016-05-18 07:17:26
Webhook User-Agent
View Commit
2016-05-18 07:18:08
It's a temporary workaround really, as it assumes bitrates will be provided in ascending order. Rather than sorting them it makes more sense to look at where the array is being emptied and fixing the issue there.
2016-05-18 07:18:26
2016-05-18 07:28:04
2016-05-18 07:52:03
So, in principle it should have been able to pull the Bitrate there...
But, breaking that down to specific array keys
When we unset the PID the first element is completely removed, whereas for BITRATE_PROCESSES it's simply set to a null value.
Which would be because Line 182 (https://github.com/bentasker/HLS-Stream-Creator/blob/2711edfdc43678aa134523050a76690260f7f550/HLS-Stream-Creator.sh#L182) strips any nulls from PIDS, but no such action is performed against the BR array
Inserting the following on line 183 resolves for most cases
There should be no race caused by doing it this way - if two processes finish in the same second then their array keys won't change until all of the pids have been checked.
2016-05-18 07:55:28
Webhook User-Agent
View Commit
2016-05-18 07:55:29
Webhook User-Agent
View Commit
2016-05-18 07:55:39
2016-05-18 07:56:08
2016-05-18 07:56:17
2016-05-18 07:56:17
2016-05-18 07:56:20