How long the code needs to stay on screen
Give it a minimum of 5-8 seconds on screen, and pair it with a verbal callout — something as simple as "scan the code on screen now" — so viewers know to act instead of just noticing it in passing. Think through the actual physical sequence: someone has to spot the code, reach for their phone, unlock it, open the camera, and aim, and that whole chain takes a few seconds even for someone paying full attention.
This matters most on end screens, where YouTube's own subscribe prompts and suggested-video cards are already competing for the viewer's attention and the clock. Budget real time for the code in the edit — hold the frame, or build a countdown into the graphic — rather than letting it be one element among several that all flicker by together.
Why simple beats detailed after compression
YouTube's re-encoding can soften fine detail in a similar way to a low-quality print job — edges blur slightly, and a QR code with a lot of modules packed into it (usually from a long destination URL, or from cramming in extra data) loses the crispness it needs to scan cleanly. A simpler, higher-contrast code with a short URL holds up noticeably better after that compression pass.
A shorter link does double duty here: fewer characters means fewer modules in the pattern, and a fewer-module code is easier to keep fully inside a clean, uncluttered part of the frame. If the destination is naturally a long URL, it's worth trimming it down to something short and clean before it goes into the code, rather than encoding the full path with tracking parameters attached.
Sizing for a screen that could be a phone or a TV
Viewers could be watching on anything — a phone in bed, a laptop, a TV across the room. A code sized as a small corner element that reads fine on a big TV screen might be too small relative to the frame on someone's phone playing the exact same video, so size it generously relative to the whole frame rather than tucking it into a tiny corner.
Give it a dedicated, uncluttered moment on screen rather than squeezing it in next to a subscribe button and other end-screen elements fighting for the same space. And pick the destination to match what's actually happening in the video at that moment — a channel page for a general subscribe prompt, a specific related video for "watch this next," or an external link if that's the actual point of the video.