Matt Jones Tech
  • Blog
  • Video Projects
  • Web Projects
  • How to Remove a PPA via the Command Line

    How to Remove a PPA via the Command Line

    If you’ve used Linux for any amount of time, you’ve probably come across a PPA. A PPA is short for Personal Page Archive. If you’re looking for a specific piece of software not available in the official software store for your distro, you might look into adding a PPA. Most software that is offered via PPA includes the installation instructions to add their PPA and get everything installed. However, not every software includes instructions on how to remove their PPA and uninstall everything. In this tutorial, we’re gonna learn how to remove a PPA via the command line.

    Side Thoughts

    As far as I’ve heard on forums and StackOverflow and pretty much everywhere else, it’s typically not the best idea to install software using a PPA. I did it a few years ago when I was first getting into linux, but I don’t do it at all anymore. Generally speaking, PPAs aren’t the safest thing to be using and I really don’t have much need for them anymore. In fact, on of the biggest reasons I switched to Manjaro a while back was because of the massive AUR (Arch User Repository). There you can find a massive community of Arch users who have created a ton of software and configured it just for Arch. Still getting the hang of it, but so far it’s been amazing.

    Now for the Actual Tutorial

    If you happen to know the exact URL of your PPA, you can remove it by using the --remove flag:

    sudo add-apt-repository --remove ppa:otto-kesselgulasch/gimp

    Not that you’d ever remove GIMP! It’s an awesome photo manipulation program and it’s included in official software stores in most distros anyway.

    If you don’t know or can’t remember your exact PPA location, you can browse all the files in /etc/apt/sources.list.d/

    ~$ cd /etc/apt/sources.list.d/
    ~$ ls

    Once you find the PPA you wanna trash, just run:

    ~$ sudo rm nameOfThatPPA.list

    also, if you have a .save file paired with it, just trash it as well.

    ~$ sudo rm nameOfThatPPA.save

    matt

    January 5, 2020
    General Computing, Linux, Ubuntu
    linux, package manager, PPA, ubuntu, update
  • How to Install DaVinci Resolve 16.1 on Manjaro

    Method 0:

    The simplest and quickest way to get up and running with DaVinci Resolve on Manjaro is to simply open the default package manager that comes with Manjaro and searching for davinci-resolve. This will give you a few results, because Resolve comes in free and paid versions. If you want to install and use the paid version, search davinci-resolve. If you have an activation key or USB key for the paid version of Resolve, then just search for davinci-resolve-studio. Click on the package you want, click “Build”, type in your password, and you’re good to go!

    Method 1:

    This is likely the more common way to install Davinci Resolve 16.1 on Manjaro. Just head over to the official Blackmagic site to guarantee yourself the latest and greatest version of DaVinci Resolve. From there, you can register and download the latest .zip file. Once you unzip, the installation is pretty easy, just execute the file named “DaVinci_Resolve_{yourVersionNumber}_Linux.run”. That’ll launch an installation wizard that will walk you through the terms and conditions, licensing agreements, and installation process.

    The only catch with this method is that there’s a chance you might not have all the required dependencies in order to run Resolve on your machine. In order to avoid this… I’d recommend the second method.

    Method 2:

    Use the user-created AUR package. This can’t be found inside the “Add/Remove Software” program that comes with Manjaro, as it’s not an officially supported repository. However, as of the writing of this post, it’s up-to-date and appears to be pretty well maintained. To install DaVinci Resolve 16.1 on Manjaro using this method, there is one prerequisite. You’ll need a group of packages called base-devel and git. To install these, just run:

    sudo pacman -Syu base-devel git

    You’ll be prompted for your password, and pacman will automatically go and grab all the required packages you need. Once that’s done, go to the official AUR package page and find the GIT Clone URL (usually linked at near the top of the page on the left).

    Copy that link, because you’ll need it in just a second. Next, create a new folder in your home directory called Programs, and inside Programs, create a new folder called DavinciResolve. Next, open a terminal window in your newly created DavinciResolve folder, and type git clone and paste that URL you copied earlier like so:

    git clone https://aur.archlinux.org/packages/davinci-resolve/

    Once you hit enter, you’ll create a copy of the AUR repository on your machine. Inside your folder, there should be a file called PKGBUILD just for peace of mind, you can optionally run less PKGBUILD to take a look at the script, just to make sure that you’re pulling official copies of Davinci Resolve 16.1 from Blackmagic’s official website. Once you see the official URL in the code, you’re ready for the final step!

    To build and install DiVinci Resolve 16.1 on Manjaro, all you need to do now is run makepkg -si. That will begin building resolve, -s to sync your local repositories with the remote ones, and -i to install the packages once you’ve built them. And that’s it! You’re now running Davinci Resolve 16.1 on Manjaro. Have fun!

    matt

    December 11, 2019
    DaVinci Resolve, General Computing, Linux
    davinci resolve, linux, manjaro
  • A Note About Running DaVinci Resolve on Ubuntu 18.04

    A follow-up to my previous post

    Earlier this week I decided to run DaVinci Resolve on Ubuntu 18.04. This was a terrible idea. I spent the last 3 days banging my head against a wall and scouring countless forums, blogs, articles, and all for nothing. Here’s my situation. I have an AMD Threadripper with a pair of RTX 2080TIs that I was trying to use with Ubutnu and Davinci Resolve.

    Of course, if you plan to run Davinci Resolve on Ubuntu 18.04, the default Ubuntu install pretty much gives you the generic graphics drivers and it’s up to you to install the ones you need. Since I want to run Resolve, I’ll be needing the latest Nvidia drivers for Linux. Downloaded and installed from the website, but it didn’t work. Installed CUDA, but it didn’t work.

    I tried so many different drivers that they started conflicting with each other and it became an even bigger mess than what I started with. I rebooted a ton of times and sometimes the drivers would work, and other times they wouldn’t even switch from the old driver. I tried with and without CUDA and with and without OpenCL, but nothing worked. I couldn’t get anywhere beyond the opening splash page.

    TL;DR

    Guys, just save yourself the trouble. Seriously. If you’re wanting to run Davinci Resolve on Linux, but you don’t want the official CentOS build… Do yourself a huge favor, avoid the headache and just install Manjaro. Seriously. I was up and running in Davinci Resolve cutting 5K RED footage in 15 minutes. It’s the easiest Linux video workstation setup ever. I’m never going back.

    Full disclosure: I’m not being paid to write this. Opinions are my own. This is just my experience. As always, keep your passwords secure, and your sources open. Cheers.

    matt

    December 5, 2019
    DaVinci Resolve, Linux, Ubuntu
    davinci resolve, linux, manjaro, ubuntu, video editing
  • How to Fix Write Permissions For DaVinci Resolve

    Here’s how to fix write permissions for DaVinci Resolve.

    Oh snap

    To fix this, just open a terminal and run:

    chmod -R 766 /your/problem/drive/or/directory

    What’s Going On?

    On linux, security is brilliantly built in. By default, files and folders that you create have a set level of permissions (defined by the umask command). Typically, the default is the user (you) have permission to read and write files that you own, as well as search directories you own. All others have read-only access to your files and directories.

    Knowing this, other applications (aka Resolve) do not have permission by default to write to hard drives, folders, or files that you (the user) own. So how do we change this?

    chmod

    To change permissions of a single file or a whole directory, use the chmod command. chmod gives you the ability to change permissions using short, 3-digit number formats. These are known as octal numbers.

    Octal NumberPermissionsFile Listing
    7read, write, and executerwx
    6read and writerw-
    5read and executer-x
    4read onlyr–
    3write and execute-wx
    2write only-w-
    1execute only–x
    0none—

    So in the chmod command, you use the above table to define permissions for the file user/owner, members of the file group, and other people, in that order. The -R flag used in the code above, simply makes the command recursive, applying to every single file and folder inside the directory you apply the command to.

    Examples

    Readable by owner only: chmod 400 examplefile.txt

    Allow the owner and group to read, write, and execute, and anyone else to read and write: chmod 776 examplefile.txt

    Also, there’s an awesome tool for those of you, like me, who can’t keep all those chmod codes straight!

    After this post made it to Twitter, @rohit_bmd made a great point- check Davinci Resolve > Preferences and under the Media Storage tab, you’ll see a list of drives on your system. Make sure you have read/write privileges on the drive at the very top of that list, because that’s where Resolve will be storing all your cache files. Here’s the the tab:

    If you’re new to Resolve on Linux, feel free to check out my other posts.

    matt

    October 4, 2019
    DaVinci Resolve, General Computing, Linux, Ubuntu
    blackmagic design, command line, davinci resolve, file permissions, linux, terminal, video editing
  • Transcode Files for Davinci Resolve 16

    Today I learned that you only have to transcode files to import them into the free version of Resolve. If you’re rocking the full version, then this shouldn’t really apply, unless you have an absolutely crazy file format on your hands.

    Didn’t We Already Cover This?

    So this stems off a previous blog post from a while back, where I was using ffmpeg to transcode some .MTS files (from a Panasonic/Sony camcorders similar to this) for use in Resolve on Linux. The code snippets from that post were okay… But not great. The biggest problem was that after transcoding, the file size often inflated… I mean DEFINITELY inflated. FFMPEG often defaults to the highest tier of quality in a given codec if you don’t take the time to specify exactly what you want.

    ProRes

    I really struggled with this because it’s easily argued that ProRes is the codec that is literally designed to be edited. So it’s great to just cut ProRes from the start, right? And I’ve been involved in a lot of professional workflows where the first step is to convert to ProRes. Sounds like a good idea. Except when you consider file size.

    Recently, I’ve been getting lots of projects involving mass quantities of footage. Often times I’ll get 3-5 hours of footage, climbing up to 60GB for a single project. Keep doing projects like that and I’ll have to start an Amazon subscription to hard drives… So I’m not in a place where I can afford to transcode 60GB of .MTS into 240GB of ProRes.

    MPEG4

    Luckily Resolve takes codecs other than ProRes! So I experimented a bit trying to figure out how to transcode a ton of .MTS files into something that Resolve can read, but without inflating the file size to something that’s nearly unusable. After a bunch of trial and mostly error, I came up with a pretty good preset. I even saved it as a text file so I can reference it later and use it in bash scripts.

    So here it is, mostly for my own reference so I can go back here and copy it again:

    ffmpeg -i "file.MTS" -c:v mpeg4 -b:v 20M -c:a pcm_s24le /output/destination.mov

    I’ve also tested this export setting with .MOV files that came from an iPhone and didn’t play natively with Resolve. I just converted them using the snippet above, and they played back perfectly in Resolve. Plus with the variable bitrate setting, the filesizes are VERY comparable to the original sizes. Often only off by a few megabytes.

    Enjoy, and happy editing on Linux!

    matt

    September 30, 2019
    FFMPEG, Linux, Video Editing
    editing, ffmpeg, linux, resolve, transcoding, video editing
  • Locate Files using Terminal

    Let’s locate files using the terminal! This is just a cool little trick you can use if you’re doing a bunch of stuff in the terminal, and you don’t want to leave, or you’re just interested in cool terminal tricks. Let’s say you’re looking for a file, anywhere on your machine, but you don’t know exactly where it is. You can install a very cool search package called mlocate (or merging locate).

    Install

    On Ubuntu/Debian you can run:

    sudo apt-get install mlocate

    Or if you’re on that Manjaro/Arch life:

    sudo pacman -S mlocate

    Syntax

    To locate files in the terminal by using mlocate, just type:

    locate [name of the file] [directory in which you want to start recursively searching]

    If you’re using mlocate for the first time, it’s not gonna work just yet. mlocate is actually a pair of tool bundled into one. The other half of mlocate is called updatedb. So by running updatedb, you’re essentially creating/updating an index so that you can run your search. So any time you want to run a locate command and it’s not giving you the results you are expecting, there’s a good chance your index is outdated, so you can just run updatedb, then run your locate search again, and you should be good to go.

    Update your junk by running updatedb then run locate [file] to get your mind blown!

    Bonus Tip

    If the results of your locate command are crazy long, like… CRAZY long…. too long to view everything in the terminal because your terminal only has a finite history, here’s a tip: You can print the results of ANY command to a text file and save it anywhere by using >. For example:

    sudo locate myfile.txt / > ~/Desktop/searchresults.txt

    The above command will run a system-wide search for anything matching myfile.txt recursively from the root directory / and print the results to searchresults.txt on the Desktop.

    Good luck and have fun! Now that you’ve found the file you’re looking for, perhaps you want to do something cool with it! If you wanna learn more cool stuff you can do in the terminal, check this out.

    matt

    September 23, 2019
    General Computing, Linux, Ubuntu
    arch, command line, debian, linux, manjaro, search, terminal, ubuntu
  • Batch Process FFMPEG

    Batch Process FFMPEG

    An incredible use case for simple Bash scripting is the ability to batch process ffmpeg tasks. First off, I’ll assume you guys have got a basic understanding of FFMPEG, what it is, how to install and use it, that kinda thing. If not, feel free to check out the basics. FFMPEG is absolutely amazing. It can convert a chicken sandwich to ProRes. So once you’ve got the basic single-file convert down, how do you batch convert?

    Shell Scripts

    This is new for me, and I’m happy to learn new stuff. So upon a basic introduction, shell scripting looks incredibly powerful. I’m easing my way into Python because Blender is written in Python, but apparently Python is something you can integrate into shell scripts as well, so all the better!

    More good news, someone had the same issue as me, and got a pretty rad response on StackOverflow. The 2nd answer below the ‘correct’ one uses something called parameter expansion that I don’t really know a lot about. But from my limited understanding, I gather that it’s a way to take the existing filename and stick it on to the ffmpeg file export. So let’s say you have vacayFootage.avi that you want to convert to .mp4. Parameter expansion grabs the file name and sticks it onto the resulting export so you’ll get vacayFootage.mp4 without the hassle of having to name a thousand files by hand, each time you convert a file. So here’s an example of how you would batch process ffmpeg commands:

    for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done

    So like a true professional, I pasted that Stackoverflow answer into a shell script, modified the lines a bit to match my needs, and boom! It worked! I was able to convert about 500 files in just a few minutes with a single line of code… So awesome!

    So Many Possibilities…

    So with that fancy new script… and learning about how read is a cool Python command that can be used to collect user input… I’d love to write a shell script that can work for anyone. Just enter the directory where all your media is, choose your output options, select your output directory, and boom! Batch encodes for all! Gotta get on that… right after I learn Python.

    matt

    September 16, 2019
    FFMPEG, Linux, Video Editing
    bash, code, ffmpeg, file conversion, linux, python, scripting, shell
  • Switching from Windows to Manjaro Linux

    I use Adobe CC on a Windows machine for my video production pipeline at work. I do video side work on the weekends, and have used Windows and Adobe for those projects as well, but I’ve always felt trapped. Like I’m a slave to Adobe or something. I’ve spent most of my professional career learning and using software like Premiere Pro, After Effects, and Photoshop.

    Making the Switch

    I’ve used Ubuntu a TON, as it’s a super popular distro, and it was my introduction to Linux. A few months back, I was checking out https://opendata.blender.org/ and noticed that a good chunk of data was coming from a distro called Manjaro, but I’d never heard of it. Shortly after seeing all that performance data, I decided to give Manjaro a shot. After some basic research, I discovered Manjaro is actually based on Arch (unlike Ubuntu, based on Debian).

    I gotta say, installing Manjaro was a breeze (cursor theme). I will admit however, I have never known the pain of installing Arch. Like actual Arch. But I’m aware of the memes. So I’m sure it’s pretty involved. While I can’t exactly go around trolling like, “btw I use arch”, I was seriously surprised at the installation and how much was up and running right out of the box! Ubuntu is pretty straightforward, but depending on the hardware, you may need to find a few hacks or packages to get everything full up and running. For example, I couldn’t get the wifi working when I put Ubuntu on my 10 year old Macbook until I installed a special package that didn’t come with the default install.

    Everything Works.

    Immediately… Very first boot up. Everything works. Hardline network connection works. Wifi card works. GRAPHICS look great. Manjaro automatically grabs graphics drivers for you upon install! And I was actually impressed with the pre-installed software collection. Most of the time, in Ubuntu, I have to delete a bunch of crap software I’ll never use. But Manjaro… Like, I use Steam all the time. It’s pre-installed. Libre Office pre-installed. Tweaks pre-installed. Gparted pre-installed (this might be normal). But I was really surprised how little I actually had to do post-installation.

    Smooth UI Experience

    It’s a bunch of little things that add up to a massive amount of time saved. One of my pet peeves in Windows is switching apps on the task bar. If your app has multiple windows (like Blender, and a render window), you have to click once to reveal thumbnails, then click the thumbnail of the window you want. If they’re small or detailed windows like terminals, good luck. I love the single hot corner in the upper left to give you an expose-like look of all your running apps. I love the best-of-both worlds option to launch a full-screen app tray from the bottom left, or tap the drop-down xcfe-like ‘start menu’ from the upper left. It’s pretty awesome. Just gotta get used to typing pacman -S instead of apt-get

    Haven’t logged a ton of hours on Manjaro just yet, still very much in the “moving in” phase. Feeling great so far. Looking forward to diving into my brand new postproduction workflow in Manjaro using Blender, Resolve, Gimp, Inkscape, and Ardour. More on that in the coming weeks! Peace

    matt

    September 9, 2019
    Blender, Linux, Video Editing
    Blender, linux, manjaro, open source, pipeline, workflow
  • Using Mono to Run .exe Files on Linux

    Found a great game? Discover a new program? Only available on Windows? No Windows machine? Don’t want to bother dual booting? Running a virtual machine not an option? Me too! Using Mono makes all that a lot easier. Let’s talk about using mono to run .exe files on linux.

    Mono, according to their website, is an open source project sponsored by Microsoft that implements the .NET framework across other platforms like Linux and Mac OS. It’s not a program. It’s a framework. Basically a sort of language used to run files. So how exactly do you go about using mono to run .exe files on linux?

    Installation is pretty straightforward. Just install a few packages, add the PPA to your system, and run the install command. Done! Detailed instructions on how to do this can be found here.

    In my case, I use KeePass to keep track of all my passwords, but that’s a software project that’s only available as an .exe file. Luckily, you can open it and run it on any OS using Mono. Just by dropping this command:

    mono Location/Of/Your/EXE/File.exe

    The only catch here is that Mono only works for certain .exe files. This is where it gets kinda deep, but it’s essentially dependent on how that .exe file was compiled and what elements of .NET it’s using or requires to run. A bit of googling can certainly point you in the right direction, and for more information on Mono compatibility, check this out.

    Something I learned just recently: if you’re just trying to run KeePass, there’s a great chance that the package manager in your distro has some sort of KeePass equivalent, if not KeePass itself. I’ve started using Manjaro lately, and KeePass is just a one click install. Try it out!

    matt

    July 2, 2019
    Linux, Uncategorized
    development, linux, open source, software, windows
  • Blender, Linux, and R3D

    Convert with FFMPEG?

    If you’re wondering how to edit r3d on linux, you’ve come to the right place. This post is inspired by an official, yet very under-the-radar release of something called REDline Linux released back in mid 2018. As a fan of Linux as well as continuing my quest to discover a complete replacement for the Adobe Creative Cloud, I ran into this question: Can Linux handle R3D raw? After just a little bit of research, I discovered that ffmpeg can actually decode an early version of the R3D codec! The downside is, as of the writing of this article, ffmpeg isn’t capable of decoding the latest version of the R3D codec. However, this could change if someone comes along and reverse engineers the new R3D codec.

    Yet the question still remains. How can I work with RED footage and use Linux at the same time? Enter Resolve. (Opinion alert!) Blackmagic Design has positioned themselves in a way that could completely dethrone the current king of postproduction software, Adobe. Adobe makes a great suite of programs. One of the biggest advantages they have is that their software can not only ingest and work with project files from other software within the suite, but it also does this seamlessly across Mac and Windows. For example, I can save a Photoshop project on a Mac, and open that same Photoshop file inside of After Effects on Windows (and still have access to all of the Photoshop layers). The biggest disadvantages of Adobe CC is that it’s a fairly expensive monthly subscription model that doesn’t support Linux.

    Blackmagic Resolve

    Blackmagic Resolve has been the industry standard for color correction for a very long time. Recently, Blackmagic Design revamped Resolve to be able to handle much more than just color correction. In a lot of situations, Resolve can be a sort of one-stop-shop for all you postproduction needs, providing basic edits, basic audio workflow, and some basic VFX. The biggest news is that Resolve is free to download, and upgradable to the full version for a one-time purchase of $300. So after your first 6 months, you’re already saving money over the standard Adobe CC subscription.

    Anyway, point being, Resolve is quickly becoming the powerhouse one-stop solution for professional post video. Handling R3D files is as simple as importing them off your RED mini mag, opening up Resolve, and grabbing them from inside the Media Pool tab. Pretty much like using the Media Browser inside Premiere Pro. Except better.

    R3D in, TIFF out

    From there, you can make the edits you need and export to whatever format you want, even image sequences like TIFF and others. What’s more, is that you don’t have to convert your footage with FFMPEG or something similar before importing. You can just import raw R3D without a hitch. Happy editing and Blendering!

    matt

    May 21, 2019
    Lifestyle, Linux, Video Editing
    Blender, compatability, linux, postproduction, r3d, red digital cinema, sequences, vfx
Previous Page
1 2 3
Next Page

Prove all things; hold fast that which is good. 1 Thess 5:21