One-Click Resize Videos for Discord using ffmpeg

Share videos by dropping them into Discord, like any other file

If you use Discord, you probably know that you can share photos, just by dragging them into a channel or private message. This actually works for any file. You can attach documents, music, and even videos.

As of about a year ago, some video formats will even be embedded, meaning that the video can be viewed from within Discord, without downloading the file and without opening a browser or external program.

While the upload limit for attachments is 8MB, Discord Nitro users enjoy a much roomier 50MB limit. This limit is very well suited for smaller videos, such as game clips generated by GeForce Experience or That said, these tools are designed around creating high-quality video while adding minimum stress on the computer during a video game. As a result, the video files that these tools create are abnormally large for their length.  For example, at the “Medium” quality preset, GeForce Experience creates a file 60-80MB in size for a 30 second 1080p clip.

While there are plenty of video transcode tools, like Handbrake, that can handle videos in a batch format, I wanted to have a way to click any relatively short (2 minutes or less) video, and have it instantly transcoded to a format that Discord will embed, in a size that meets the limitations. The idea is to be able upload videos to Discord without having to upload them to a third-party website such as YouTube, especially if the clip is only going to be viewed a few times.

What I wound up with was a Windows “shell command”, that transcodes any video, directly from Windows Explorer. It’s really easy to use! Just right click the video, and click “Transcode for Discord”. Wait roughly 10 seconds and drag the result into Discord.

This how-to will walk you through setting up a similar shell command, using the open source video encoding library ffmpeg.

Continue reading

Fixing League of Legends 8.12 on KVM/QEMU

UPDATE 19 JUNE 2018: Riot has released a statement saying, in part, that a patch released today will allow virtualization with a passed through GPU (IOMMU)

Riot recently rolled out a new “anticheat” that prevents the game from running in a VM. Riot released a statement while the feature was in PBE saying that while they were not specifically out to screw over Linux users (bullshit), they also weren’t going to make any effort to make League compatible with Linux.

As of patch 8.12, anybody playing in a virtual machine will not be able to start the game after champ select; they will only see a “Reconnect” button.

To make matters even worse, players running Windows baremetal without any odd 3rd party software are running into issues, and it seems that their support contractor wasn’t informed about the updated “anticheat”. These players are reporting the symptoms of it preventing the game from starting, and they aren’t putting 2 and 2 together. Not even sending users either of the official posts linked above.

Riot’s waxing poetic about the “complex nature of our protection”… but it literally just checks cpuid. You may also need to set kvm=off if you aren’t already doing so for NVIDIA driver compatibility. My Tweet on the fix:

As an example:

-cpu host,-hypervisor,kvm=off,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time

For libvirt, add the following stanza inside <cpu>:

<feature policy='disable' name='hypervisor'/>

Just an aside, I’m looking for a new adventure (you know, a job) in Chicago. If this helped you, and your firm could use someone familiar with Linux and KVM, definitely hit me up; [email protected]