If D is showing their own code, they are the sole copyright holder and are not bound by the terms of the GPL/LGPL licenses with respect to that code. So they are in no way prevented from showing the code on video, and have nothing in particular to consider.
If the code shown by the developer includes material from third parties, things become tricky.
The easiest solution would be if this use is clearly covered by a copyright exception (such as fair use in the US) so that the license conditions can be ignored. But such copyright exceptions typically expect proper attribution.
Otherwise, this gets difficult. By including GPL-covered material in the video, there's a good argument that the video is a derived work of the GPL/LGPL-covered software. The GPL/LGPL then requires that the derived work is only published under the terms of the same license (GPL or LGPL respectively). This is arguably incompatible with the Youtube terms of service. An interesting consequence of the GPL/LGPL is that the source code of the derived work must be made available as well. The source code is the preferred form of making modifications. For a video, this would likely be a project file from your video editing software. This is difficult to do in practice, and code-oriented licenses like the GPL/LGPL are remarkably poor licenses for other creative works.