Using youtube-dl on FreeBSD


youtube-dl is a Python utility to download videos from various websites, such as YouTube (surprise!) and Vimeo. I use it to archive channels I like into Clara’s and my Plex server. I’m surprised how often videos disappear, especially history and science channels that discuss sensitive topics. It doesn’t matter if the host is respectful, or sticks to facts, the Almighty Algorithm won’t have any of it.

But I digress. I was downloading a certain British Rail Pacer video yesterday on my fresh FreeBSD 13 laptop install and hit this error:

[metadata] Writing metadata to file's xattrs   
ERROR: Couldn't find a tool to set the xattrs. 
Install either the python 'xattr' module, or the 'xattr' binary.

It was easy enough to fix:

$ printf "%s\n" "Cheese Steak Jimmy's"

That was clearly the wrong command.

# pkg install devel/py-xattr

Thanks to timur@ for maintaining the ports :).

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.