Blog

Switching To Githubs New Personal Access Token Authentication

Git has recently announced that at the beginning August 13, 2021, they will no longer accept account passwords when authenticating Git operations on GitHub.com. Panic sets in!!!!!! Don't panic its pretty easy. You can read up about the updates here. https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ I needed to setup a new repo and had...

VideoJS Dash & HLS Bitrate Representation Switching

Building many plugins for VideoJS I have a bitrate switching plugin that has been used extensively. The plugin mainly focused on HLS representations and I was accessing the representations with the following code. var player = videojs('my_video_1'); player.one('loadedmetadata', function(_event) { var reps = player.vhs.representations(); console.log(reps); }); I then looped through...

How To Debug Your Cronjobs

Recently I needed to debug a cronjob I have setup. It is not as easy as just running the job sometimes you need to know exactly where the error is coming from. I find this the easiest way by far to find out what going on. Create a cronjob time...

FFmpeg Scaling & Croping

Scale a landscape video to portrait and apply padding top and bottom maintaining aspect ratio ffmpeg -i joe-bell-trailer-1_h1080p.mov -vf "scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2,setsar=1" news.mp4

How To Get The Width & Height Of VideoJS Player Using getComputedStyle()

Just a quick blog post this is useful when developing VideoJS plugins and it is not widely documented so posting here. var player = videojs('my_video_1', { crossOrigin: 'anonymous', inactivityTimeout: 0 }, function() { // With pixels console.log('width', getComputedStyle(player.el()).width); console.log('height', getComputedStyle(player.el()).height); // Without pixels console.log('width', parseInt(getComputedStyle(player.el()).width)); console.log('height', parseInt(getComputedStyle(player.el()).height)); });