All Projects → majamee → alpine-dash-hls

majamee / alpine-dash-hls

Licence: MIT license
A ready-prepared video transcoding pipeline to create DASH/ HLS compatible video files & playlists

Programming Languages

shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to alpine-dash-hls

Nginx Vod Module
NGINX-based MP4 Repackager
Stars: ✭ 1,378 (+3104.65%)
Mutual labels:  hls, dash
Php Ffmpeg Video Streaming
📼 Package media content for online streaming(DASH and HLS) using FFmpeg
Stars: ✭ 246 (+472.09%)
Mutual labels:  hls, dash
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (+4383.72%)
Mutual labels:  hls, dash
Abr Broadcaster
A real time encoder for Adaptive Bitrate Broadcast
Stars: ✭ 80 (+86.05%)
Mutual labels:  hls, dash
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+28234.88%)
Mutual labels:  hls, dash
Mediaelement Files
Sample media files (MP4, WebM, Ogv, MP3, etc.) for the MediaElement.js library
Stars: ✭ 92 (+113.95%)
Mutual labels:  hls, dash
Rtmp Ts Dash Webrtc
👾 音视频解决方案 Audio and video solutions(AV1)
Stars: ✭ 129 (+200%)
Mutual labels:  hls, dash
Mediaelement
HTML5 <audio> or <video> player with support for MP4, WebM, and MP3 as well as HLS, Dash, YouTube, Facebook, SoundCloud and others with a common HTML5 MediaElement API, enabling a consistent UI in all browsers.
Stars: ✭ 7,767 (+17962.79%)
Mutual labels:  hls, dash
Docker Streaming Server
Live streaming server
Stars: ✭ 141 (+227.91%)
Mutual labels:  hls, dash
Dplayer
🍭 Wow, such a lovely HTML5 danmaku video player
Stars: ✭ 12,101 (+28041.86%)
Mutual labels:  hls, dash
Nexplayer unity plugin
Stream videos in HLS & DASH with Widevine DRM using NexPlayer Video Streaming Player SDK for Unity on Android & iOS devices
Stars: ✭ 73 (+69.77%)
Mutual labels:  hls, dash
Shaka Player Embedded
Shaka Player in a C++ Framework
Stars: ✭ 153 (+255.81%)
Mutual labels:  hls, dash
Indigo Player
Highly extensible, modern, JavaScript video player. Handles MPEG-Dash / HLS / MPEG-4 and is built on top of the HTML5 video element.
Stars: ✭ 1,173 (+2627.91%)
Mutual labels:  hls, dash
Magicalexoplayer
The Easiest Way To Play/Stream Video And Audio Using Google ExoPlayer In Your Android Application
Stars: ✭ 171 (+297.67%)
Mutual labels:  hls, dash
Manifest
Video Manifest Parsers and Generators, supporting multiple formats such as HLS and DASH
Stars: ✭ 44 (+2.33%)
Mutual labels:  hls, dash
Raspilive
📷 Stream video from the Raspberry Pi Camera Module to the web
Stars: ✭ 120 (+179.07%)
Mutual labels:  hls, dash
P2p Media Loader
An open-source engine for P2P streaming of live and on demand video directly in a web browser HTML page
Stars: ✭ 822 (+1811.63%)
Mutual labels:  hls, dash
Video.js
Video.js - open source HTML5 & Flash video player
Stars: ✭ 32,478 (+75430.23%)
Mutual labels:  hls, dash
Html5 Dash Hls Rtmp
🌻 HTML5播放器、M3U8直播/点播、RTMP直播、低延迟、推流/播流地址鉴权
Stars: ✭ 1,805 (+4097.67%)
Mutual labels:  hls, dash
Ott Packager
OTT/ABR streaming encoder (H264/HEVC) and packager for DASH and HLS
Stars: ✭ 148 (+244.19%)
Mutual labels:  hls, dash

Alpine Dash HLS Logo

Docker Image CI | | Github Repo Stars

Alpine Dash HLS

A ready-prepared video transcoding pipeline to create DASH/ HLS compatible video files & playlists.

Recommended usage via Docker Docker Desktop & Docker Hub.

Simplified usage (run in shell/ terminal/ cmd)

Prerequisite: Docker needs to be installed and running.

docker pull majamee/alpine-dash-hls
docker run -v /absolute/path/to/video/:/video majamee/alpine-dash-hls name_of_my_video_file.ext

