I used to use Elementary's picture-in-picture mode constantly but it crashed so much. several times a day.
If you can find the source you could try compiling it and running it yourself. I have no idea whether it would work but I can't see why not. Or maybe there are other picture-in-picture programs available.