-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example for converting to mp3 #83
Conversation
Codecov Report
@@ Coverage Diff @@
## master #83 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 29 29
Branches 6 6
=====================================
Hits 29 29 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
README.md
Outdated
```bash | ||
name=`echo myfilename` && ytdl http://www.youtube.com/watch?v=_HSylqgVYQI > $name.mp4 && ffmpeg -i $name.mp4 -b:a 192K -vn $name.mp3 && rm -rf $name.mp4 | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer this to be placed after the example below, since the example below is the most basic example of how someone would use ytdl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved below the other simpler example.
README.md
Outdated
Download video and convert to mp3 (Requires ffmpeg) | ||
|
||
```bash | ||
name=`echo myfilename` && ytdl http://www.youtube.com/watch?v=_HSylqgVYQI > $name.mp4 && ffmpeg -i $name.mp4 -b:a 192K -vn $name.mp3 && rm -rf $name.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Video can be piped directly into ffmpeg without having to save it to a file and then deleting it
ytdl http://www.youtube.com/watch?v=_HSylqgVYQI | ffmpeg -i pipe:0 -b:a 192K -vn myfile.mp3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the direct pipe example as you provided.
Can you use the title and author name in the filename if you pipe directly to ffmpeg? |
I have updated the branch to reflect the changes you asked for. |
README.md
Outdated
@@ -8,6 +8,8 @@ A youtube downloader written in Javascript. To be used with the command line. If | |||
|
|||
# Usage | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to have these new lines here?
README.md
Outdated
Download video pipe directly intp ffmpeg if you only want the .mp3 file (Requires ffmpeg) | ||
|
||
```bash | ||
name=`echo myfilename` && ytdl http://www.youtube.com/watch?v=_HSylqgVYQI | ffmpeg -i pipe:0 -b:a 192K -vn $name.mp3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most of the time, if people want to convert to mp3, they will want to keep only the mp3 file. I think it's ok to only include this example.
Also, using name
seems superfluous in this case, because it's only used once.
README.md
Outdated
|
||
Fent ([@fent](https://github.com/fent)) | ||
------------------ | ||
* Jesse Spencer ([@Jspenc72](https://github.com/jspenc72)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we use the contributors
field in package.json
https://docs.npmjs.com/files/package.json#people-fields-author-contributors
Add one line example to show how to download video from youtube and convert it to mp3 in a single command with filename set as a variable.