So i guess its easy enough to encrypt text, but what if you wanted to encrypt a video file or some other file that wasn't text? By writing my own program I mean. How does that work, any links? Thanks

There are lot of video encryption algorithms. You can choose any of the algorithms according to your requirements. Like
encryption algorithms

Well I guess I wasn't trying to look for an already written algorithm specifically for video files, but any file in general. I want to write my own but i guess I don't understand how it works. Ill give the link a look though.