Windows 11 – Bypass Hardware Requirements

  1. At the setup screen press Shift + F10 to enter the DOS prompt
  2.  Type Regedit to open the Registry.
  3. The Windows Registry Editor will now open. In the address bar, type ‘HKEY_LOCAL_MACHINE\SYSTEM\Setup’ and hit enter
  4. You should now see a ‘Setup’ key. Right-click it and choose New > Key
    Windows 11 on unsupported pc
  5. You’ll now be prompted to give it a name. Choose ‘LabConfig’ and hit enter
  6. Right-click the new key you’ve created and choose New > DWORD (32-bit) value
  7. Give it the name ‘BypassTPMCheck’ and set its data to 1
    Windows 11 on unsupported pc
  8. Follow the same process for ‘BypassRAMCheck’ and ‘BypassSecureBootCheck’, with the same value of 1
    Windows 11 on unsupported pc
BypassTPMCheck 
BypassSecureBootCheck 
BypassRAMCheck 
BypassCPUCheck 
BypassStorageCheck
  1. Close this window using the red X in the top-right corner
  2. Close the Command Prompt window by typing ‘exit’ and hitting enter
  3. You’ll now be back at the ‘This PC can’t run Windows 11’ message. Click the back button in the top-left corner
  4. You should now be able to complete the installation as normal

The things the last 10 years have taught me

  1. If we can’t do the basics amazingly well, nothing else will matter.
  2. Never try to be cool. Only try to be good.
  3. Be honest. People trust you when you tell the truth.
  4. Be brave with your ideas. And fight like a brave to make them happen.
  5. Understand everything we do has some negative impact on the environment. But that shouldn’t stop us from from trying to be as low impact as we can.
  6. Hire people with passion and who care. We can’t put the fire in someone’s belly. Only they can do that
  7. Making a fun place to work in shouldn’t be confused with being an easy place to work on. Trying to be better than the other guys is never easy.
  8. If we make a promise, we have to keep that promise. If events prevent us from keeping that promise, be quick to tell the other person.
  9. We all work for this company, but make sure this company works for you.
  10. Try stuff. Make mistakes. This is how we learn.
  11. We are not a normal company. Our aim is to make people think as well as to buy.
  12. A strong team will achieve much more than a team of strong individuals ever will.
  13. We want to be great at what we do. Treat average as the enemy. Be tough on it.
  14. Be positive. Believe in your ability to do amazing things.
  15. Treat people with the same respect that they pay you. Remember, flowers bloom in the sunshine.
  16. Have fun. Life is over in a blink of an eye. Ask my dad.
  17. It’s OK to disagree on stuff. That’s how great stuff happens.
  18. We are using this business to try and change the things we care about. That doesn’t make us perfect. But it does mean we are doing something. Dick Dastardly had a point.
  19. Wrong thinking is often right.
  20. We have a point of view. Don’t expect everyone to agree with it.
  21. Quality is many things not just how well you make something.
  22. Give something back. It doesn’t just have to be money like the earth tax we do. It can be even more vaulable. Your time
  23. Do is a powerful word. A good friend of mind told me that.
  24. Make time for yourself. For your sports. For your family. Be home for bath time. Kids grow up real quick.
  25. Play is good. Equally, work is good too.
  26. Stay Hungry. Wanting to improve is a never ending journey.
  27. Find your love. And do it. Like they say, life is short

Originally published by David Hieatt at the Do Lectures

23 Laws Of Interesting

Interesting things happen when you do interesting things. It’s an equation, an unwritten law, and a universal truth all rolled into one. It’s a way at looking at each day, at each opportunity, each time you meet someone.

It allows you to adopt a different viewpoint to failure, it invites you to trust in putting your work out there into the big wide world and gives you the freedom to be braver with your ideas, your work, and your thinking.

Interesting can help you. It can make your work better, it can open doors that you thought never would be open to you, it can help you work with amazing people and do amazing things.

Yes, interesting things happen when you do interesting things.

1. Outputs are directly related to inputs.
If you go looking in the same place for inspiration as everybody else, you will find your work quickly resembles theirs. Go and see that odd Polish subtitled movie. Be one of the three in the audience.

2. Comfort zones are creative dead zones.
To feel most alive you have to be doing work that keeps you on your toes. Once you have your successful formula, don’t repeat it. Start again, but start from a new place. Having doubts about your work means you are trying new ways.

3. The more interesting your circle, the more interesting you will be.
Great writers need to hang out with great writers, great artists need to hang out with great artists, people who want to to change the world need to hang out with people who want to change the world. Your circles define and push you.

