Samuel East

CTO at S3Bubble OTT Media Streaming

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 -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)); });