Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT] VB.Net YouTube-Downloader and Video to Music Converter [TUT]

Hello all Hackforums Members!
-----------------------------------------------------------------------------------------------------------------------------------------------------
|WARNING! YOUTUBE HAVE CHANGE THE HTML CODE IN THE WEBSITE. SO THE DOWNLOAD WILL MAYBE NOT WORK. But it always good to have this YouTube-Downloader.|
-----------------------------------------------------------------------------------------------------------------------------------------------------

Today i will make a tutorial on how to make a Youtube-Downloader and a Video to Music Converter!

Lets Start.

Code
1. Open Microsoft Visual Studio 2005/2008/2010 dosent matter what version of them.

Go to: File > New > Project... > Windows Forms Application (Name it "YouTube-Downloader").

Okay now you see a form. Go to Toolbox:

add:
Code
WebBrowser1 - (Visible = False)
Button1 - Name It: Scan
Button2 - Name It: Download
Button3 - Name It: Exit

Textbox1 (Visible = False) - ( In the TextBox1 type: javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + yt.getConfig('SWF_ARGS')['video_id'] + "&fmt=18&l=" + yt.getConfig('SWF_ARGS')['l'] + "&sk=" + yt.getConfig('SWF_ARGS')['sk'] + '&t=' + yt.getConfig('SWF_ARGS')['t']; )

Textbox2 (Visible = False) - ( In the TextBox2 type: javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + yt.getConfig('SWF_ARGS')['video_id'] + "&fmt=22&l=" + yt.getConfig('SWF_ARGS')['l'] + "&sk=" + yt.getConfig('SWF_ARGS')['sk'] + '&t=' + yt.getConfig('SWF_ARGS')['t']; )

Textbox3 (Visible = False) - ( In the TextBox3 type: javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + yt.getConfig('SWF_ARGS')['video_id'] + "&fmt=35&l=" + yt.getConfig('SWF_ARGS')['l'] + "&sk=" + yt.getConfig('SWF_ARGS')['sk'] + '&t=' + yt.getConfig('SWF_ARGS')['t']; )

TextBox4

Label1 - Name It: Insert YouTube URL Here :

RadioButton1 - Name It: High Quality MP4(H264)

RadioButton2 - Name it: High Definition 1280x720 MP4(H264)

RadioButton3 - Name It: Very Very High Quality FLV(H264)
Picture: [img]http://img43.imageshack.us/img43/4831/testyoutube.jpg[/img]

Right Click > View Code. Or just double click on the form. Now you see a white page with:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
-> Add the source here. <-
End Class

Source Code:

Code
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate(TextBox4.Text)
        Button1.Enabled = False
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If RadioButton1.Checked = True Then
            WebBrowser1.Navigate(TextBox1.Text)
        End If
        If RadioButton2.Checked = True Then
            WebBrowser1.Navigate(TextBox2.Text)
        End If
        If RadioButton3.Checked = True Then
            WebBrowser1.Navigate(TextBox3.Text)
        End If
        Button2.Enabled = False
        Button1.Enabled = True
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        Button2.Enabled = True
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
    End Sub

    Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Show()
    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        End
    End Sub

-------------------------------------------------------------------------------------------------------------------

CREDITS GO TO: XxXKiNgOfUnIvErSXxX on YouTube, for the YouTube-Downloader. Link: http://www.youtube.com/user/XxXKiNgOfUnIvErSXxX and Link to the Tutorial: http://www.youtube.com/watch?v=DpQOII-th...duqsOVxU5w

-------------------------------------------------------------------------------------------------------------------

Video to Music Converter

Lets Start.

Code
1. Open Microsoft Visual Studio 2005/2008/2010 dosent matter what version of them.

Go to: File > New > Project... > Windows Forms Application (Name it "Video to Music Converter").

Okay now you see a form. Go to Toolbox:

add:

Code
Button1 - Name It: Open
Button2 - Name It: Convert
Label1 - Name It: File path :
Label2 - Name It: Convert to :
TextBox1
ComboBox1 - ( Go to Collection and add this:

.MP4
.MP3
.M4A
.WAV
.AVI
.WMV

and click OK

Picture: [img]http://img153.imageshack.us/img153/179/testmusictovideoconvert.jpg[/img]

Now we will add the source code.

Right Click > View Code. Or just double click on the form. Now you see a white page with:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
-> Add the source here. <-
End Class

Source Code:

Code
Public Class Form1

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ComboBox1.SelectedItem = ".MP4"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        OpenFileDialog1.ShowDialog()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If TextBox1.Text = "" Then
            MsgBox("Please select the file you with to convert", MsgBoxStyle.Critical, "Error")
        Else
            Dim type As String = ComboBox1.Text
            MsgBox("The file has sucsessfully been converted into a " & type & " file.", MsgBoxStyle.Information, "Sucsess")
            Dim oldFile As String = Mid(TextBox1.Text, 1, Len(TextBox1.Text) - 4)
            FileCopy(TextBox1.Text, oldFile + type)
        End If
    End Sub

    Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
        TextBox1.Text = OpenFileDialog1.FileName
    End Sub

--------------------------------------------------------------------------------------------------------

CREDITS GO TO: reconrey1292 on Youtube, for the Video to Music Converter. Link: http://www.youtube.com/watch?v=GgDWqGQ-t...xYu06ct7J4

--------------------------------------------------------------------------------------------------------

Hope you like it 🤗 I just wanna share something good with you all!

I have type this tutorial. So Credits go to me, but the project and source codes and the movies goes to XxXKiNgOfUnIvErSXxX and reconrey1292

Thanks.
Can you please use code tags?

But nice tutorial dude.
Awsome Bro ! I'll try this when i have installed Visual Studio!
Thank you all! good that you like it.
Great tut, keep it up.
Thank you all! Good that you like it.
Does the YouTube Downloader still works?
Im sry but this is pure rubbish. Why do you guys always post these "converters" when all this code is actually doing is changing the file extension and in this case its not even doing that.

The code you've written opens a dialog box , allows you to select a file , press convert and you get a message saying the file has been converted. Can you guys not see that it does absolutly nothing else lol

"Im referring to the file converter part"
ITS NOT A CONVERTER LOL
Look in the folder that you have the youtube video in.
Love it! Why you say it's fake ? It's not fake tested it, works 100%
great tut. Thanks for your share. :-)
Your Welcome. Good that you like it.
nice tut :) thx for the source :)
Thanks for the share, but there's no actual conversion going on. All your code does is change the file extension. WMP will still play the video, but the file format will be the same.

[img]http://img267.imageshack.us/img267/5102/nochange.png[/img]



Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by ZeakZNov 17, 2018 09:53 AM 22 818 Nov 17, 2018 09:53 AM
Last Post: ZeakZ
[C#] by DarkN3ss61Dec 9, 2017 11:48 AM 128 12,323 Dec 9, 2017 11:48 AM
Last Post: EduardoEMI
[.NET] by FunctionDevOct 6, 2016 02:48 AM 1 242 Oct 6, 2016 02:48 AM
Last Post: Specs