4. Think different is more than a slogan.
To think different, do different, read different, travel different, eat different. We stay interesting by stepping outside of our daily routine. We keep pushing; we leave what we know behind for a bit in order to let new in.

5. Step outside your world.
If you can code, don’t go to a conference on coding. If you design, don’t go to a design conference. If you run startups, don’t go to a startup conference. Be eclectic. Open up the mind. Don’t close it down.

6. Learn from Velcro.
Velcro works like this: On one side is a series of hooks going in lots of random directions. On the other side is a series of loops going in lots of random directions. When a hook meets a loop, they connect. It is in the connection business. And if you are an ideas person, so are you.

7. Alcohol doesn’t make you more interesting.
At the time, you think it does. Yes, you can ‘Write drunk and edit sober’. But mostly you will be editing a pile of garbled mess. It’s your thinking that makes you interesting, not your drinking.

8. Listen.
The best way to be interesting is to be interested. Stop being on transmit, and flip the switch to being on receive. Listen hard, listen without thinking about what you are about to say. Good listeners are sought after.

9. Embrace your weirdness.
The odd things about you make you interesting. Don’t hide them away. Don’t try to blend in. Our imperfections and our quirks make us who we are. Bring them to the surface. Hide them in the spotlight. Be you, warts and all.

10. Turn left instead of right in the bookstore.
We find things we are interested in and stick to our groove. So we see the same type of films, listen to the same type of bands, and read the same type of books. So next time you’re in the bookstore, go to the section you never go to.

11. Treat failure as a rite of passage toward interesting.
How you view failure will determine how much success you have. If you fear it, you will hold back. And if you hold back, you will not be brave with your ideas. Ideas require you to be at your bravest in order to stand out.

12. Know how to ask a question.
Being good at the small talk will make you more interesting. One way is being able to ask other questions so you can bring out their interesting. Once you have discovered they’re interesting, they will think you are.

13. Take cold showers.
Have one thing that people talk about. Run without trainers. Make a rule when you see a river, you have to go for a swim in it. Do something for people to see you differently. Surprise others. But, as importantly, surprise yourself.

14. How you say something can matter more than what you say.
Some people can make really interesting things sound rather dull. Some people can make something dull sound rather interesting. Delivery matters. Only 7% of what we say is emotional is contained in the actual words we say.

15. Become an intellectual tourist.
“Limited references create a limited life. If you want to expand your life, you must expand your references by pursuing ideas and experiences that wouldn’t be a part of your life if you didn’t consciously seek them out.” The Giant Within.

16. Interesting and happiness are good mates.
Happiness fuels success, not the other way around. When we are positive, our brains become more engaged, creative, motivated, energetic, resilient, and productive at work.

17. Learn a new skill each year.
Learn a new language. Learn a new skill. Learn how to cook, to bake bread, learn how to code. Set yourself a new goal each year. Challenge yourself. New skills give you something new to talk about.

18. Everything can be interesting.
If you adopt an approach that all things are interesting, you will begin to find all things interesting. And you will become better at being interested. You get better at running by running. Interesting is the same. You can get better at it.

19. Say yes when would say no.
In order to keep things interesting, saying yes to something you would normally say no to. It opens up new connections. Connections that you wouldn’t normally have made. And, sometimes, they are the best.

20. Zag.
If you are doing the same thing as everyone else, you are not going to be doing interesting. Don’t go with the crowd. If that means you are alone for a while, be comfortable with that.

21. Take on a quest.
Have something that really, really bugs you. That you can’t rest until it gets changed. People with that hunger to make a change happen are amazing to be around. That energy is contagious. And people gravitate toward it.

22. Fallow.
In order to be fertile with ideas, sometimes you have to rest. To take a break. Farmers know this. They know you have to rest a field. To put back, so it can give again. You are not a machine. Creativity comes in sprints. After a rest.

23. Ignore this list.
Don’t follow. Write your own list. That’s what makes you interesting.

Originally posted on the Do Lectures

🎞️ Don Melton’s video transcoding scripts

Ripping DVDs, BluRays, and UHD disks can be done with the excellent MakeMKV software, which produces a perfect MKV of the media, albeit a very large file. Don Melton’s excellent transcoding scripts can be used to transcode and convert the MKV file into a more efficient file size, with several options such as burning subtitles directly into the movie file itself. The video file can also be transcoded into an Apple-friendly MP4 file format.

To install the transcoding scripts, follow the instructions.

