|
Hi!
I'm going to make a video file from images on .NET using Aforge.Video.FFMpeg.dll.
But I have only FFMpeg.dll which compiled on .NET3.5.
I think compile .NET wrapper.
Unfortunately, I couldn't search Aforge.Video.FFMpeg source.
Thanks.
modified 1-Apr-15 6:34am.
|
|
|
|
|
Errm, the source is available here[^]. The FFMPEG is in C++ so you will need to be able to compile C++, but it's available for you to recompile.
|
|
|
|
|
Thanks,
With your selflessly help, I can use FFMpeg.dll on .NET4.5.
|
|
|
|
|
That's great. Congratulations.
|
|
|
|
|
Out of randomness, I updated the library to the latest FFmpeg version. I have it as .NET 4.5.2, but I will gladly do a 4.5 build for you if you want. Do you need MSVC 11 (VS 2012) or MSVC 12 (VS 2013)? Or is either fine?
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hello Friends,
My task is to upload a CSV file into a specified FTP loacation.But the system is throwing time out message from a line of the code. Please help me out on this issue.
Below is the code i use.
public static string UploadFile(string ftpUrl, string userName, string password, string uploadFTPDirectory, string localFilePath)
{
string PureFileName = new FileInfo(localFilePath).Name;
String uploadUrl = String.Format("{0}{1}/{2}", ftpUrl, uploadFTPDirectory, PureFileName);
//String uploadUrl = String.Format("{0}{1}", ftpUrl, uploadFTPDirectory);
FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(uploadUrl);
ftpRequest.Proxy =null;
ftpRequest.Method = WebRequestMethods.Ftp.UploadFile;
ftpRequest.Credentials = new NetworkCredential(userName, password);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = false;
try
{
byte[] fileData = File.ReadAllBytes(localFilePath);
ftpRequest.ContentLength = fileData.Length;
using (Stream fileStream = ftpRequest.GetRequestStream())
{
fileStream.Write(fileData, 0, fileData.Length);
fileStream.Close();
}
using (FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse())----------'Sytem throws the Timed out Message here.'
{
return ftpResponse.StatusDescription;
}
}
catch(WebException e)
{
string s = ((FtpWebResponse)e.Response).StatusDescription;
return s;
}
}
|
|
|
|
|
Have you tried do it manually to make sure that its not the FTP site that is timing out?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Hi Simon,
I tried doing it manually and it and its working fine... But the program is not allowing me to upload the file.
With Thanks and Regards,
Rajeev M Kartha
|
|
|
|
|
i have to create form and connected to the sql server ..
means what are the values given in form it stores in database ,and i gave primary key to id..
when i enter same id value it will shown one popup box.
can you plesase hlep me how to create popup box
|
|
|
|
|
Assuming this is WinForms - which the "create form" implies - a "popup box" is just a form which you are showing using the ShowDialog method:
MyPopup mp = new MyPopup();
mp.ShowDialog(); The form will be displayed, and the code will stop until the user closes it.
Alternatively, you could use a MessageBox:
MessageBox.Show("This is a popup!");
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
I would like to load different web page depending on browser. for example
I have internetexp.aspx and chrome.aspx.
if user browser is chrome it should load chorme.aspx page if other then chrome browser it should load internetexp.aspx.
how can i achieve this?
|
|
|
|
|
Request.Browser[^] which is of type HttpBrowserCapabilities[^] has a property called Browser[^] which you can use to detect the browser that is using the application. From there, you should be able to do a redirect to the specific page depending on what is in the value of that particular property.
Signature construction in progress. Sorry for the inconvenience.
Damn you have the perfect signature - CBadger
|
|
|
|
|
Hi all, my home page accesses a csv file when it loads and populates certain elements on the page with data from the csv file. Right now I have yet to implement authentication so there is no need to login. I tried to see how its performance will be affected by multiple users accessing the csv file simultaneously by hosting this app on my home server and opening the app in multiple tabs in IE.
The page hangs and I had to reset my server each time it hangs. So the question I have is, is opening the same app (copying and pasting the url) in a new tab considered to be using the same session or is it considered to be using a new session.
If the app is hanging due to the same session being used multiple times simultaneously, how do I solve this problem? Thanks for your help.
modified 31-Mar-15 10:22am.
|
|
|
|
|
How are you opening and reading the CSV file? If it's opened without allowing for a shared read all other browser requests will not be filled until the first request closes the file.
Frankly, a CSV file is not a proper data store for a web application because of the very problem you're running into.
One solution is, if the data isn't changing in the CSV file, to read the data once and cache it for future requests.
Another is to just import the data into a database engine and the web app reads it from there.
|
|
|
|
|
Hi Dave, thanks for replying. You said that I can allow shared read of text files. Is this something I can configure on the server? Thanks again for your help.
|
|
|
|
|
You configure it in the code that you use to read the file in. As you haven't shown any of your code for reading in the file contents, we can't be much more help I'm afraid.
|
|
|
|
|
MadDashCoder wrote: Is this something I can configure on the server? No, it would open a can of worms if the admin would have to configure that for each file that the application opens. It is determined by the developer. See MSDN[^].
In short; a CSV file is a text file. Updating it means that it has to be locked, and while it is being updated it cannot be read.
Ideally, you'd replace the CSV file with a (simple) database. I'm using SQLite in those places, as it is easy, free, and available under Linux/Mono.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have some sample code I cannot get to work. I think its because I'm tired. I am trying to send strings from a randomly generated text file. The goal is to find the lowest random # representative string. I have sent the strings as arguments to a method that is supposed to loop through the text file and see if there is a match and when the string is found display it in a rich text file. When I do this with a messagebox it works fine displaying the correct order of argument matches with text string matches in the loop however when I try to send it straight to the textbox it returns the last match. I know this is a silly way to do this but I cannot use an array or assign variables to the # or use an array.
private void smallBtn_Click(object sender, EventArgs e)
{
FindSmall("1"); FindSmall("2"); FindSmall("3"); FindSmall("4"); FindSmall("5"); FindSmall("6"); FindSmall("7"); FindSmall("8"); FindSmall("9"); FindSmall("10"); FindSmall("11"); FindSmall("12"); FindSmall("13"); FindSmall("14"); FindSmall("15"); FindSmall("16"); FindSmall("17"); FindSmall("18"); FindSmall("19"); FindSmall("20"); FindSmall("21"); FindSmall("22"); FindSmall("23"); FindSmall("24"); FindSmall("25"); FindSmall("26"); FindSmall("27"); FindSmall("28"); FindSmall("29"); FindSmall("30");
FindSmall("31"); FindSmall("32"); FindSmall("33"); FindSmall("34"); FindSmall("35"); FindSmall("36"); FindSmall("37"); FindSmall("38"); FindSmall("39"); FindSmall("40");
}
private void FindSmall(string searchKey1)
{<br />
string path = @"C:Random # File.txt";
StreamReader sr = new StreamReader(path);
for (int k = 0; k < 20; k++)
{
if (sr.ReadLine().Equals(searchKey1))
{
richTextBox1.Text = "The smallest Number is: " + searchKey1.ToString();
break;
}
|
|
|
|
|
Well yes - it will.
When you find a solution, it displays it:
richTextBox1.Text = "The smallest Number is: " + searchKey1.ToString(); Which replaces any existing text!
Did you mean:
richTextBox1.Text = "The smallest Number is: " += searchKey1.ToString();
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
well now when I place += it tells me the left side must be a variable or indexer oh well
|
|
|
|
|
I stuck it in the wrong place!
Try:
richTextBox1.Text += "The smallest Number is: " + searchKey1.ToString();
It's the Alzheimer's, I tell you...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
that worked but now its doing this:
The smallest Number is: 2The smallest Number is: 3The smallest Number is: 5The smallest Number is: 8The smallest Number is: 9The smallest Number is: 14The smallest Number is: 16The smallest Number is: 17The smallest Number is: 18The smallest Number is: 22The smallest Number is: 24The smallest Number is: 25The smallest Number is: 31The smallest Number is: 32The smallest Number is: 34
I thought the break statement was to stop the loop?
sorry I had the break out of focus
that worked great thanks for the help I just could not see it. that happens to me after i've been looking at something for a while.
take care
|
|
|
|
|
"I thought the break statement was to stop the loop?"
It does.
But it doesn't stop all the other calls to the same method from outside!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|