Skip to content

Instantly share code, notes, and snippets.

@keiya
Created August 17, 2011 23:38
Show Gist options
  • Save keiya/1152929 to your computer and use it in GitHub Desktop.
Save keiya/1152929 to your computer and use it in GitHub Desktop.
youtube downloader
#!/usr/bin/perl
#
# by Keiya Chinen
use strict;
use warnings;
use WWW::YouTube::Download;
my $video_id = shift || die "Usage: $0 [video_id|video_url]";
my $client = WWW::YouTube::Download->new(encode => 'utf8');
$client->download($video_id);
# system("ffmpeg -i $video_id.mp4 -ac 2 -ar 44100 $video_id.wav"); # youtube mp4 to wave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment