
- #Wordpress videojs resolution switcher master install
- #Wordpress videojs resolution switcher master code
hls_playlist_type vod -b:v 5000k -maxrate 5350k \ crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 \ vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease \ crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 2800k -maxrate 2996k \ vf scale=w=1280:h=720:force_original_aspect_ratio=decrease \ crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k \ vf scale=w=842:h=480:force_original_aspect_ratio=decrease \ crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 800k -maxrate 856k \ This command will create 4 versions of the video along with a playlist for each: We can create multiple renditions and let the player decide what’s the best one to play at any given time of the playback. You will definitely want more than one to acommoadte both your low-end, low-bandwidth users as well as those who are watching in the latest 4k iMac on fiber connections. HLS Creation: Multiple Renditions And Master PlaylistĪll the work we did in the previous section was for one rendition.

The playlist for the video looks like this: #EXTM3U In this case, it produced 34 segments for the video I chose One or more transport stream segments with a.
#Wordpress videojs resolution switcher master code
Running the code above will produce a set of files:


# Create the directory to store the files

HLS works with Transport Stream segments and has much tighter control over the characteristics of the streams (or renditions in HLS parlance).Įncoding a single rendition of your video looks like this for an H264 product. It provides a lot of tools and supports the creation of the necessary files out of the box. We will use FFMPEG command line tool to create the HLS video. HLS works differently than DASH with different formats and parameters. I’m also banking on the fact that H264 has better support in both Apple and non-Apple devices. The technologies to implement HEVC in HLS is significantly different than what we discuss here so I’ll probably do a separate post on it rather than confuse matters. player.At WWDC 2017, Apple announced support for HEVC (H265), letting you work with both types of streams in the same playlist. This behavior can be changed if customSourcePicker is passed.ĬustomSourcePicker must return player object. If there is more than one source with the same label, player will choose source automatically. Player.currentResolution('SD') // returns videojs player object Add dynamically sources via updateSrc method
#Wordpress videojs resolution switcher master install
Or bower bower install videojs-resolution-switcher Working examples of the plugin you can check out if you're having trouble. Resolution switcher for video.js v5 Example
