Skip to content
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 patterns to --restrict-filenames for less character replacements #3665

Closed
pricejn2 opened this issue Sep 2, 2014 · 6 comments
Closed

Add patterns to --restrict-filenames for less character replacements #3665

pricejn2 opened this issue Sep 2, 2014 · 6 comments

Comments

@pricejn2
Copy link

@pricejn2 pricejn2 commented Sep 2, 2014

I use --restrict-filenames almost always, but have no need to replace spaces with underscores. Perhaps this could be done by implementing a replacement template similar to the -o output template?

@phihag
Copy link
Contributor

@phihag phihag commented Sep 2, 2014

Why do you use --restrict-filenames in the first place? I see a lot of people cargo-culting this option, so I'm quite hesitant to promote or even extend it.

@pricejn2
Copy link
Author

@pricejn2 pricejn2 commented Sep 2, 2014

I've got a few unresolved issues with multiple os, international file names, and irregular characters under php that I haven't been able to work around but that aren't actually related to youtube-dl.

This would be a nice feature, but I understand if you're going the deprecation route rather than enhancement.

@l3uddz
Copy link

@l3uddz l3uddz commented Sep 3, 2014

Restrict-filenames is a very important parameter, would be a great shame if it was removed.. I do feel that it would be beneficial to be able to tell restrict-filenames to allow certain characters like spaces, brackets and & etc...

@phihag
Copy link
Contributor

@phihag phihag commented Sep 3, 2014

@l3uddz Instead of telling me that it "is a very important parameter", can you elaborate why you are passing it in in the first place? @pricejn2 Hinted at problems with OS configurations, but even that should be a thing of the past on a modern Unix system, where UTF-8 should be in use everywhere.

@l3uddz
Copy link

@l3uddz l3uddz commented Sep 3, 2014

Sure, this might make things a little clearer at-least as to why its important to me...

D:\Documents\youtube>youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=uBC2ns0rxNw
[youtube] Setting language
[youtube] Confirming age
[youtube] uBC2ns0rxNw: Downloading webpage
[youtube] uBC2ns0rxNw: Downloading video info webpage
[youtube] uBC2ns0rxNw: Extracting video information
[download] Destination: ►1 HOUR DUBSTEP_DRUMSTEP JUNE 2014◄ ?( ???)?-uBC2ns0rxNw
.m4a
[download] 100% of 57.24MiB in 02:12
ERROR: WARNING: unable to obtain file audio codec with ffprobe

D:\Documents\youtube>youtube-dl --extract-audio --audio-format mp3 --restrict-filenames https://www.youtube.com/watch?v=uBC2ns0rxNw
[youtube] Setting language
[youtube] Confirming age
[youtube] uBC2ns0rxNw: Downloading webpage
[youtube] uBC2ns0rxNw: Downloading video info webpage
[youtube] uBC2ns0rxNw: Extracting video information
[download] Destination: 1_HOUR_DUBSTEP_DRUMSTEP_JUNE_2014-uBC2ns0rxNw.m4a
[download] 100% of 57.24MiB in 02:05
[ffmpeg] Destination: 1_HOUR_DUBSTEP_DRUMSTEP_JUNE_2014-uBC2ns0rxNw.mp3
Deleting original file 1_HOUR_DUBSTEP_DRUMSTEP_JUNE_2014-uBC2ns0rxNw.m4a (pass -
k to keep)

@phihag
Copy link
Contributor

@phihag phihag commented Sep 3, 2014

That's why I'm hesitant to promote or keep --restrict-filenames - it looks like your problem is simply a malfunction of youtube-dl/ffprobe on Windows we didn't know about, so we should fix that instead of applying a bandaid.

@pricejn2 pricejn2 closed this Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.