Skip to content
프로젝트

소개

Prepare a video to be streamed with HLS

창작 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

video2hls

A simple tool to convert a video to a set of files to play it using HLS. HLS is an adaptive bitrate streaming protocol: the video is sliced in small chunks and made available at a variety of different bit rates. Depending on current network conditions, the player automatically selects the appropriate bitrate to download the next segment.

The script needs Python 3.10 and you can run it with --help to get more information about it. If Babel is installed, an audio track without a title is named after its language, written in this language (fr becomes français).

Some browsers may not support natively HLS. In this case, one can use hls.js to get appropriate support. Many video players also support this format. See this blog post for more information.

Examples

Convert using default parameters (MPEG2-TS with many resolutions):

./video2hls TearsOfSteel.mp4

Add an overlay to distinguish the different resolutions:

./video2hls --mp4-overlay '{resolution}p, progressive' --video-overlay '{resolution}p, HLS' \
   TearsOfSteel.mp4

Use fragmented MP4 (supported only from iOS 10, see the list of supported devices):

./video2hls --hls-type fmp4 TearsOfSteel.mp4

Specify more bitrates:

./video2hls --video-bitrates 8000 4000 2000 1000 \
            --video-widths 1920 1920 1280 854 \
            --video-names '1080p high' '1080p low'
   TearsOfSteel.mp4

When using --debug, you'll get a detailed explanation of the executed commands (and you can copy/paste them):

./video2hls --debug TearsOfSteel.mp4

관련 프로젝트 살펴보기

불러오는 중…