Fragmented fMP4 HLS/M3U8 encoding and streaming

Available for AVS script versions 6-7 and Clipshare 8-9

What is fragmented fMP4?

In 2016 at WWDC, Apple announced support for fragmented MP4 (fMP4) as an alternative to MPEG-TS, a small step for Apple but a huge step for video streaming services.

HLS fragmented MP4 usage reduces the storage footprint of your encoded content up tp 20%; it's also much easier and faster to transport fMP4 files between servers. Fragmented MP4 files are also compatible with MPEG-DASH - an alternative to HLS - so you can use the same files; only the manifest file (playlist) is different.
HLS now also supports offline playback which can be used to persist videos on the user device that can be watched later when no internet connection is available, e.g., in the airplane, train, car, etc.

What is HLS?

HTTP Live Streaming (HLS) is a versatile, modern standard for adaptive bitrate video streaming on desktop and on mobile devices thanks to its native support on iOS and Android.
To distribute to HLS clients, video source is encoded at different data rates and divided into short chunk files (.ts format), usually between 5-10 seconds long. These are loaded onto an HTTP server along with a text-based manifest file with a .M3U8 extension that directs the player to additional manifest files for each of the encoded streams.
The player reads the main index m3u8 playlist file, determines which quality video is ideal for the viewer's connection and device, and then reads the quality-specific m3u8 index file to load and play appropriate video chunk.
Player can dynamically request the best quality available for specific client's bandwidth at any given moment. The entire process is seamless for the user. Buffering, lags and delays are avoided. Using HLS, you make sure that your videos quickly reach your users and adapt to suit their platforms and devices. Player automatically adjust quality available to player dimensions or browser's window size. On small phone device in portrait mode, the player starts usually from lowet quality (resolution, eg. 240p, if only such quality is available. On desktop browser the quality (resolution) most often starts from some mid available quality and requests higher resolution in fullscreen mode.

Demo

Check fragmented fMP4 HLS video playback using player by Nuevolab.


Cross device support

HLS streaming is supported by a wide range of desktop modern borwers, iOS and Android. However there are still several limitations in use of HLS streaming and popular features.

Chrome - Supported since Chrome version 30+
Firefox - Supported since Firefox version 42+
Internet Explorer 10+ - Supported since IE 11 (Windows 8+ only)
Microsoft Edge
Safari - Supported since Safari version 8+
Opera - Supported since Opera version 15+

Android - Supported on Chrome and Firefox for Android 4.0+
IOS - Supported on iOS 3+
Windows Phone - Supported on Windows Phone 8+
  1. HTML5 streaming may not work on older devices/browsers. For example it does not work under IE 11 on Windows 7. Fortunately using player by Nuevolab you can setup fallback standard MP4 video to play when HLS is not supported by browser.
  2. Native HLS streaming does not allow to switch between video qualities manually on mobile devices. For this reason our player use HLS javascript library on Android devices. Unfortunatley iOS based devices do not have such support, however main HLS adavantage to adjust video resolution is fully respected.

HLS/M3U8 Encoding for AVS/Clipshare

This is pretty advanced part of script which allows to encode video into h264 fMP4 file in multiple resolution variants, create main and multiple variants M3U8 playlists.
The range of available resolutions is wide and includes: 144p, 240p, 360p 480p 720p, 1080p, 1440p and 4K. For each resolution you can enable/disable it, set CRF constant factor, maximum video and audio bitrate. Additionally you can enable/disable option to encode fallback standard mp4 video.
Encoded m3u8 playlists and fmp4 video files use custom unique filename and is stored in separate folder inside existing h264 directory.
It's easy to guess that hotlinking m3u8 and fMP4 videos is impossible, and downloading it is much more difficult. Our script supports fully transfer to remote server(s), same like it is for standard mp4 video files.
Streaming from other than production server requires CORS enabled on server that HLS files are located. Yiou need to enable CORS on remote server, or ask support about CORS if this is some CDN service. More about CORS and enabling it on server you can read on enable-cors.org. In our tutorial we provide more information about it, including CORS enable examples for Apache and Nginx servers.

The script comes also with advanced watermarking code, which allows to watermark video from text or png image in multiple available positions.
You can even increase/decrease offset position from video edge for each watermark position. For text watermark you can adjust text font, color and shadow. There is also completely new option to scroll any watermark text in the middle time position of video from right to left. Certainly you've alaready seen such scrolling text "This video was uploaded to...."
For most FFMPEG compilations you can scroll only LATIN characters. To support other characters FFMPEG must be configured and compiled with --enable-libfribidi.
Watermark from .png image is automatically scaled to each available video resolution. There is even option to define multiple .png images to use for each available resolution and reach best looking, sharp watermark on video.


Our HLS/M3U8 encoding script works well with Standard and SuperQueue modifications by Nuevolab.

Player to stream HLS for AVS/Clipshare

Of course you need advanced player to stream your HLS video across maximum number of devices and browsers used today. For this reason fMP4 HLS script is offered with Videojs player modified and enhanced by Nuevolab.
The player is already configured to play HLS stream for your script. It supports some advanced options that you won't find in any other player, like automated swicth between native and programmed HLS streaming depending on device and video content, beautiful HLS quality selection with super smooth effect. Offered player is the most extennded version, which includes 6 premium skins, Pic2Pic plugin, VAST ads support and many more goodies. The standard price for such player is € 47.00 so you save € 19.00 when buying it with our HLS/M3U8 encoding script. If you already purchased our player, you must be sure you have the latest version and upgrade in case if it is required.
If you decide to purchase HLS/M3U8 encoding script without our player, we will not be able to help you with setup of other player setup for new type of streaming.

We strongly suggest to read all information provided above about HLS/M3U8 encoding and streaming and preview demos included. Still there are many webmasters who heard about M3U8 format and this ends their experience with HLS encoding and streaming.
M3U8/HLS encoding, adaptive streaming method in video script has several limits and requirements, and you should not bother with it until you do not realize it enough.
HLS streaming is not faster than MP4 streaming. The main advantage is that video resolution is adopted to player/window size and to client's bandwidth at any given moment. This usually allows to save bandwidth and is much more useful for website/service users.
More important HLS encoding and streaming rules that you should know have been described on our forum.


1. If you store video files on other than production server, you must be sure that both: production server and remote server where video files are stores use same protocol, http or https.
2. Remote server where you store video files must have CORS enabled.
For more details check https://enable-cors.org


Order

Available for AVS versions 6 and 7 or Clipshare versions 8 and 9

Includes advanced encoding modules and and watermark system. € 49.00

Videojs version with Nuevo plugin v.4.x (single domain license) € 30.00
Remember: default AVS/Clipshare player cannot play HLS stream.

Optional installation service € 25.00



Each Nuevolab modification is tested and verified, available to review on live example website. For each modification we include detailed installation tutorial in html format. Tutorial concerns script's default code. For each modification we also offer installation service which price is minimum € 10.00. Once product delivered to buyer it cannot be a matter of chargeback request or PayPal dispute. Nuevolab free support cannot concern self installation, as it is not possible to guess how script was installed and what possible website code can be or server setup is.
Nuevolab reserves maximum 24 hours (usually much faster) to deliver ordered products.