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;








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);









share|improve this question


























  • 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

















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);









share|improve this question


























  • 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













0












0








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);









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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

















  • 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
















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












1 Answer
1






active

oldest

votes


















0














There is command line option:



youtube-dl --encoding UTF8 


Worked for me!






share|improve this answer


























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    There is command line option:



    youtube-dl --encoding UTF8 


    Worked for me!






    share|improve this answer































      0














      There is command line option:



      youtube-dl --encoding UTF8 


      Worked for me!






      share|improve this answer





























        0












        0








        0







        There is command line option:



        youtube-dl --encoding UTF8 


        Worked for me!






        share|improve this answer















        There is command line option:



        youtube-dl --encoding UTF8 


        Worked for me!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        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





















            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.



















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현