Sound from VLC video after locking screen
It turns out this is actually a native function of VLC 1.7.4 (and probably previous versions too) for Android.


Click the three horizontal lines in the top left corner (on the file selection screen, not while a video is playing).
Click on "Preferences".
Tick the "Play videos in background" box.
Play a video.
Lock the screen.
Keep listening to the audio from that video!