Categories
Video

FFmpeg tips: Quickly cut video clips or extract audio

You can make quick work of trimming videos or capturing just the audio with FFmpeg and a Chromebook.

(This is another post on using a Chromebook as a video tool for journalists. Previously, we have shown how to Create video slideshows with ImageMagick and FFmpeg in minutes and how to use FFmpeg with Google Earth. And we have shown how to get a video from the internet with youtube-dl. )

We’re using the terminal window of Linux on the Chromebook. There is a Windows version of FFmpeg and you could install Linux on your Windows 10 computer.

Often, you just need a small segment, or clip, from a video. FFmpeg makes this super fast with this command:

ffmpeg -i source-video-file-name -ss 1:27 -to 3:02 
-c:v copy -c:a copy output-file-name

This command begins copying at the 1:27 minute mark and stop at the 3:02 minute mark. If you want to copy to the end, you can omit the “-to endtime.”

If you want get just audio from a video, you can use this command:

ffmpeg -i input-file-name -f mp3 -ab 192000 -vn output-audio.mp3

Again, this is very fast. I liked to get the audio of Zoom meeting videos and then upload just the audio file into a speech-to-text tool like Otter.ai. Just uploading the audio is faster than uploading the whole video file to Otter.

If you need to remove the audio from a video file, here’s your command:

ffmpeg -i input-file-name -c copy -an output-file-name

If you want info on the video and audio in the file, use this command:

ffprobe -v error -show_format -show_streams input-file-name

It can get a lot more complicated real quick, but the above are typical use cases. The FFmpeg sub-Reddit is a good place to find help.

Categories
Ramblings

Chromebooks just got a lot more interesting

My desk with the Pixelbook connected to a KVM switcher with a PC mouse, keyboard and 26 inch monitor. I can switch from a Windows 10 desktop to the Pixelbook.

I’ve been using a Pixelbook for several months now. I thought it was a more versatile, powerful alternative to a high end iPad. And that, for the most part, has been true. 

I have a number of Android and Chrome apps from Netflix to a browser-based SSH client. The variances from a PC keyboard took a bit of getting used to, but it works as a laptop and tablet and can stand up to watch movies.

I don’t have the pen; the consensus seems to be you don’t need it. I haven’t used Google Assistant much but then again, I don’t use Cortana much either. I did get a USB-C hub.

I got a KVM switch so I have it connected to a PC keyboard and mouse and a 26 inch monitor.

I’ve been able to mount network shares on my NAS, SSH to Amazon servers, connect to a Windows 10 machine with Chrome Remote Desktop.

I’ve stuck with the “stable channel” for upgrades and never put it in developer mode because I want the security features and simplicity. 

So I didn’t try Crostini until it hit the latest stable OS release 69.

Project Crostini is a Linux container that allows Linux apps to be installed on the Chromebook like the popular Gimp image editor. You also get a Linux terminal window where you can do what you do at the Linux command line.

The ability to use it as a “Linux box” opens a whole new realm of possibilities not already solved by the Chrome browser, built-in apps and file manager, Google Drive and Google Suite, and Android apps.

It’s an incredibly powerful laptop weighing 2.4 pounds with not a lot of RAM or memory (in my case 8 gigs of RAM with a 256 gig solid drive).

It’s also usable offline, but definitely limited (but what computer isn’t these days?).

Chromebooks have come along way from just about the cheapest computer you could buy, good for surfing and email.