youtube-dl Process Video Title to String crashesWhat is the difference between String and string in C#?Redirecting ConsoleOutput containing pseudo-loc (unicode) strings in C#How do you convert a byte array to a hexadecimal string, and vice versa?String representation of an EnumCase insensitive 'Contains(string)'How do I get a consistent byte representation of strings in C# without manually specifying an encoding?externally access processing via cmdRunning Command Line from C# without Window and Getting OutputDownloading YouTube to mp3 and writing metadata (artist/song title) to mp3 file using youtube-dlGit for windows stops working after “verify bundle” inside a process
Tikz intersecting nodes and fit boxes
In MTG, was there ever a five-color deck that worked well?
Is Norway in the Single Market?
How do people drown while wearing a life jacket?
Is a switch from R to Python worth it?
Empty proof as standalone
Astable 555 circuit not oscillating
Lower bound for the number of lattice points on high dimensional spheres
How to handle many times series?
What does Argus Filch specifically do?
What is it exactly about flying a Flyboard across the English channel that made Zapata's thighs burn?
Reasons for using monsters as bioweapons
Why is the Vasa Museum in Stockholm so Popular?
How to win an all out war against ants
In-Cabinet (sink base) electrical box - Metal or Plastic?
Is there a general term for the items in a directory?
When using the Proficiency Dice optional rule, how should they be used in determining a character's Spell Save DC?
Why have both: BJT and FET transistors on IC output?
Generate random number in Unity without class ambiguity
Have you been refused entry into the Federal Republic of Germany?
Is it moral to remove/hide certain parts of a photo, as a photographer?
Polygons crash kernel?
Approximating an expression for a potential
How was the cosmonaut of the Soviet moon mission supposed to get back in the return vehicle?
youtube-dl Process Video Title to String crashes
What is the difference between String and string in C#?Redirecting ConsoleOutput containing pseudo-loc (unicode) strings in C#How do you convert a byte array to a hexadecimal string, and vice versa?String representation of an EnumCase insensitive 'Contains(string)'How do I get a consistent byte representation of strings in C# without manually specifying an encoding?externally access processing via cmdRunning Command Line from C# without Window and Getting OutputDownloading YouTube to mp3 and writing metadata (artist/song title) to mp3 file using youtube-dlGit for windows stops working after “verify bundle” inside a process
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm using Visual Studio 2015, C#, WPF.
I'm trying to run youtube-dl.exe on a video and capture the title to a string
.
I run the command through a using
Process
. It works when running the C#
program in Debug
or Release
mode through Visual Studio, but crashes only when running the compiled exe
by itself, outside of Visual Studio.
The youtube-dl
command also works when copy pasted into cmd.exe
.
youtube-dl --get-filename -o "%(title)s.mp4" https://www.youtube.com/watch?v=TWNhqCHw0qc
string title = string.Empty;
using (Process p = new Process())
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.StandardErrorEncoding = Encoding.UTF8;
p.StartInfo.FileName = "youtube-dl";
p.StartInfo.Arguments = "--get-filename -o "%(title)s" " + "https://www.youtube.com/watch?v=TWNhqCHw0qc";
p.Start();
var output = new List<string>();
while (p.StandardOutput.Peek() > -1)
output.Add(p.StandardOutput.ReadLine());
title = string.Join("", output);
MessageBox.Show(title);
c# wpf youtube-dl
|
show 4 more comments
I'm using Visual Studio 2015, C#, WPF.
I'm trying to run youtube-dl.exe on a video and capture the title to a string
.
I run the command through a using
Process
. It works when running the C#
program in Debug
or Release
mode through Visual Studio, but crashes only when running the compiled exe
by itself, outside of Visual Studio.
The youtube-dl
command also works when copy pasted into cmd.exe
.
youtube-dl --get-filename -o "%(title)s.mp4" https://www.youtube.com/watch?v=TWNhqCHw0qc
string title = string.Empty;
using (Process p = new Process())
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.StandardErrorEncoding = Encoding.UTF8;
p.StartInfo.FileName = "youtube-dl";
p.StartInfo.Arguments = "--get-filename -o "%(title)s" " + "https://www.youtube.com/watch?v=TWNhqCHw0qc";
p.Start();
var output = new List<string>();
while (p.StandardOutput.Peek() > -1)
output.Add(p.StandardOutput.ReadLine());
title = string.Join("", output);
MessageBox.Show(title);
c# wpf youtube-dl
What's the error you get when running your program as a.exe
?
– dcg
Mar 27 at 1:58
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg Do you mean usingyoutube-dl.exe
in the arguments? The program freezes up and windows says not responding.
– Matt McManis
Mar 27 at 2:01
@dcg I put it inside a try/catch, and the Exception saysSystem.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
1
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12
|
show 4 more comments
I'm using Visual Studio 2015, C#, WPF.
I'm trying to run youtube-dl.exe on a video and capture the title to a string
.
I run the command through a using
Process
. It works when running the C#
program in Debug
or Release
mode through Visual Studio, but crashes only when running the compiled exe
by itself, outside of Visual Studio.
The youtube-dl
command also works when copy pasted into cmd.exe
.
youtube-dl --get-filename -o "%(title)s.mp4" https://www.youtube.com/watch?v=TWNhqCHw0qc
string title = string.Empty;
using (Process p = new Process())
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.StandardErrorEncoding = Encoding.UTF8;
p.StartInfo.FileName = "youtube-dl";
p.StartInfo.Arguments = "--get-filename -o "%(title)s" " + "https://www.youtube.com/watch?v=TWNhqCHw0qc";
p.Start();
var output = new List<string>();
while (p.StandardOutput.Peek() > -1)
output.Add(p.StandardOutput.ReadLine());
title = string.Join("", output);
MessageBox.Show(title);
c# wpf youtube-dl
I'm using Visual Studio 2015, C#, WPF.
I'm trying to run youtube-dl.exe on a video and capture the title to a string
.
I run the command through a using
Process
. It works when running the C#
program in Debug
or Release
mode through Visual Studio, but crashes only when running the compiled exe
by itself, outside of Visual Studio.
The youtube-dl
command also works when copy pasted into cmd.exe
.
youtube-dl --get-filename -o "%(title)s.mp4" https://www.youtube.com/watch?v=TWNhqCHw0qc
string title = string.Empty;
using (Process p = new Process())
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.StandardErrorEncoding = Encoding.UTF8;
p.StartInfo.FileName = "youtube-dl";
p.StartInfo.Arguments = "--get-filename -o "%(title)s" " + "https://www.youtube.com/watch?v=TWNhqCHw0qc";
p.Start();
var output = new List<string>();
while (p.StandardOutput.Peek() > -1)
output.Add(p.StandardOutput.ReadLine());
title = string.Join("", output);
MessageBox.Show(title);
c# wpf youtube-dl
c# wpf youtube-dl
edited Mar 27 at 2:00
John
16.4k4 gold badges27 silver badges49 bronze badges
16.4k4 gold badges27 silver badges49 bronze badges
asked Mar 27 at 1:57
Matt McManisMatt McManis
1,6921 gold badge13 silver badges37 bronze badges
1,6921 gold badge13 silver badges37 bronze badges
What's the error you get when running your program as a.exe
?
– dcg
Mar 27 at 1:58
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg Do you mean usingyoutube-dl.exe
in the arguments? The program freezes up and windows says not responding.
– Matt McManis
Mar 27 at 2:01
@dcg I put it inside a try/catch, and the Exception saysSystem.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
1
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12
|
show 4 more comments
What's the error you get when running your program as a.exe
?
– dcg
Mar 27 at 1:58
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg Do you mean usingyoutube-dl.exe
in the arguments? The program freezes up and windows says not responding.
– Matt McManis
Mar 27 at 2:01
@dcg I put it inside a try/catch, and the Exception saysSystem.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
1
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12
What's the error you get when running your program as a
.exe
?– dcg
Mar 27 at 1:58
What's the error you get when running your program as a
.exe
?– dcg
Mar 27 at 1:58
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg Do you mean using
youtube-dl.exe
in the arguments? The program freezes up and windows says not responding.– Matt McManis
Mar 27 at 2:01
@dcg Do you mean using
youtube-dl.exe
in the arguments? The program freezes up and windows says not responding.– Matt McManis
Mar 27 at 2:01
@dcg I put it inside a try/catch, and the Exception says
System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
@dcg I put it inside a try/catch, and the Exception says
System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
1
1
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12
|
show 4 more comments
1 Answer
1
active
oldest
votes
There is command line option:
youtube-dl --encoding UTF8
Worked for me!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368670%2fyoutube-dl-process-video-title-to-string-crashes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is command line option:
youtube-dl --encoding UTF8
Worked for me!
add a comment |
There is command line option:
youtube-dl --encoding UTF8
Worked for me!
add a comment |
There is command line option:
youtube-dl --encoding UTF8
Worked for me!
There is command line option:
youtube-dl --encoding UTF8
Worked for me!
edited Jun 14 at 5:46
Cà phê đen
1,5982 gold badges14 silver badges16 bronze badges
1,5982 gold badges14 silver badges16 bronze badges
answered Jun 14 at 0:18
Mark ZbarjevskyMark Zbarjevsky
12 bronze badges
12 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368670%2fyoutube-dl-process-video-title-to-string-crashes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What's the error you get when running your program as a
.exe
?– dcg
Mar 27 at 1:58
@dcg It gives the same result.
– Matt McManis
Mar 27 at 1:59
@dcg Do you mean using
youtube-dl.exe
in the arguments? The program freezes up and windows says not responding.– Matt McManis
Mar 27 at 2:01
@dcg I put it inside a try/catch, and the Exception says
System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
– Matt McManis
Mar 27 at 2:06
1
You said your app were not responding. I found this thread. Take a look at it. Hope it helps
– dcg
Mar 27 at 2:12