Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 43265a575e9797b42d864ef01106dfe333065175 @fent committed Jul 16, 2012
@@ -0,0 +1 @@
+node_modules
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012 by Roly Fentanes
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,53 @@
+# node-ytdl [![Build Status](https://secure.travis-ci.org/fent/node-ytdl.png)](http://travis-ci.org/fent/node-ytdl)
+
+Yet another youtube downloading module. This time written with only Javascript and a more node-friendly streaming interface.
+
+
+# Usage
+
+```js
+var fs = require('fs');
+var ytdl = require('ytdl');
+
+ytdl('http://www.youtube.com/watch?v=A02s8omM_hI')
+ .pipe(fs.createWriteStream('video.mp4'));
+```
+
+
+# API
+### ytdl(url, options)
+
+Attempts to download a video from the given url. Returns a readable stream. `options` can have the following keys
+
+* `quality` - Video quality to download. Can be an [itag value](http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs) value, `highest`, or `lowest`. Defaults to `highest`.
+* `start` - Where to begin downloading the video in milliseconds or in a time format ie `1m34s`.
+* `filter` - You can give a filtering function that gets called with each format available. Used to decide what format to download.
+
+`options` can also have any [request](https://github.com/mikeal/request) options.
+
+The returned readable stream emits these additional events.
+
+### Event: 'info'
+`function (info, format) { }`
+
+Emitted when the a video's `info` hash is fetched. Along with the chosen format metadata to download.
+
+### ytdl.getInfo(url, callback(err, info))
+
+Use this if you only want to get metainfo from a video. `info` may look like [this](https://gist.github.com/6c8251132e1addb5121e).
+
+
+# Install
+
+ npm install yt
+
+
+# Tests
+Tests are written with [mocha](http://visionmedia.github.com/mocha/)
+
+```bash
+npm test
+```
+
+# License
+MIT
@@ -0,0 +1,223 @@
+module.exports = {
+
+ '5': {
+ container: 'flv'
+ , resolution: '240p'
+ , encoding: 'Sorenson H.283'
+ , profile: null
+ , bitrate: '0.25'
+ , audioEncoding: 'mp3'
+ , audioBitrate: 64
+ }
+
+, '6': {
+ container: 'flv'
+ , resolution: '270p'
+ , encoding: 'Sorenson H.263'
+ , profile: null
+ , bitrate: '0.8'
+ , audioEncoding: 'mp3'
+ , audioBitrate: 64
+ }
+
+, '13': {
+ container: '3gp'
+ , resolution: null
+ , encoding: 'MPEG-4 Visual'
+ , profile: null
+ , bitrate: '0.5'
+ , audioEncoding: 'aac'
+ , audioBitrate: null
+ }
+
+, '17': {
+ container: '3gp'
+ , resolution: '144p'
+ , encoding: 'MPEG-4 Visual'
+ , profile: 'simple'
+ , bitrate: '0.05'
+ , audioEncoding: 'aac'
+ , audioBitrate: 24
+ }
+
+, '18': {
+ container: 'mp4'
+ , resolution: '360p'
+ , encoding: 'H.264'
+ , profile: 'baseline'
+ , bitrate: '0.5'
+ , audioEncoding: 'aac'
+ , audioBitrate: 96
+ }
+
+, '22': {
+ container: 'mp4'
+ , resolution: '720p'
+ , encoding: 'H.264'
+ , profile: 'high'
+ , bitrate: '2-2.9'
+ , audioEncoding: 'aac'
+ , audioBitrate: 152
+ }
+
+, '34': {
+ container: 'flv'
+ , resolution: '360p'
+ , encoding: 'H.264'
+ , profile: 'main'
+ , bitrate: '0.5'
+ , audioEncoding: 'aac'
+ , audioBitrate: 128
+ }
+
+, '35': {
+ container: 'flv'
+ , resolution: '280p'
+ , encoding: 'H.264'
+ , profile: 'main'
+ , bitrate: '0.8-1'
+ , audioEncoding: 'aac'
+ , audioBitrate: 128
+ }
+
+, '36': {
+ container: '3gp'
+ , resolution: '240p'
+ , encoding: 'MPEG-4 Visual'
+ , profile: 'simple'
+ , bitrate: '0.17'
+ , audioEncoding: 'aac'
+ , audioBitrate: 38
+ }
+
+, '37': {
+ container: 'mp4'
+ , resolution: '1080p'
+ , encoding: 'H.264'
+ , profile: 'high'
+ , bitrate: '3-4.3'
+ , audioEncoding: 'aac'
+ , audioBitrate: 152
+ }
+
+, '38': {
+ container: 'mp4'
+ , resolution: '3072p'
+ , encoding: 'H.264'
+ , profile: 'high'
+ , bitrate: '3.5-5'
+ , audioEncoding: 'aac'
+ , audioBitrate: 152
+ }
+
+, '43': {
+ container: 'webm'
+ , resolution: '360p'
+ , encoding: 'VP8'
+ , profile: null
+ , bitrate: '0.5'
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 128
+ }
+
+, '44': {
+ container: 'webm'
+ , resolution: '480p'
+ , encoding: 'VP8'
+ , profile: null
+ , bitrate: '1'
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 128
+ }
+
+, '45': {
+ container: 'webm'
+ , resolution: '720p'
+ , encoding: 'VP8'
+ , profile: null
+ , bitrate: '2'
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 192
+ }
+
+, '46': {
+ container: 'webm'
+ , resolution: '1080p'
+ , encoding: 'vp8'
+ , profile: null
+ , bitrate: null
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 192
+ }
+
+, '82': {
+ container: 'mp4'
+ , resolution: '360p'
+ , encoding: 'H.264'
+ , profile: '3d'
+ , bitrate: '0.5'
+ , audioEncoding: 'aac'
+ , audioBitrate: 96
+ }
+
+, '83': {
+ container: 'mp4'
+ , resolution: '240p'
+ , encoding: 'H.264'
+ , profile: '3d'
+ , bitrate: '0.5'
+ , audioEncoding: 'aac'
+ , audioBitrate: 96
+ }
+
+, '84': {
+ container: 'mp4'
+ , resolution: '720p'
+ , encoding: 'H.264'
+ , profile: '3d'
+ , bitrate: '2-2.9'
+ , audioEncoding: 'aac'
+ , audioBitrate: 152
+ }
+
+, '85': {
+ container: 'mp4'
+ , resolution: '520p'
+ , encoding: 'H.264'
+ , profile: '3d'
+ , bitrate: '2-2.9'
+ , audioEncoding: 'aac'
+ , audioBitrate: 152
+ }
+
+, '100': {
+ container: 'webm'
+ , resolution: '360p'
+ , encoding: 'VP8'
+ , profile: '3d'
+ , bitrate: null
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 128
+ }
+
+, '101': {
+ container: 'webm'
+ , resolution: '360p'
+ , encoding: 'VP8'
+ , profile: '3d'
+ , bitrate: null
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 192
+ }
+
+, '102': {
+ container: 'webm'
+ , resolution: '720p'
+ , encoding: 'VP8'
+ , profile: '3d'
+ , bitrate: null
+ , audioEncoding: 'vorbis'
+ , audioBitrate: 192
+ }
+
+};
Oops, something went wrong.

0 comments on commit 43265a5

Please sign in to comment.