Fedalovich
Fedalovich

Reputation: 11

ffmpeg convert h265 raw stream into hls playlist

I have a raw h265 video file. I'm trying to convert it to a hls m3u8 playlist. It's a large file (~2GB), So I try to segment it into small .ts files so my player can already start playing it.

I do it in 2 steps:

ffmpeg -i video.h265 -c copy video.mp4
ffmpeg -i video.mp4 -c:v copy -start_number 0 -hls_time 5 -hls_list_size 0 -hls_playlist_type event -f hls index.m3u8

The Problem is I get only one .ts which is still very large (same size) which is to heavy for the player to start playing quick.

If re-transcode it to h265 again it splits it into several .ts files, but I think there is no need to transcode as it already in h265 format.

Upvotes: 1

Views: 2255

Answers (1)

GeorgeZhou
GeorgeZhou

Reputation: 21

try add "-hls_flags split_by_time"

Upvotes: 2

Related Questions