Creating a Video Converter Using VB.NET

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.


I have always been fascinated with programs like DVD Fab, or XiliSoft.
I literally have millions of DVDs. I am a movie freak. Now, I have many imported
DVDs of movies I can remember from when I was just a little boy. The problem is:
not every one puts the DVD back into its case once it has been watched, causing
the disks to scratch. That is why I have decided to make my own movie converter,
so that I can backup my movies on my 2 TB hard drive.

Our Program

Our program for this article is called HTG_NCode. It is a normal Windows
Forms application, and it has only one form inside it. Feel free to start your
project now. Honestly, do not expect too much from this project, as I am only
one dumb guy trying to figure out how things work. That is my aim with all my
articles. I want to show you how stuff works and give you enough knowledge to
further elaborate on your own projects. Yip, I shouldn’t have said that, because
now most readers aren’t reading any more…

For those of you who are serious and as curious as I am, and still reading,
here is a break down of what we will do in this project:

  • Make use of a freeware program (which we have to download and copy to our application folder) called
    ffmpeg.exe to handle all of the
    conversions for us. Why? Well, VB.NET‘s capabilities with these types of
    things are very limited; non-existant really. Sad. But why a separate
    program? OK, it will take (me) years to figure out each file’s different
    signature. A file signature is a short code at the beginning and or end of
    each file identifying what type of file it is. This is also how anti viruses
    work. They check if the file’s signature is correct or not. If it is not, it
    is regarded as a potential threat. Obviously, we are not here to talk about
    anti viruses; so I just have one more thing to add. Have a look at the
    following three pictures. They show file signatures for .gif, png, and jpg
    files. Why I am showing you this is so that you can see for yourself. These
    are just pictures’ signatures, I know, but you get the idea, don’t you? In case you’re wondering, here is a list of more appropriate file signatures:
    • AVI: 52 49 46 46 xx xx xx xx 43 44 44 41 66 6D 74 20
    • MP4: 00 00 00 18 66 74 79 70 33 67 70 35
    • WMV: 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C
    • MKV: 1A 45 DF A3 93 42 82 88 6D 61 74 72 6F 73 6B 61
    • VOB: 00 00 01 BA
    • FLV: 46 4C 56 01

Gif file signature
Image 1 – Gif file signature

Jpeg file signature
Image 2 – Jpeg file signature

Png file signature
Image 3 – Png file signature

  • Do a basic (default) conversion
  • Set up the program to do more than just convert:

    • We will determine the quality of the converted file
    • Set the video size. This will be how big on TV the file will show.
      So, you can set it so that it shows full screen, instead of a small
      window inside your tv
    • Set the Audio bitrate
    • Determine if a DVD has been inserted or not
    • Set a Volume label for your output file
  • And most importantly: have some fun!

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read