Please just replace in the command above the absolute path to your video file folder and the full file name of your video file to be converted. You can also use tags like majamee/alpine-dash-hls:edge (e.g. uses alpine's edge version as base).

There is also a parameter --transcode-only which you can append to the docker run command, in order to skip the html and image file output. Example:

docker pull majamee/alpine-dash-hls
docker run -v /absolute/path/to/video/:/video majamee/alpine-dash-hls name_of_my_video_file.ext --transcode-only

Examplary toolchain usage

(Based on work of squidpickles)

Just use Kitematic to open the shared folder, place your video file in there, replace "input.mkv" in the commands below by your input video file (without "") and execute the shell commands subsequent into the Docker container.

# 1080p@CRF22
ffmpeg -y -threads 0 -i "input.mkv" -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -profile:v high -level 4.0 -vf "scale=min'(1920,iw)':-4" -crf 22 -movflags faststart -write_tmcd 0 intermed_1080p.mp4
# 720p@CRF22
ffmpeg -y -threads 0 -i "input.mkv" -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -profile:v high -level 4.0 -vf "scale=min'(1280,iw)':-4" -crf 22 -movflags faststart -write_tmcd 0 intermed_720p.mp4
# 480p@CRF22
ffmpeg -y -threads 0 -i "input.mkv" -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -profile:v high -level 4.0 -vf "scale=min'(720,iw)':-4" -crf 22 -movflags faststart -write_tmcd 0 intermed_480p.mp4
# 128k AAC audio only
ffmpeg -y -threads 0 -i "input.mkv" -vn -c:a aac -b:a 128k audio_128k.m4a

# Create MPEG-DASH files (segments & mpd-playlist)
MP4Box -dash 2000 -rap -frag-rap -url-template -dash-profile onDemand -segment-name 'segment_$RepresentationID$' -out playlist.mpd intermed_1080p.mp4 intermed_720p.mp4 intermed_480p.mp4 audio_128k.m4a

# Create HLS playlists for each quality level
ffmpeg -y -threads 0 -i intermed_1080p.mp4 -i audio_128k.m4a -map 0:v:0 -map 1:a:0 -shortest -acodec copy -vcodec copy -hls_time 2 -hls_list_size 0 -hls_flags single_file segment_1.m3u8
ffmpeg -y -threads 0 -i intermed_720p.mp4 -i audio_128k.m4a -map 0:v:0 -map 1:a:0 -shortest -acodec copy -vcodec copy -hls_time 2 -hls_list_size 0 -hls_flags single_file segment_2.m3u8
ffmpeg -y -threads 0 -i intermed_480p.mp4 -i audio_128k.m4a -map 0:v:0 -map 1:a:0 -shortest -acodec copy -vcodec copy -hls_time 2 -hls_list_size 0 -hls_flags single_file segment_3.m3u8
ffmpeg -y -threads 0 -i audio_128k.m4a -acodec copy -vcodec copy -hls_time 2 -hls_list_size 0 -hls_flags single_file segment_4.m3u8

# Transform MPD-Master-Playlist to M3U8-Master-Playlist
xsltproc --stringparam run_id "segment" /app/mpd-to-m3u8/mpd_to_hls.xsl playlist.mpd > playlist.m3u8

I am glad to receive any improvement ideas about this "any video to DASH/ HLS" pipeline. Especially if someone has any input on integrating better Apple's support of fragemented mp4 (fmp4) files in this pipeline.

Suggestions welcome. :)

General hints for hosting the files (to test streaming)

  • Video and playlist files should be hosted best via HTTPS
  • DASH requires the .mpd playlist to be set as Content-Type: application/dash+xml
  • No specific streaming server is required, but your hosting should have progressive downloading enabled
  • If using a different domain name for the video files compared to the page where the player is hosted CORS headers need to be set

Tools to test the generated files for streaming

Features

  • Supported devices: iOS (Chrome/ Firefox/ Safari), Android (Chrome/ Firefox), Mac (Chrome/ Firefox/ Safari), Windows (Chrome/ Firefox/ EDGE)
  • Creates DASH (VOD) compatible files (including Safari on Mac)
  • Creates HLS files for compatibility with Safari on iOS
  • Optimizes video files for web playback (moov atom)
  • Compresses videos using H.264@CRF22 (for best compatibility)
  • Compresses audio using AAC@128k (for DASH as separate track to save data)
  • Creates automatically 3 quality levels (Full HD/ HD/ DVD quality)
  • Fragments video files in 2 second windows to allow dynamic quality switching based on available bandwidth
  • Creates master MPD-Playlist which connects everything (MPEG-DASH)
  • Creates master M3U8-Playlist for HLS
  • Creates all output files neatly stored in a sub-folder matching the video file name in the folder output next to the transcoded video file
  • Adds also HTML and .htaccess file including code ready for inclusion into the own website for playback next to all other created files
  • Generates and sets Poster image (from second 3 of the input video file)
  • Generates and includes video preview thumbnails (currently only natively supported by Fluid Player via WebVTT)
  • Video preview support thumbnail support added for Video.js via videojs-vtt-thumbnails
  • Included fallback player (fluid-player.html) is based on the great work of the devs at Fluid Player
  • Included second fallback player (plyr.html) is based on the great work of the devs at Plyr
  • Included third fallback player (videogular.html) is based on the great work of the devs at Videogular
  • Included player (index.html) is based on the great work of the guys at Video.js

Tip

For creating DASH/ HLS compatible files for multiple videos in a single run, please have a look at:

Demo

https://majamee.de/demos

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].