brew install ruby
sudo gem install video_transcoding
gem update video_transcoding
brew install handbrake
brew install ffmpeg
brew install mkvtoolnix
brew install mp4v2
brew install mpv

Compressing the file

transcode-video <your-ripped-video-file.mkv>

Optional steps

I also prefer to add in a few additional options. So, let’s say I had a file batman.mkv. I would run that file through Don’s tools as such:

transcode-video --mp4 --burn-subtitle scan batman.mkv

The two options:

--mp4 indicates that I want the resulting output to be a MP4 file, rather than another MKV. This tends to play better with Apple devices.

--burn-subtitle scan In some movies, foreign-language content spoken on-screen will be displayed in English by forcing the subtitles to show during that time, even if subtitles haven’t been turned on by the user.

--burn-subtitle scan indicates to Don’s tools that they should attempt to scan for any forced subtitles, and then burn them into the video, so they’re part of image shown on-screen. As Don writes in his instructions:

By default, the transcode-video tool automatically burns any forced subtitle track it detects into the output video track. “Burning” means that the subtitle becomes part of the video itself and isn’t retained as a separate track. A “forced” subtitle track is detected by a special flag on that track in the input.

You can also use a special “scan” mode […] to find any embedded forced subtitle track that’s in the same language as the main audio track.

Be aware that using this special “scan” mode does not always work. Sometimes it won’t find any track or, worse, it will find the wrong track. And you won’t know whether it worked until the transcoding is complete.

🎁 Installing Mac apps using Bundle

Homebrew’s bundle is an automated method of installing Mac apps using the Terminal. This can be used as a significant time-saver to install all of your Mac apps after a fresh macOS install. Here are the steps that you need to follow to make the process work for you.

  1. Ensure Brew is installed. Copy the text below and paste it into a Terminal window to install the Homebrew components.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Next, you will need a brew file, here is a link to how I built mine. You can customize the contents to suit your own taste. When done, save the filename as Brewfile. Note! Bundle can be used to install files from the Mac App Store, but you will need the specific codes for each app. See the next step and learn how to create them.

3. It is highly advisable to create the brew file before you format your computer. To create your own particular brewfile, use the following commands: 

brew install mas
brew bundle dump

4. Next, open the brewfile in a text editor and review the contents, ensure you have all of the apps that you want to reinstall at a later date. Once done, keep the file backed up.

5. Finally, when you are ready to install, use the command:

brew bundle install 

This will start the app installation process. 

 

💪 How to use youtube-dl

Have you ever wanted to download a video from YouTube? Perhaps you only need to extract the audio from the video, but didn’t need the video? Youtube-dl is a command-line utility that allows you to download video (or audio) from a variety of supported video websites

Installation

The quickest way to to install FFmpeg is through Homebrew in Terminal.

brew install youtube-dl

Next, you will need to install FFmpeg to help with the video encoding process.

brew install ffmpeg

Youtube-dl has a vast number of configuration options, which are beyond the scope of this blog post. However, below are the options I found the most useful

Download a video from YouTube

Using the string below will pull the best-uploaded video and audio file from YouTube and merge both files together.

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' "<Video-URL>"

Extracting audio

Extracting just the audio is fairly straightforward, just enter the text string below. The –embed-thumbnail command is optional and works with the mp3 file format. You can replace mp3 with other audio formats such as flac.

youtube-dl -f bestaudio --extract-audio --embed-thumbnail --audio-format mp3 --audio-quality 0 "<Video-URL>" 

Options

-h, --help                           Print this help text and exit
--version                            Print program version and exit
-U, --update                         Update this program to latest version.
                                     Make sure that you have sufficient
                                     permissions (run with sudo if needed)
-i, --ignore-errors                  Continue on download errors, for
                                     example to skip unavailable videos in 
                                     a playlist
--abort-on-error                     Abort downloading of further videos 
                                     (in the playlist or the command line) 
                                     if an error occurs
--dump-user-agent                    Display the current browser
                                     identification
--list-extractors                    List all supported extractors
--extractor-descriptions             Output descriptions of all supported
                                     extractors
--force-generic-extractor            Force extraction to use the generic
                                     extractor
--default-search PREFIX              Use this prefix for unqualified URLs.
                                     For example "gvsearch2:" downloads two
                                     videos from google videos for youtube-
                                     dl "large apple". Use the value "auto"
                                     to let youtube-dl guess ("auto_warning"
                                     to emit a warning when guessing).
                                     "error" just throws an error. The
                                     default value "fixup_error" repairs
                                     broken URLs, but emits an error if      
                                     this is not possible instead of 
                                     searching.
