Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have to make a program for my project i.e. downloading YouTube videos and converting it to different formats. i cant find the right source to study or get my work started! can you please tell me the source where i can learn about downloading a video and converting it, in java or c# so i can start my work....
plz help!
Posted
Comments
joshrduncan2012 13-Nov-12 10:21am    
Have you tried googling for it?
werfog 13-Nov-12 10:34am    
Try to fill in search box in upper right corner of this page with ffmpeg.
I wish you every success.

The problem is not downloading. The only problem with YouTube is extracting the URI for downloading from the page where you can watch the video. You need to search for the recipe on the Web — the trouble is, youtube.com changes the structure from time to time, so you need to get fresh information, try it out manually, make sure it works right now and then implement it in your code. Make sure it's flexible enough, because you may need to change the algorithm later, so better make it data-driven/rule-driven. The algorithm itself if always trivial: you have a video watching page, then you find some URI or video ID on this page using certain search criteria, extract data on video ID, compose new URI out of this data, and later use this URI for downloading.

Downloading: please see my complete and ready-to-use application. It's important feature is the possibility to continue downloading of the partially downloaded resource. Here:
how to download a file from internet[^].

For some more information, please see my past answers:
FTP: Download Files[^],
how to download a file from the server in Asp.net 2.0[^],
How to get the data from another site[^],
get specific data from web page[^].

Conversion:
http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

Alternatively:
http://en.wikipedia.org/wiki/VideoLAN[^],
http://www.videolan.org/[^].

All the products listed above are open-source, so, you can either use the applications directly (think System.Process.Start with redirection on StandardOutput/StandardError; you will find the samples on the MSDN help pages on this class), embed the code in your code (think P/Invoke or intermediate C++/CLI mixed-mode library, or JNI) or translate the algorithms in the language you want to use.

—SA
 
Share this answer
 
v2
If you can't start it without finding source that does it, that's not programming. You can download a video just like any other file. There's tons of samples on the web for how to download and upload files via a HTTP request. Then, the conversion is more complex, but there's tons of tools you could automate to do that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900