Make your own Youtube automator!

headspin

Regular Member
Joined
Jun 3, 2008
Messages
237
Reaction score
155
I've been busy the last week or so building an app to download a set of videos of youtube, watermark, and re-upload with given title, description, etc.

Surprisingly, it's not that hard once you know what APIs to use. In case anyone else wants to try the same thing, here's how the process goes for one video (how to adapt it for several is obvious):

1) Download video: This is easy. It's just about replacing some stuff in the URL. Google "vb .net download youtube video" and you'll see just how easy this is. If you look on planet-source-code.com, some guy even posted a full working version of a youtube downloader which I copied and used.

2) Decoding FLV: ffmpeg works wonders, even under Windows. Find the version that's compiled into one 6MB exe file with no external dependencies. Again, Google "download ffmpeg.exe" and it should come up.

3) Watermarking FLV: This took me a while because ffmpeg's vhook is a pain in the a$$ to get working with cygwin. So I gave up on it and chose to use AviSynth instead. I kicked myself when I realized how easy it was to create an AVS file and dynamically modify it in runtime. And you can feed the AVS file directly to ffmpeg to convert the unwatermarked file to a watermarked video.

Note: On my machine this whole thing will only work if you encode the FLV to WMV format. MPG leaves out the sound and AVI crashes ffmpeg. I still have no idea why and I don't care since WMV works just as well.

4) Re-uploading: Use the Y0utube Data API. It's VERY straightforward to use, although you have to be careful with all the formatting requirements for the description and keyword tags (especially keywords) or you'll get some very frustrating 400 errors.

The great thing about the Y0utube Data API is that you can also use it to search for videos by keyword and order by most viewed etc, so you can automatically select which videos to download, which saves a lot of time.

.NET also makes it easy to switch between proxies , although I haven't coded this yet because there's nothing bannable about my videos (apart from the blatant copyright infringement :D).
 
Did you also code increasing rating and favorite?
 
They're both really easy to do actually. You can either use the Google Data API with proxies (there is a proxy object exposed at the interface level of the YoutubeService class), or you can simply look at the source code of a youtube video page and you'll realize that to forge an HTTP request for a rating/favorite isn't that hard. Just remember to use proxies.
 
You have no idea how badly I wish I understood what you're talking about.

N
 
They're both really easy to do actually. You can either use the Google Data API with proxies (there is a proxy object exposed at the interface level of the YoutubeService class), or you can simply look at the source code of a youtube video page and you'll realize that to forge an HTTP request for a rating/favorite isn't that hard. Just remember to use proxies.

Yes it's easy to do this. Do you code in .net ?
 
Yes it's easy to do this. Do you code in .net ?

Yeah. I do all of my desktop coding in VB .NET and my web coding in PHP. If I needed something really specific that couldn't be done in .NET, I'd code it in C++ or assembly, but that's never happened yet.
 
Yeah. I do all of my desktop coding in VB .NET and my web coding in PHP. If I needed something really specific that couldn't be done in .NET, I'd code it in C++ or assembly, but that's never happened yet.

Yes .net rocks but i'm using c# java and c++ syntax.
 
Last edited:
Lolz same here! Can anyone make it sound easier for both of us :p

Learn a .NET language and it WILL sound easy.

I am working now on a VB .NET programming class that I hope I will be able to teach here in October. You can find it at

hxxp://www.blackhatworld.com/blackhat-seo/general-programming-chat/20722-thinking-starting-bh-programming-class.html
 
As they say......one man's food is another man's poison. I re-read it about 10 times and I still understand nuts :o Sorry dude, I kinda sense you are on to something great here but is it possible to explain it in layman terms :rolleyes:??? Thanks in advance! :p
 
As they say......one man's food is another man's poison. I re-read it about 10 times and I still understand nuts :o Sorry dude, I kinda sense you are on to something great here but is it possible to explain it in layman terms :rolleyes:??? Thanks in advance! :p

The post is intended for programmers, so you probably won't get much out of it if you don't have at least some basic knowledge of a programming language.

If I can sum the method up in a few words: download video as flv, use ffmpeg to convert it to wmv, use AviSynth to add watermark, use ffmpeg to save the watermarked video, and use the Google Data API to re-upload it.

You can always hire a freelancer to do the programming for you. This method should be a ride in the park for any professional.
 
Back
Top