November 21, 2024
  • November 21, 2024

Articles Posted by Johnny Thunder

Resizing Videos With ffmpeg or avconv

by on December 6, 2018 0
In FFmpegand AvLib, filters are an invaluable tool where much of the magic happens.  The scale filter is our friend when resizing videos.  Let's look at a couple of examples:   Imagine we want a 400x300px output video: sudo ffmpeg -y -i /home/tom/sourceVid.mp4 -strict -2 -c:v libx264 -vf scale=400x300 /home/tom/myScaledVid.mp4 Note, you cannot use odd [...] Read More

Creating Screen Captures With Certain Aspect Ratio · Useful Console Script

by on December 5, 2018 0
If you're showcasing your work on a website, you very well might need to overlay screencast videos over devices.  We recommend using chrome and firefox and using the following script to get the aspect ratio just right for the recording: window.setInterval(function() { var winDims = {w:$(window).width(), h:$(window).height()}; console.log(winDims.w + "x" + winDims.h + " ... [...] Read More

Cropping and Trimming Videos w/ ffmpeg or avconv

by on December 5, 2018 0
Trimming and cropping are ways to reduce the video dimensions or length.  We'll call trimming when you want a subset of a video's time and cropping when you want a subset of the total video dimensions.  We'll also cover the case when we want to scale the cropped/trimmed video Trim Video: Take 5 seconds starting [...] Read More

How to Check if Python is Installed Linux

by on November 28, 2018 0
which is a very helpful command in linux- when we pass which a command it looks through our machine for where the application lives in our filesystem. which python Will eaither return an empty line or the path to the application on disk: /usr/bin/python Wondering Which Python Version You're On? python -V This will print [...] Read More

PHP Global Variables $GLOBALS

by on November 28, 2018 0
When you define a variable in global scope in PHP, you can sometimes have difficulty acccessing the variable from within another function call, if not explicity passe. Luckily, in PHP, the $GLOBALS variable holds all of our globally defined variables: $myVar = 123; myFunction(); function myFunction() { echo $GLOBALS["myVar"]; //123 } That said, the usual [...] Read More