- Download MX Player
- Play YouTube/Sdcard video using MX Player.
- Press Menu button (or the 3 dot icon), and then select Play
- Make sure "Background Play" is checked
- Now, you can press Home Button and listen in lock screen.
There is also a shortcut for enabling Background Play, which is tapping and holding the Play button, instead of just tapping it to play a video