Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

anveshvm

@anveshvm
About
Posts
16
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Stopping Process
    A anveshvm

    ffmpeg produces libraries and programs for handling multimedia. We can convert media files into different formats using ffmpeg. It can also record live streams from a camera in different formats. I am attaching the ffmpeg.exe here. https://www.transferbigfiles.com/a3209f95-ffcc-4c82-b722-041a24c26ec1?rid=KsWHbP3Lo/rxGH4YHVVVtA%3d%3d[^] Here in my code i just copy the audio and video codecs of a file (input.avi) into another file(output.avi). Different parameters can be added in this command, but I just consider the basic operation here.

            Process myProcess = new Process();
            myProcess.StartInfo.FileName = @"ffmpeg.exe";
            myProcess.StartInfo.UseShellExecute = false;
            myProcess.StartInfo.RedirectStandardInput = true;
    
            myProcess.StartInfo.Arguments = "-i input.avi -vcodec flv -acodec copy output.flv";
            myProcess.Start();
    
            StreamWriter myStreamWriter = myProcess.StandardInput;
    
            myStreamWriter.Write("113"); //using ascii of q
            myStreamWriter.Flush();
    
            myStreamWriter.Write('q');
            myStreamWriter.Flush();
    
            myStreamWriter.Close();
    
    
            myProcess.WaitForExit();
            myProcess.Close()
    

    ;

    If i run the pgm ( ffmpeg.exe should be placed in same foldr) it starts the conversion from avi to flv. When I press [q] the pgm gets closed gracefully. But I I am not being able to close it by sending 'q' character or its corresponding ascii. :confused:

    C# help com question

  • Stopping Process
    A anveshvm

    Thanx for the reply, Its actually a nice article. But I couldn't solve my issue using it. A carriage return is not necessary for this application to close. Pressing a 'q' itself (from keyboard) will give give graceful end to the program. I need not press an additional enter key. And as an additional step of precaution, I made my own console program which requries a 'q' followed by carriage return to close the application, and it worked fine when I use WriteLine from .NET What might be the issue? Its only for ffmpeg that I can't send input stream to. I am anxious to know what might be the issue?

    C# help com question

  • Stopping Process
    A anveshvm

    I am using FFMPEG for streaming operations. (https://www.transferbigfiles.com/a3209f95-ffcc-4c82-b722-041a24c26ec1?rid=KsWHbP3Lo/rxGH4YHVVVtA%3D%3D) I started it using the following program

            Process myProcess = new Process();
            myProcess.StartInfo.FileName = @"ffmpeg.exe";
            myProcess.StartInfo.UseShellExecute = false;
            myProcess.StartInfo.RedirectStandardInput = true;
    
            myProcess.StartInfo.Arguments = "-i input.avi -vcodec copy -acodec copy output.avi";
            myProcess.Start();
    
            StreamWriter myStreamWriter = myProcess.StandardInput;
    
            myStreamWriter.Write("113"); //using ascii of q
            myStreamWriter.Flush();
    
            myStreamWriter.Write('q');
            myStreamWriter.Flush();
    
            myStreamWriter.Close();
    
    
            myProcess.WaitForExit();
            myProcess.Close();
    

    My intention is to close the program when I send "q" from the program (I meant a graceful exit without making any error). But I can't close it by sending 'q' character or its corresponding ascii. When I run the program from the command line and I press q in the keyboard, program immediately gets closed. Can you pls. help me? Thank you regards anvesh

    C# help com question

  • Table overflows asp panel
    A anveshvm

    Hi I have an asp panel. I am dynamically adding some html tables with 3 rows and columns to it. When the output is shown, the table doesn't fit the panel correctly. It crosses the bottom boundary of the panel. How to solve this? My panel size is 100 * 100 But depending upon the images in the table, the size of panel changes. My code is ---------------- System.Web.UI.WebControls.Panel Panel1; HtmlTable table = new HtmlTable(); - - - - - table.Height = "100%"; table.Width = "100%"; Panel1.Controls.Add(table); ----------------------------------- thanks in advance anvesh

    Web Development html design tutorial question

  • Table vs absolute position
    A anveshvm

    Hi I am fresh to web development. I have seen most of the sites using Table for layout. But I find it rather complex to use tables. Which is actually better? Can you tell the advantage of using the better one? Thanks in advance rgds Anvesh

    Web Development visual-studio question

  • Database Connection
    A anveshvm

    thank you...

    C# database mysql question

  • Database Connection
    A anveshvm

    What about the connection object?? Should I keep the object static for the entire program execution scope. Or should I connect to the database, each time, I have to execute a query?

    C# database mysql question

  • Database Connection
    A anveshvm

    I have a manager class which works as a proxy for connecting to mysql database. I have 2 methods in it, ConnectToDatabase and ExecuteQuery. How should I write the class? Should I make it singleton? Else, if I initiate the class each time, won't it take delay to connect to database?? Thanks in advance Anvesh

    C# database mysql question

  • Converting vc++.net code to c#
    A anveshvm

    "If you use C++/CLI, you can use it directly by including necessary files into your managed class." If I wrap with C++/CLI can I call the functions from asp.net ??

    ASP.NET csharp question c++ database mysql

  • Converting vc++.net code to c#
    A anveshvm

    Hi I have a desktop application written using VC++.NET. Majority of the code in it is written for manipulating a MySQL database. I am planning to migrate the desktop application to a Web application. So will I be able to use the existing VC++.NET code for it? If not, how can I convert it to C#? Is there any good free tools for conversion? rgds Anvesh

    ASP.NET csharp question c++ database mysql

  • How to return value from a thread
    A anveshvm

    How can I return value from a thread?? Thanks in advance Anvesh

    C# question tutorial

  • How to check availability of internet connection
    A anveshvm

    Thank you Luc Pattyn.... I will try that way. :)

    Managed C++/CLI database sysadmin mysql json tutorial

  • How to check availability of internet connection
    A anveshvm

    Thank you very much..... Can you pls tell me how to set the time limit when starting a new thread. Can you also suggest the most suited class to do this? I mean whether it is backgroundworker, threadpool or thread class?

    Managed C++/CLI database sysadmin mysql json tutorial

  • How to check the return value of a messagebox
    A anveshvm

    Yeah.... I got it.... Thanks alot

    Managed C++/CLI sysadmin help tutorial

  • How to check availability of internet connection
    A anveshvm

    Hi I have an SQL query which is to be executed from the server. Just before executing, I am checking if the internet is available or not. I am using InternetGetConnectedState api to implement this. But this call returns true, for 2-3 seconds after the network connection is lost. This causes the application to hang. Pls verify my code and check if it is the appropriate code --------------------------------------------------- [DllImport("wininet.dll", SetLastError=true,CharSet=CharSet::Unicode,ExactSpelling=true, CallingConvention=CallingConvention::StdCall)] static bool InternetGetConnectedState(int &Description, int ReservedValue ) ; bool IsConnectedToInternet() { int Desc ; return InternetGetConnectedState(Desc, 0 ) ; } if (IsConnectedToInternet()) { mysql_query(mysqlConnectorObject,sqlQuery); return mysql_store_result(mysqlConnectorObject); } else { MessageBox::Show("Not connected"); } ---------------------------------------------------- Thanks in advance Anvesh

    Managed C++/CLI database sysadmin mysql json tutorial

  • How to check the return value of a messagebox
    A anveshvm

    I have written a code to check the return value of a message box. But it doesn't work . My code is -------------------------------------- DialogResult^ res = MessageBox::Show("Network connection failed.,"Error in connection",MessageBoxButtons::RetryCancel,MessageBoxIcon::Warning,MessageBoxDefaultButton::Button1); if (res == System::Windows::Forms::DialogResult::Cancel) { Application::Exit(); } else if (res == System::Windows::Forms::DialogResult::Retry) { continue; } --------------------------------------------------------- Here both the if condition fails... In immediate window, the value of res is {...} Pls check it Thanks in advance Anvesh

    Managed C++/CLI sysadmin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups