I just solved after couple of hours. On this answer the /dev/video0 was actually representing the virtual camera created by v4l2loopback but in my case as I am on laptop /dev/video0 actually points to integrated webcam. So what I did is

ls /dev/video*

And note the devices returned now you can load the module like

sudo modprobe v4l2loopback

and now a new device pointer should be preset. Check it by

ls /dev/video*

Notice the new device added and that's what you have to work with. Keeping this in mind now you can follow this thread Is there any way ffmpeg send video to /dev/video0 on Ubuntu?