Comments (7)
Funny thing:
I found ### How do I download a video starting with a -
? in their FAQ (https://github.com/rg3/youtube-dl#how-do-i-download-a-video-starting-with-a---)
and it says this:
Either prepend http://www.youtube.com/watch?v=
or separate the ID from the options with --
:
youtube-dl -- -wNyEUrxzFU
youtube-dl "http://www.youtube.com/watch?v=-wNyEUrxzFU"
I think I'll ask them in the IRC if they really don't see a different solution.
from mumbledj.
Ooh, good find! What happens if you just use the existing command and put
quotes around the ID?
On Feb 19, 2015 8:51 PM, "y7x" [email protected] wrote:
Hi,
When I !add https://www.youtube.com/watch?v=-w-58hQ9dLk, I get the "The
audio download for this video failed. YouTube has likely not generated the
audio files for this video yet. Skipping to the next song!" error message.The problem seems to be that youtube-dl doesn't recognise video IDs that
start with a -.
youtube-dl -w-58hQ9dLk doesn't work because it confuses the ID with a
command line option.
The audio files definitely exist on youtube.youtube-dl "ytsearch:'-w-58hQ9dLk'" doesn't find any results either, so
it looks like youtube-dl can't handle it when we only give it a video ID
which starts with a -.I worked around it for now by changing line 83 in song.go from
cmd := exec.Command("youtube-dl", "--output",
fmt.Sprintf(~/.mumbledj/songs/%s.m4a
, s.youtubeId), "--format", "m4a",
s.youtubeId)
to
cmd := exec.Command("youtube-dl", "--output",
fmt.Sprintf(~/.mumbledj/songs/%s.m4a
, s.youtubeId), "--format", "m4a",
fmt.Sprintf(https://www.youtube.com/watch?v=%s
, s.youtubeId))It works of course if you do youtube-dl -- -w-58hQ9dLk or use the whole
URL for example, but I don't think you or the youtube-dl devs want to have
to handle such cases manually (if possible).Thought I'd let you know of this. Do you think the youtube-dl devs would
like to know about this issue or am I missing some obvious solution to this
problem?—
Reply to this email directly or view it on GitHub
#46.
from mumbledj.
Then it's just youtube-dl "-w-58hQ9dLk"
and produces the same error output:
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: no such option: --
still recognised as command line option "w-58hQ9dLk" which youtube-dl obviously doesn't have.
edit: and if you mean putting quotes around s.youtubeId
on line 83: that doesn't work since it then always puts literally "s.youtubeId" as ID into the command.
from mumbledj.
Huh, that's strange. I don't think that's supposed to happen. Maybe submit
an issue for youtube-dl?
On Feb 19, 2015 9:22 PM, "y7x" [email protected] wrote:
Then it's just youtube-dl "-w-58hQ9dLk"
and produces the same error output:Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: you must provide at least one URL
still recognised as command line option "w-58hQ9dLk" which youtube-dl
obviously doesn't have.—
Reply to this email directly or view it on GitHub
#46 (comment)
.
from mumbledj.
I'll do that then.
from mumbledj.
This is simply standard practice on how command line flag are parsed; I think youtube-dl does the right thing here.
MumbleDJ can be easily modified so all video IDs are accepted:
cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf(`~/.mumbledj/songs/%s.m4a`, s.youtubeId), "--format", "m4a", "--", s.youtubeId)
from mumbledj.
@bontibon: I was going to do exactly that. Just haven't gotten to it yet. :)
from mumbledj.
Related Issues (20)
- The audio download for this video failed. <the video> has likely not generated the audio files for this track yet. HOT 2
- Problem with youtube links HOT 2
- panic: runtime error: slice bounds out of range HOT 10
- Pine64 config file and command arguments ignored. HOT 9
- Bot crashed after mumble restart HOT 4
- [Feature Request] Default Playlist File HOT 3
- Queue not playing next songs and bot partially responding to commands HOT 17
- Disconnecting right after connecting HOT 15
- Soundcloud plays only the first song HOT 2
- [error] - certificate signed by unknown authority HOT 3
- configuration file set to avconv not looking for avconv HOT 6
- Question about server certificates. HOT 5
- Go Panic HOT 2
- Go Panic (second edition) HOT 4
- Skip feature HOT 2
- Continuous playback/loop feature HOT 1
- Go panic (unknown edition) HOT 3
- Go Panic (dual edition)
- Support For MultiUser Environments HOT 1
- MumbleDJ will not take commands or read configs (intel based system) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mumbledj.