Skip to content

Commit 3916d5b

Browse files
committed
update HLS playlist size to 6 segments and add test script to package.json
1 parent eb484c6 commit 3916d5b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"start": "node app",
77
"dev": "nodemon app",
8+
"test:hls": "k6 run test/test-hls.js",
89
"build:css": "npx tailwindcss -i ./src/input.css -o ./public/css/style.css --watch",
910
"vercel-build": "npm install",
1011
"start:pm2": "pm2 start ./bin/www --name studenttracker --env production",

utils/streamWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const ffmpeg = spawn('ffmpeg', [
1818
// HLS-specific options
1919
'-f', 'hls',
2020
'-hls_time', '2', // Short segments (2s)
21-
'-hls_list_size', '3', // Only 3 segments in the playlist
21+
'-hls_list_size', '6', // Only 6 segments in the playlist
2222
'-hls_flags', 'delete_segments+omit_endlist+discont_start', // Low-latency flags
2323
'-hls_segment_type', 'mpegts',
2424
'-hls_segment_filename', `${workerData.outputPath}/segment_%03d.ts`,

0 commit comments

Comments
 (0)