I have created functionality to record video in my app.
When I play a song, that song is recorded with video and a video file is created, similar to a dubshmash app
If you want to working with video then you have to use FFMPEG library
FFMPEG
That can be you can work with Video.
That for i have already give answer to How to use ffmpeg in android studio? see this LINK. Go step by step and import in your project