Introducing py-videodownloader

py-videodownloader is a python script which allows for the downloading of videos from the major online providers of streaming video. Currently it supports only YouTube and Vimeo but is modularized so adding other services is fairly simple. It is based off of the py-youtube-downloader script written by chexov.

To use, run the script with a target provider and the video ID you wish to download:

$ ./video-downloader.py -p Vimeo 5720832
$ ./video-downloader.py -p YouTube tgbNymZ7vqY

The above two commands will download one video from both Vimeo and YouTube. Since both videos are available in HD we can pass the respective arguments to download the Vimeo video in 720 and the YouTube video in 1080p:

$ ./video-downloader.py -p Vimeo -f hd 5720832
$ ./video-downloader.py -p YouTube -f 37 tgbNymZ7vqY

You may optionally pass an output directory with the -d or --directory argument. For a list of formats for a specified provider run the command without any video IDs:

$ ./video-downloader.py -p YouTube
video-downloader-1.1.0 - by Jake Wharton <jakewharton@gmail.com>

Format     Description
---------- ----------------------------------------
13         176x144 3GP/AMR Mono 3GP
17         176x144 3GP/AAC Mono 3GP
22         1280x720 H.264/AAC Stereo MP4
18         480x360/480x270 H.264/AAC Stereo MP4
37         1920x1080 H.264/AAC Stereo MP4
35         640x480/640x360 H.264/AAC Stereo FLV
34         320x240 H.264/AAC Stereo FLV
5          320x240 H.263/MP3 Mono FLV
6          320x240 H.263/MP3 Mono FLV

The source code for the script as well as download links are available via the GitHub project page.

Continue reading » · Rating: · Written on: 04-04-10 · No Comments »

What the near future holds…

A bunch of my projects are at large “in between” stages. Here is what the near future holds for them:

SMSMorse

This is the app that got me my developer seeded Nexus One so it gets the first revamping. I have just begun rewriting this from scratch as an exercise to get back in to Android development and to resolve some issues which were brought to light since its release. The development is all open source so more contributions on the GitHub project are always welcome. Coming in this 2.0 will be features such as message start warning, initial vibration delay, multiple morse code dictionary support, and not vibrating while in-call.

SMSBarrage

Banned from the Android market on the cusp of 10,000 downloads and rapidly approaching 2,500 from here this app is definitely in need of a 2.0. A popular teaser shot was posted way back in the day showing advanced features such as multiple simultaneous barrages, scheduled barrages, and drafts but development was never completed due to the lack of a device to test it on. Easily the most useful app (read: mischevous) app I have it too will be given high priority for completion. It also goes faster with development assistance

SMSPoll

Two teaser shots as well as a teaser video were shown for this a long time ago but fell to the same fate as SMSBarrage 2.0 did. Today I discovered Handy Poll which has striking resemblance to my app (though was released many months later). Having not yet had a chance to play with Handy Poll I can’t say as to how it compares but I still would like to continue development on this, albeit at a much lower priority. The source exists on GitHub, as with everything else.

jQValidate

In the middle of a 2.0 rewrite to remove the jQuery UI dependency and is nearly complete once a few minor issues are resolved. Expect to see this within a month or two at the most.

jQTinyTable

Writing this for integration at my work and as it started out dependent on jQuery UI it too must be retooled to work without it. Most likely will be developed alongside but slightly behind jQValidate so two to three months should see a full 1.0 release.

mkvdts2ac3

python rewrite to mitigate inconsistencies between platforms has started and it is just about to a working bare-bones state. Post-1.0 features will be ported to the future branch as time permits but as I no longer use this script and the current version works just fine it will be lowest priority. However, as this natively supports two major features the 1.x versions lack, multiple file and multiple track support, it will not be forgotten. Expect the 2.0 sometime over the summer.

py-video-downloader

This is a python script/library I am writing which allows for the downloading of videos off of YouTube, Vimeo, and any other site (provided you write a small plugin) for use in a small side project. It has gone to 1.0 but is very rudimentary in supporting only certain resolutions per platform. It requires only a few hours tweaking to be a full, world-ready release. Expect within April.

jakewharton.com

WordPress is not the platform for me. I’ll be developing a more project oriented site over the summer with a focus on easier discovery and access to information for each. I do believe Django will be the framework of choice with a wholly custom layout and a few custom Django apps as well. The static layout mockup is nearly complete so porting to a template and then integrating the necessary Django apps will start soon.

Continue reading » · Rating: · Written on: 03-30-10 · 2 Comments »

Automatic GitHub Hook Puller for Easy Deployment

In developing websites I would often find myself committing to its git repository, pushing to GitHub, and then SSH-ing to the web host and manually triggering a pull. While being very tedious it sufficed to get the job done. For months I had vowed to employ GitHub’s post-receive hooks to automatically pull in changes on the deployment location. Well, I finally got around to it: http://gist.github.com/228427

Deploying this is as easy as putting this in hookpuller.py, updating the branches dictionary, running chmod 770 hookpuller.py, and protecting it with simple authentication credentials.

Then in your GitHub project go to the “Service Hooks” sub-page under the “Admin” section and enter the URL to the script.
post-receive-hook

Now whenever you push to GitHub your changes will be instantly pulled onto your deployment server.

Continue reading » · Rating: · Written on: 11-06-09 · No Comments »

DXVA/Awesome Compliant Checker

Checking an encode for DXVA compliance or the much more strict Awesome compliance has involved checking the MediaInfo output for up to 16 different settings. While most encoders understand these settings, a lot of end-users and potential uploaders do not. It is for this reason that I have created a pyy-based web application which automatically parses MediaInfo outputs and checks all these rules.

You can find the working version of it running at http://awesome.jakewharton.com/. Simply paste the text output from MediaInfo of any media file which you wish to check against DXVA or Awesome rules and submit. It will show you a green box if it is compliant and a red box if it is not. It will also list all the settings which violate the rules at the bottom.

As with most of my projects, the source is available on GitHub here and any contribution is welcome.

Update: JSON and XML requests can now be served via http://awesome.jakewharton.com/json/ and http://awesome.jakewharton.com/xml/, respectively. The MediaInfo text should be POSTed in ‘mediainfo’ and include ‘is_animation’ to denote the encode is animated. You can view example responses here.

Continue reading » · Rating: · Written on: 07-11-09 · No Comments »

Python Import Trickery

The use of 3rd party packages (i.e. through git submodules) you might run into an instance where a package requires a library that is not installed. If you use a 3rd party hosting solution and cannot modify your main installation there is an easy trick to aid in making these missing libraries importable.
Continue reading…

Continue reading » · Rating: · Written on: 07-07-09 · 1 Comment »