Jump to content

JCMarsh

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

241 profile views

JCMarsh's Achievements

Newbie

Newbie (1/14)

  1. Tried your edit, Cooper, but the caret just shows up in the filename and extension, probably because of the quotes. The quotes got there when I first started with this, when the folder path had some spaces, but I never took them out after moving the working directory. Take out the quotes and it's just like not having the caret. Other than that, no difference. As before, trying to run the batch still fails, but pasting it's contents into a cmd window "in" the folder containing youtube-dl works. I think it's time for a new approach at this.... I think I first need to solve why youtube-dl will only run from a cmd window opened from the directory in which it resides. Then if it still quits with errors I can work on that. So, to get cmd (opened from anywhere) to recognize youtube-dl as a program, should I put youtube-dl (and ffmpeg,ffprobe, etc.) into a windows system folder somewhere, or add the folder they're in to PATH, or something else altogether?
  2. The title and extension strings are there because the output files were saved as "output#" with no extension. Just running youtube-dl {URL} the video would be saved with a proper title and extension, but no dice when making an mp3 from video. Don't know why, but that's what it's been doing to me. The > is not in the batch. I'm having to open cmd "in" the folder where this all resides, so that's just the command prompt smiling at me. Or poking at me. Still not sure about that. I tried fiddling with it some more, pulling out arguments such as no-cache and others, just to see if it would run. Of course that gets nowhere. Still in same boat, but at least it's got oars; what? Well, I can still copy & paste the contents of the bat into the cmd window and it runs fine. Also did some poking around for an extension/plu-in for chrome or "gasp" IE to add urls to the text file. Got close, but couldn't save to a file of my choosing. Also got distracted for a little while with a couple machines today, but at least my workstation is up again, there's no customer equipment on the bench, and I can somewhat more comfortably bang my head against THAT surface when my eyes start bleeding again ;) I'll keep pluggin' away at it. I'll post my findings if I have a "eureka" moment. In the meantime I'll keep my eye on the thread to see if there are any golden nuggets to pick.
  3. Ok, so here's what happens.. Double-click the .bat or drag into the cmd window, I get this... D:\YTDL>youtube-dl --ffmpeg-location "D:\YTDL\ffmpeg\bin" -a input.txt -x --audio-format mp3 --audio-quality 128K -o "D:\YTDL\output\(ext)s" & pause Usage: youtube-dl [OPTIONS] URL [URL...] youtube-dl: error: Cannot download a video and extract audio into the same file! Use "D:\YTDL\output\(ext)s.%(ext)s" instead of "D:\YTDL\output\(ext)s" as the output template Press any key to continue . . . and of course that's a fail. However, if I copy the contents of batch.bat and paste them into cmd, I get this... D:\YTDL>.\youtube-dl --ffmpeg-location "%CD%\ffmpeg\bin" -a input.txt -x --audio-format mp3 --audio-quality 128K -o "%CD%\output\%(title)s.%(ext)s" & pause [youtube] V0aqCYdiIjc: Downloading webpage [youtube] V0aqCYdiIjc: Extracting video information [youtube] V0aqCYdiIjc: Downloading DASH manifest [download] Destination: D:\YTDL\output\Discovering And Enumerating Targets - Metasploit Minute.m4a [download] 100% of 14.63MiB in 00:12 [ffmpeg] Correcting container in "D:\YTDL\output\Discovering And Enumerating Targets - Metasploit Minute.m4a" [ffmpeg] Destination: D:\YTDL\output\Discovering And Enumerating Targets - Metasploit Minute.mp3 Deleting original file D:\YTDL\output\Discovering And Enumerating Targets - Metasploit Minute.m4a (pass -k to keep) Press any key to continue . . . Thanks for your help capturing the output from the failed attempts. Before adding the quotes I would get an error regarding the name of the downloaded and extracted files having same name, IF I tried to run the batch. As above, pasting the batch contents directly to the cmd window did not yield the same. Instead, it worked a treat every time. What I'm most concerned with is getting the batch job to work. I'd love to be able to open a cmd from start/win+r/anywhere and run this, but as of yet I've still got to open cmd "in" the ytdl folder.
  4. Ok, I've been inspired by the Hak5 podcast to give youtube-dl a shot. I've got youtube-dl and ffmpeg on my Win7 machine, and I'm working on a .bat to make it easier to use, but I'm running into errors when I try to run my .bat. Here's the setup: I've put the ffmpeg, youtube-dl, an input text file, and the .bat into a folder called YTDL. Everything works fine if I open a cmd prompt in the YTDL folder and run... .\youtube-dl --ffmpeg-location %CD%\ffmpeg\bin -a input.txt -x --audio-format mp3 --audio-quality 128K -o %CD%\output\%(title)s.%(ext)s It puts the lotion in the basket downloads the video, strips the audio to an .mp3, and deletes the downloaded file. With that working, I thought I'd make a .bat so I don't have to copy and paste the command in, but it just won't work. The cmd window pops open and closes with no indication of what's wrong. It doesn't do anything beyond that. No download, no new file, nothing. If I open a cmd prompt in the folder and call the .bat or drag it in and hit enter, I get the same thing. No difference whether running CMD as admin or normal user. I've built a weekly maintenance batch file that runs without issue, but that was calling programs known natively to windows. I have no other experience to build upon, so I'm at a loss. I'd very much appreciate some help figuring this out so I can check off the practical exercises from my Hak5 lessons :) My question is; what on earth am I doing wrong?
×
×
  • Create New...