--ignore-config                      Do not read configuration files. When
                                     given in the global configuration file
                                     /etc/youtube-dl.conf: Do not read the
                                     user configuration in
                                     ~/.config/youtube-dl/config
                                     (%APPDATA%/youtube-dl/config.txt on
                                     Windows)
--config-location PATH               Location of the configuration file;
                                     either the path to the config or its
                                     containing directory.
--flat-playlist                      Do not extract the videos of a
                                     playlist, only list them.
--mark-watched                       Mark videos watched (YouTube only)
--no-mark-watched                    Do not mark videos watched (YouTube
                                     only)
--no-color                           Do not emit color codes in output

Network Options:

--proxy URL                          Use the specified HTTP/HTTPS/SOCKS
                                     proxy. To enable SOCKS proxy, specify a
                                     proper scheme. For example
                                     socks5://127.0.0.1:1080/. Pass in an
                                     empty string (--proxy "") for direct
                                     connection
--socket-timeout SECONDS             Time to wait before giving up, in
                                     seconds
--source-address IP                  Client-side IP address to bind to
-4, --force-ipv4                     Make all connections via IPv4
-6, --force-ipv6                     Make all connections via IPv6

Geo Restriction:

--geo-verification-proxy URL         Use this proxy to verify the IP address
                                     for some geo-restricted sites. The
                                     default proxy specified by --proxy (or
                                     none, if the option is not present) is
                                     used for the actual downloading.
--geo-bypass                         Bypass geographic restriction via
                                     faking X-Forwarded-For HTTP header
--no-geo-bypass                      Do not bypass geographic restriction
                                     via faking X-Forwarded-For HTTP header
--geo-bypass-country CODE            Force bypass geographic restriction
                                     with explicitly provided two-letter ISO
                                     3166-2 country code
--geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction
                                     with explicitly provided IP block in
                                     CIDR notation

Video Selection:

--playlist-start NUMBER              Playlist video to start at (default is
                                     1)
--playlist-end NUMBER                Playlist video to end at (default is
                                     last)
--playlist-items ITEM_SPEC           Playlist video items to download.
                                     Specify indices of the videos in the
                                     playlist separated by commas like: "--
                                     playlist-items 1,2,5,8" if you want to
                                     download videos indexed 1, 2, 5, 8 in
                                     the playlist. You can specify range: "
                                     --playlist-items 1-3,7,10-13", it will
                                     download the videos at index 1, 2, 3,
                                     7, 10, 11, 12 and 13.
--match-title REGEX                  Download only matching titles (regex or
                                     caseless sub-string)
--reject-title REGEX                 Skip download for matching titles
                                     (regex or caseless sub-string)
--max-downloads NUMBER               Abort after downloading NUMBER files
--min-filesize SIZE                  Do not download any videos smaller than
                                     SIZE (e.g. 50k or 44.6m)
--max-filesize SIZE                  Do not download any videos larger than
                                     SIZE (e.g. 50k or 44.6m)
--date DATE                          Download only videos uploaded in this
                                     date
--datebefore DATE                    Download only videos uploaded on or
                                     before this date (i.e. inclusive)
--dateafter DATE                     Download only videos uploaded on or
                                     after this date (i.e. inclusive)
--min-views COUNT                    Do not download any videos with less
                                     than COUNT views
--max-views COUNT                    Do not download any videos with more
                                     than COUNT views
