@@ -628,9 +628,11 @@ function segments_cleanup() {
628
628
echo -e " ${cyanbg} segments_cleanup: $? ${clear} "
629
629
}
630
630
631
- # just a test function for now to see how much time it takes to do all splitting in HLS mode
632
- # for all video and audio files. the master playlist is useless if you want to use it in VLC
633
- # it seems that this is exactly what we need?
631
+ # This is a test function to measure the time taken for splitting in HLS mode for all video
632
+ # and audio files. The master playlist is not useful if you want to use it in VLC.
633
+ # Therefore, I removed the last part of the master playlist to fix it.
634
+ # I haven't added language and correct naming for them yet, as it requires extensive testing
635
+ # with various files, which I haven't had time for.
634
636
function make_hls() {
635
637
echo -e " ${cyanbg} make_hls${clear} "
636
638
local counter=0
@@ -668,9 +670,14 @@ function make_hls() {
668
670
$lambda_video_copy \
669
671
$lambda_audio_copy \
670
672
-var_stream_map " $var_stream_map " \
671
- -f hls -hls_time 10 -hls_flags independent_segments \
672
- -hls_playlist 1 -hls_playlist_type vod -master_pl_name playlist.m3u8 \
673
- -hls_segment_filename " $input_filename /hls/%v/file_%04d.ts" " $input_filename /hls/%v/index.m3u8"
673
+ -force_key_frames " expr:gte(t,n_forced*$hls_duration )" \
674
+ -f hls -hls_time $hls_duration -hls_flags independent_segments \
675
+ -hls_segment_type mpegts \
676
+ -hls_playlist true -hls_playlist_type vod -master_pl_name playlist.m3u8 \
677
+ -hls_segment_filename " $input_filename /hls/%v/file_%04d.ts" \
678
+ " $input_filename /hls/%v/index.m3u8"
679
+ # removing audio stream part in the master playlist
680
+ sed -i ' /CODECS="mp4a.40.2"/,+1d' " $input_filename /hls/playlist.m3u8"
674
681
echo -e " ${cyanbg} make_hls: $? ${clear} "
675
682
}
676
683
0 commit comments