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

Cannot download yt video with csharp #15051

Closed
botiapa opened this issue Dec 21, 2017 · 1 comment
Closed

Cannot download yt video with csharp #15051

botiapa opened this issue Dec 21, 2017 · 1 comment
Labels

Comments

@botiapa
Copy link

@botiapa botiapa commented Dec 21, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.12.14. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.12.14

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

I'm trying to download a youtube video with csharp. My code is really simple, I will post it below. Basically it creates a new process, reads the standard output, and closes. Now, my problem is that it doesn't download anything and doesn't output anything. I tried the same code with different commands like ping, ipconfig and it worked. The method I run it in is async.

My code:

var info = new ProcessStartInfo();
            info.FileName = "cmd";
            info.Arguments = "/c " + "-x -o \"E:\\VisualStudio_Projects\\LemonBOT\\LemonBOT\\bin\\Debug\\downloads\\% (title)s.% (ext)s\" https://www.youtube.com/watch?v=XDwOt_KO5gk --audio-format mp3 --print-traffic";
info.CreateNoWindow = true;
info.UseShellExecute = false;
info.RedirectStandardOutput = true;
info.CreateNoWindow = true;

var proc = new Process();
proc.StartInfo = info;
proc.Start();
string result = proc.StandardOutput.ReadToEnd();
// Display the command output.
Console.WriteLine(result);
Console.Read();

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 22, 2017

Obviously you are doing something wrong.

@dstftw dstftw closed this Dec 22, 2017
@dstftw dstftw added the invalid label Dec 22, 2017
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
2 participants
You can’t perform that action at this time.