Answer the question
In order to leave comments, you need to log in
Why are the last 5 fragments of teesok (TS) recorded when converting video to HLS to an M3U8 file?
Hello.
I have a problem when converting videos longer than 15 seconds.
The conversion to HLS is fine and there are enough fragments to play the video.
But only the last 5 video fragments are indicated in the index.m3u8 file. It looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:682
#EXTINF:5.800000,
1-360-682.ts
#EXTINF:3.560000,
1-360-683.ts
#EXTINF:1.800000,
1-360-684.ts
#EXTINF:3.800000,
1-360-685.ts
#EXTINF:3.840000,
1-360-686.ts
#EXT-X-ENDLIST
system("ffmpeg -i #{@file.path}
-map 0:v:0 -map 0:a:0
-vcodec libx264 -pix_fmt yuv420p -vsync 1 -async 1 -color_primaries 1 -color_trc 1 -colorspace 1 -s 640x360 -crf 20
-preset medium -profile:v high -level 3.1 -maxrate 800k -bufsize 1200k -ab 128k
-movflags +faststart -hls_time 2 -strict -2
#{store_dir}#{@model.id}-360-.m3u8")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question