Command Line 'hls_segment_size' creates TS files with segment failures

0

I am converting a simple mp4 video to hls but I need the segments to be in approximately a specific size

I researched and found:

-hls_segment_size 17000000

17000000 bytes(~17MB)

this creates TS files with approximate sizes, (does not have to be exact size)

ffmpeg.exe -i "in.mp4" -vcodec copy -acodec aac -hls_list_size 0 -hls_segment_size 17000000 -f hls "out.m3u8"

in the m3u8 file is created '#EXT-X-BYTERANGE' which is the way I want it

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8.400000,
#EXT-X-BYTERANGE:1662108@0
SampleVideo_1280x720_30mb0.ts
#EXTINF:4.560000,
#EXT-X-BYTERANGE:383896@0
SampleVideo_1280x720_30mb1.ts
#EXTINF:3.120000,
#EXT-X-BYTERANGE:408712@383896
SampleVideo_1280x720_30mb1.ts
#EXTINF:5.640000,
#EXT-X-BYTERANGE:1161840@0
SampleVideo_1280x720_30mb2.ts
#EXTINF:1.880000,
#EXT-X-BYTERANGE:230864@0
SampleVideo_1280x720_30mb3.ts
#EXTINF:2.160000,
#EXT-X-BYTERANGE:330880@230864
SampleVideo_1280x720_30mb3.ts
#EXTINF:2.080000,
#EXT-X-BYTERANGE:489928@0
SampleVideo_1280x720_30mb4.ts
#EXTINF:4.400000,
#EXT-X-BYTERANGE:1564348@489928
SampleVideo_1280x720_30mb4.ts
...

It seems all right, but it has a little problem. I'm testing on a player in the browser, and when the seconds goes from one segment to the other the video has a lock in sound and video. something very annoying, not natural in the video.

not using '-hls_segment_size' will have functional TS files, and without BYTERANGE in the m3u8 file

however the size of the TS file will be according to the seconds defined

I am currently trying to get a ts file that is close to a size set between 15MB and 20MB, and have BYTERANGE in the m3u8 file.

Does anyone have any ideas?

Phantom

Posted 2019-04-02T14:05:16.393

Reputation: 1

http://phantsc.rf.gd/AAA/Bbb.html I uploaded the files to a hosting, that's the problem I'm trying to describe – Phantom – 2019-04-02T14:40:10.340

No answers