--match-filter FILTER                Generic video filter. Specify any key
                                     (see the "OUTPUT TEMPLATE" for a list
                                     of available keys) to match if the key
                                     is present, !key to check if the key is
                                     not present, key > NUMBER (like
                                     "comment_count > 12", also works with
                                     >=, <, <=, !=, =) to compare against a
                                     number, key = 'LITERAL' (like "uploader
                                     = 'Mike Smith'", also works with !=) to
                                     match against a string literal and & to
                                     require multiple matches. Values which
                                     are not known are excluded unless you
                                     put a question mark (?) after the
                                     operator. For example, to only match
                                     videos that have been liked more than
                                     100 times and disliked less than 50
                                     times (or the dislike functionality is
                                     not available at the given service),
                                     but who also have a description, use
                                     --match-filter "like_count > 100 &
                                     dislike_count <? 50 & description" .
--no-playlist                        Download only the video, if the URL
                                     refers to a video and a playlist.
--yes-playlist                       Download the playlist, if the URL
                                     refers to a video and a playlist.
--age-limit YEARS                    Download only videos suitable for the
                                     given age
--download-archive FILE              Download only videos not listed in the
                                     archive file. Record the IDs of all
                                     downloaded videos in it.
--include-ads                        Download advertisements as well
                                     (experimental)

Download Options:

-r, --limit-rate RATE                Maximum download rate in bytes per
                                     second (e.g. 50K or 4.2M)
-R, --retries RETRIES                Number of retries (default is 10), or
                                     "infinite".
--fragment-retries RETRIES           Number of retries for a fragment
                                     (default is 10), or "infinite" (DASH,
                                     hlsnative and ISM)
--skip-unavailable-fragments         Skip unavailable fragments (DASH,
                                     hlsnative and ISM)
--abort-on-unavailable-fragment      Abort downloading when some fragment is
                                     not available
--keep-fragments                     Keep downloaded fragments on disk after
                                     downloading is finished; fragments are
                                     erased by default
--buffer-size SIZE                   Size of download buffer (e.g. 1024 or
                                     16K) (default is 1024)
--no-resize-buffer                   Do not automatically adjust the buffer
                                     size. By default, the buffer size is
                                     automatically resized from an initial
                                     value of SIZE.
--http-chunk-size SIZE               Size of a chunk for chunk-based HTTP
                                     downloading (e.g. 10485760 or 10M)
                                     (default is disabled). May be useful
                                     for bypassing bandwidth throttling
                                     imposed by a webserver (experimental)
--playlist-reverse                   Download playlist videos in reverse
                                     order
--playlist-random                    Download playlist videos in random
                                     order
--xattr-set-filesize                 Set file xattribute ytdl.filesize with
                                     expected file size
--hls-prefer-native                  Use the native HLS downloader instead
                                     of ffmpeg
--hls-prefer-ffmpeg                  Use ffmpeg instead of the native HLS
                                     downloader
--hls-use-mpegts                     Use the mpegts container for HLS
                                     videos, allowing to play the video
                                     while downloading (some players may not
                                     be able to play it)
--external-downloader COMMAND        Use the specified external downloader.
                                     Currently supports aria2c,avconv,axel,c
                                     url,ffmpeg,httpie,wget
--external-downloader-args ARGS      Give these arguments to the external
                                     downloader

Filesystem Options:

-a, --batch-file FILE                File containing URLs to download ('-'
                                     for stdin), one URL per line. Lines
                                     starting with '#', ';' or ']' are
                                     considered as comments and ignored.
--id                                 Use only video ID in file name
-o, --output TEMPLATE                Output filename template, see the
                                     "OUTPUT TEMPLATE" for all the info
--output-na-placeholder PLACEHOLDER  Placeholder value for unavailable meta
                                     fields in output filename template
                                     (default is "NA")
--autonumber-start NUMBER            Specify the start value for
                                     %(autonumber)s (default is 1)
--restrict-filenames                 Restrict filenames to only ASCII
                                     characters, and avoid "&" and spaces in
                                     filenames
-w, --no-overwrites                  Do not overwrite files
-c, --continue                       Force resume of partially downloaded
                                     files. By default, youtube-dl will
                                     resume downloads if possible.
--no-continue                        Do not resume partially downloaded
                                     files (restart from beginning)
--no-part                            Do not use .part files - write directly
                                     into output file
--no-mtime                           Do not use the Last-modified header to
                                     set the file modification time
--write-description                  Write video description to a
                                     .description file
--write-info-json                    Write video metadata to a .info.json
                                     file
--write-annotations                  Write video annotations to a
                                     .annotations.xml file
--load-info-json FILE                JSON file containing the video
                                     information (created with the "--write-
                                     info-json" option)
--cookies FILE                       File to read cookies from and dump
                                     cookie jar in
--cache-dir DIR                      Location in the filesystem where
                                     youtube-dl can store some downloaded
                                     information permanently. By default
                                     $XDG_CACHE_HOME/youtube-dl or
                                     ~/.cache/youtube-dl . At the moment,
                                     only YouTube player files (for videos
                                     with obfuscated signatures) are cached,
                                     but that may change.
--no-cache-dir                       Disable filesystem caching
--rm-cache-dir                       Delete all filesystem cache files

Thumbnail images:

--write-thumbnail                    Write thumbnail image to disk
--write-all-thumbnails               Write all thumbnail image formats to
                                     disk
--list-thumbnails                    Simulate and list all available
                                     thumbnail formats

Verbosity / Simulation Options:

-q, --quiet                          Activate quiet mode
--no-warnings                        Ignore warnings
-s, --simulate                       Do not download the video and do not
                                     write anything to disk
--skip-download                      Do not download the video
-g, --get-url                        Simulate, quiet but print URL
-e, --get-title                      Simulate, quiet but print title
--get-id                             Simulate, quiet but print id
--get-thumbnail                      Simulate, quiet but print thumbnail URL
--get-description                    Simulate, quiet but print video
                                     description
--get-duration                       Simulate, quiet but print video length
--get-filename                       Simulate, quiet but print output
                                     filename
--get-format                         Simulate, quiet but print output format
-j, --dump-json                      Simulate, quiet but print JSON
                                     information. See the "OUTPUT TEMPLATE"
                                     for a description of available keys.
-J, --dump-single-json               Simulate, quiet but print JSON
                                     information for each command-line
                                     argument. If the URL refers to a
                                     playlist, dump the whole playlist
                                     information in a single line.
--print-json                         Be quiet and print the video
                                     information as JSON (video is still
                                     being downloaded).
--newline                            Output progress bar as new lines
--no-progress                        Do not print progress bar
--console-title                      Display progress in console titlebar
-v, --verbose                        Print various debugging information
--dump-pages                         Print downloaded pages encoded using
                                     base64 to debug problems (very verbose)
--write-pages                        Write downloaded intermediary pages to
                                     files in the current directory to debug
                                     problems
--print-traffic                      Display sent and read HTTP traffic
-C, --call-home                      Contact the youtube-dl server for
                                     debugging
--no-call-home                       Do NOT contact the youtube-dl server
                                     for debugging

Workarounds:

--encoding ENCODING                  Force the specified encoding
                                     (experimental)
--no-check-certificate               Suppress HTTPS certificate validation
--prefer-insecure                    Use an unencrypted connection to
                                     retrieve information about the video.
                                     (Currently supported only for YouTube)
--user-agent UA                      Specify a custom user agent
--referer URL                        Specify a custom referer, use if the
                                     video access is restricted to one
                                     domain
--add-header FIELD:VALUE             Specify a custom HTTP header and its
                                     value, separated by a colon ':'. You
                                     can use this option multiple times
--bidi-workaround                    Work around terminals that lack
                                     bidirectional text support. Requires
                                     bidiv or fribidi executable in PATH
--sleep-interval SECONDS             Number of seconds to sleep before each
                                     download when used alone or a lower
                                     bound of a range for randomized sleep
                                     before each download (minimum possible
                                     number of seconds to sleep) when used
                                     along with --max-sleep-interval.
--max-sleep-interval SECONDS         Upper bound of a range for randomized
                                     sleep before each download (maximum
                                     possible number of seconds to sleep).
                                     Must only be used along with --min-
                                     sleep-interval.

Video Format Options:

-f, --format FORMAT                  Video format code, see the "FORMAT
                                     SELECTION" for all the info
--all-formats                        Download all available video formats
--prefer-free-formats                Prefer free video formats unless a
                                     specific one is requested
-F, --list-formats                   List all available formats of requested
                                     videos
--youtube-skip-dash-manifest         Do not download the DASH manifests and
                                     related data on YouTube videos
--merge-output-format FORMAT         If a merge is required (e.g.
                                     bestvideo+bestaudio), output to given
                                     container format. One of mkv, mp4, ogg,
                                     webm, flv. Ignored if no merge is
                                     required

Subtitle Options:

--write-sub                          Write subtitle file
--write-auto-sub                     Write automatically generated subtitle
                                     file (YouTube only)
--all-subs                           Download all the available subtitles of
                                     the video
--list-subs                          List all available subtitles for the
                                     video
--sub-format FORMAT                  Subtitle format, accepts formats
                                     preference, for example: "srt" or
                                     "ass/srt/best"
--sub-lang LANGS                     Languages of the subtitles to download
                                     (optional) separated by commas, use
                                     --list-subs for available language tags

Authentication Options:

-u, --username USERNAME              Login with this account ID
-p, --password PASSWORD              Account password. If this option is
                                     left out, youtube-dl will ask
                                     interactively.
-2, --twofactor TWOFACTOR            Two-factor authentication code
-n, --netrc                          Use .netrc authentication data
--video-password PASSWORD            Video password (vimeo, youku)

Adobe Pass Options:

--ap-mso MSO                         Adobe Pass multiple-system operator (TV
                                     provider) identifier, use --ap-list-mso
                                     for a list of available MSOs
--ap-username USERNAME               Multiple-system operator account login
--ap-password PASSWORD               Multiple-system operator account
                                     password. If this option is left out,
                                     youtube-dl will ask interactively.
--ap-list-mso                        List all supported multiple-system
                                     operators

Post-processing Options:

-x, --extract-audio                  Convert video files to audio-only files
                                     (requires ffmpeg/avconv and
                                     ffprobe/avprobe)
--audio-format FORMAT                Specify audio format: "best", "aac",
                                     "flac", "mp3", "m4a", "opus", "vorbis",
                                     or "wav"; "best" by default; No effect
                                     without -x
--audio-quality QUALITY              Specify ffmpeg/avconv audio quality,
                                     insert a value between 0 (better) and 9
                                     (worse) for VBR or a specific bitrate
                                     like 128K (default 5)
--recode-video FORMAT                Encode the video to another format if
                                     necessary (currently supported:
                                     mp4|flv|ogg|webm|mkv|avi)
--postprocessor-args ARGS            Give these arguments to the
                                     postprocessor
-k, --keep-video                     Keep the video file on disk after the
                                     post-processing; the video is erased by
                                     default
--no-post-overwrites                 Do not overwrite post-processed files;
                                     the post-processed files are
                                     overwritten by default
--embed-subs                         Embed subtitles in the video (only for
                                     mp4, webm and mkv videos)
--embed-thumbnail                    Embed thumbnail in the audio as cover
                                     art
--add-metadata                       Write metadata to the video file
--metadata-from-title FORMAT         Parse additional metadata like song
                                     title / artist from the video title.
                                     The format syntax is the same as
                                     --output. Regular expression with named
                                     capture groups may also be used. The
                                     parsed parameters replace existing
                                     values. Example: --metadata-from-title
                                     "%(artist)s - %(title)s" matches a
                                     title like "Coldplay - Paradise".
                                     Example (regex): --metadata-from-title
                                     "(?P<artist>.+?) - (?P<title>.+)"
--xattrs                             Write metadata to the video file's
                                     xattrs (using dublin core and xdg
                                     standards)
--fixup POLICY                       Automatically correct known faults of
                                     the file. One of never (do nothing),
                                     warn (only emit a warning),
                                     detect_or_warn (the default; fix file
                                     if we can, warn otherwise)
--prefer-avconv                      Prefer avconv over ffmpeg for running
                                     the postprocessors
--prefer-ffmpeg                      Prefer ffmpeg over avconv for running
                                     the postprocessors (default)
--ffmpeg-location PATH               Location of the ffmpeg/avconv binary;
                                     either the path to the binary or its
                                     containing directory.
--exec CMD                           Execute a command on the file after
                                     downloading and post-processing,
                                     similar to find's -exec syntax.
                                     Example: --exec 'adb push {}
                                     /sdcard/Music/ && rm {}'
--convert-subs FORMAT                Convert the subtitles to other format
                                     (currently supported: srt|ass|vtt|lrc)

🎥 How to use FFmpeg

FFmpeg is a wonderful tool that can take almost any form of audio or video and convert it to almost any other form. It can downsample, upsample, transcode media, extract clips and do many more treatments edit that may be needed.

This blog post is an FFmpeg primer and contains a number of “receipes” that I have found most useful, and I hope you find them useful too.

Installation

The quickest way to to install ffmpeg is through Homebrew

brew install ffmpeg

How to get information from a video file

The following command will help to retrieve meta-information on a video file:

ffmpeg - i first.mkv

How to crop a video file

FFmpeg provides a crop filter for this specific purpose:

ffmpeg -i first.mkv -filter:v "crop=out_w:out_h:x:y" second.mp4

The options are as follows:

  • out_w is the width of the output rectangle
  • out_h is the height of the output rectangle
  • x and y specify the top left corner of the output rectangle
  • second.mp4 is the output file

Say, we download a video from YouTube and we need to remove the small black bars on the left and right sides of the video. We know we need to take off about 10 pixels total; 5 on both the left and right sides. We can do so by using the following video filter:

ffmpeg -i .mp4 -vf "crop=in_w-10:in_h" cropped.mp4

The crop parameter to the -vf (video filter) parameter indicates what the resolution of the width and then height of the output video should be. We use the in_w and in_h macros to indicate the source width and height; then we subtract 10 from the width.

Trimming a video clip

How to take a clip from a video from 00:50:22 through to 00:52:22

ffmpeg -ss 00:50:22 -i mymovie.mkv -c copy -to 00:02:00 mymovie-clip.mp4

How to remove ads from a video and split the video into multiple parts

In the example below, the source file is first.mp4 and it will be split into two parts. The first ending at 4 minutes from the start and the second starting at 5 minutes to the end. Note, this is done quickly as the file is not re-encoded.

ffmpeg -i first.mp4 -t 04:00 -c copy part-1.mp4 -ss 05:00 -codec copy part-2.mp4

How to join two or more video files together

To combine two or more files together, you will need to create a text file and list the files that you want to join together. In the example below, the file is called combine.txt. Add the files in the text file as below.

file 'part1.mp4' 
file 'part2.mp4' 
file 'part3.mp4'
ffmpeg -f concat -i combine.txt -c copy newoutput.mp4

How to re-encode one video format into another

ffmpeg -i firstmovie.mkv secondmovie.mp4

The -i parameter is used to specify the input file to FFmpeg.

How to change one video format into another without re-encoding

ffmpeg -i firstmovie.mov -vcodec copy -acodec copy secondmovie.mp4

How to extract audio from a video file

ffmpeg -i first.mkv second.mp3

How to extract audio from a video file with a variable bit rate

ffmpeg -i input.mkv -codec:a libmp3lame -qscale:a 2 output.mp3

How to extract audio from a video file and encode into FLAC

ffmpeg -i audio.xxx -c:a flac audio.flac

How to convert a FLAC file into ALAC with no audio compression loss

ffmpeg -i audio.flac -vn -acodec alac audio.m4a

Codecs

FFmpeg supports litterally hundreds of parameters and options. Very often, FFmpeg infers the parameters from the context, for example the input or output format from the file extention and it also applies default values to unspecified parameters. Sometimes it is instead necessary to specify some important parameters to avoid errors or to optimize the encoding.

Let’s start with a selection of the most important, not codec related, parameters:

-formats print the list of supported file formats
-codecs print the list of supported codecs (E=encode,D=decode)
-i set the input file. Multiple -i switchs can be used
-f set video format (for the input if before of -i, for output otherwise)
-an ignore audio
-vn ignore video
-ar set audio rate (in Hz)
-ac set the number of channels
-ab set audio bitrate
-acodec choose audio codec or use “copy” to bypass audio encoding
-vcodec choose video codec or use “copy” to bypass video encoding
-r video fps. You can also use fractional values like 30000/1001 instead of 29.97
-s frame size (w x h, ie: 320x240)
-aspect set the aspect ratio i.e: 4:3 or 16:9
-sameq ffmpeg tries to keep the visual quality of the input
-t N encode only N seconds of video (you can use also the hh:mm:ss.ddd format)
-croptop, -cropleft, -cropright, -cropbottom crop input video frame on each side
-y automatic overwrite of the output file
-ss select the starting time in the source file
-vol change the volume of the audio
-g Gop size (distance between keyframes)
-b Video bitrate
-bt Video bitrate tolerance
-metadata add a key=value metadata

The syntax of some commands have changed. Commands like -b (is the bitrate related to audio or video?) have now a different syntax:

Use:

	-b:a instead of -ab to set audio bitrate
	-b:v instead of -b to set video bitrate
	-codec:a or -c:a instead of -acodec
	-codec:v or -c:v instead of -vcodec

👋 How to create a bootable USB install drive for macOS

You’ll want a USB drive with at least 12GB of storage, but having more storage is never a bad thing. I recommend this SanDisk Ultra Dual Drive USB Type-C Flash Drive. It’s affordable, and comes with both a USB-C connection and a traditional USB-A connection. This is the drive that I’ve been using and my experience with it has been great.

Make sure that there’s nothing contained on the drive that you need, because this process will completely delete the contents of the drive.

Step 1: Download: macOS Big SurmacOS CatalinamacOS Mojave, or macOS High Sierra 

The will download to your Applications folder as an app named Install macOS [version name]. If the installer opens after downloading, quit it without continuing installation. To get the correct installer, download from a Mac that is using macOS Sierra 10.12.5 or later, or El Capitan 10.11.6. If required, click to download OS X El Capitan.

This downloads as a disk image named InstallMacOSX.dmg. On a Mac that is compatible with El Capitan, open the disk image and run the installer within, named InstallMacOSX.pkg. It installs an app named Install OS X El Capitan into your Applications folder. You will create the bootable installer from this app, not from the disk image or .pkg installer.

Step 2: Copy and paste text for the OS version that you want to create.

Big Sur:*

sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Catalina:*

sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Mojave:*

sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

High Sierra:*

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

El Capitan:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

* If your Mac is using macOS Sierra or earlier, include the --applicationpath argument and installer path, similar to the way this is done in the command for El Capitan.