How to convert AVI to 3gp in C#? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Is it possible to convert an AVI file to 3gp in C# ? If so how could I do this? Any ideas will be appreciated, thanks in advance.

It depends what you mean by "convert". Both 3GP and AVI are wrapper formats, so are you merely trying to change the container format, or do you want to re-encode the streams as well?
Either way, you should probably take a look at ffmpeg (Windows info). For simple cases (i.e. you have the file, want a single output file), you should probably consider it invoking it on the command-line (i.e. System.Diagnostics.Process), which is much easier (and doesn't involve any licensing issues). If you want to access libavcodec/libavormat programatically, I highly recommend skipping any .NET wrapper libs (they all are in different states of sucking; Tao being the best but that's not saying much) and instead writing a C++/CLI wrapper. I started doing this, and once I got my head around data marshalling, etc., and figured out how to build it (Part 1, Part 2), it wasn't too hard.

There is no really easy way to do it; my advice is to use ffmpeg, either through the use of a C# wrapper of by calling it externally. There seem to be several C# wrappers for ffmpeg (like this one) but they all seem to be in various stages of development and not really usable. Your only option is likely going to be by calling it externally.

Related

Calling another language with MQL5 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to scan an economic calendar (and in a second step possibly a news source) like this one for use in MetaTrader/MQL5. I guess I would need another programming language than MQL5 for that, possibly (but not necessarily) C#? (How) can it be done in principle?
Thank you very much in advance!
You can check whether you can access that web page through WebRequest() function available in MT4/5. Alternative way is to write a DLL (or to find one) and access the link above through the REST api (but it doesnt make sense as WebRequest provides it) or somehow else. The easiest way is to check all calendars you may find (myfxbook, mt5.com, fxfactory) and find the easiest page to parse with MT5 methods, then try to collect data and process it. If your skills include some other languages, it might make sense to collect data with REST and then parse it with Jsoup/soup/beautiful-soup (the library that is designed for your language) - that will help with tests (to clear the data faster), and WebRequest() for live.

How to share data between programs that use different languages to run [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to share data between programs that run locally which uses different languages, I don't know how to approach this.
For example, if I have a program that uses C# to run and another that uses python to run, and I want to share some strings between the two, how can I do it?
I thought about using sockets for this but I'm not sure that this is the right approach, I also thought about saving the data in a file, then reading the file from the other program, but, it might even be worse than using sockets.
Note that I need to share strings almost a thousand times between the programs
There are a lot of ways to do so, I would recommend you reading more about IPC (Inter Process Communication) - sockets, pipes, named pipes, shared memory and etc...
Each method has it's own advantages, therefore, you need to think about what you're trying to achieve and choose the method that fits you the best.
Any kind of IPC (InterProcess Communication) — sockets or shared memory. Any common format — plain text files or structured, JSON, e.g. Or a database.

can i write an Autosave plugin for microsoft windows notepad? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I use notepad for writing daily notes.some times when system gets restarted by accidentally, I loose my content.
So my question is"can I write an auto-save plugin for notepad" ?
Please let me know if I can write an auto-save plugin for Notepad using C#.NET.
I know about Notepad++ but I want to use notepad only.
Thanks in Advance.
There is no direct way of doing this because NotePad is a separate application and you don't have its code. Even if you did have the code, I'm highly sure it wouldn't be in a .NET-based language.
There is an alternate though. You could recreate entire NotePad from scratch in .NET. Believe me it won't take more than a couple hours for a guy who knows his tools (someone out there might already have done that). Then you can add any new features at your choice.
Yet another way would be hooking into NotePad's low-level messages through Platform calls and trying to somehow inject your features into it, but that's something I'm not an expert at and that would probably take more effort/expertise than writing your own NotePad from scratch.

Making UI for console application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET.
Have a look at curses:
e.g.:
http://sourceforge.net/projects/curses-sharp/
That would be based on a very simple framework which writes directly to the video to draw the underlying shadows, drop down menus, etc, not alone that, since 'Edit.com` would be written in assembler for speed in relation to drawing, this is quite ancient by today's standards, you can however take a look at PDCurses which will enable you to do this kind of thing.
The neat beauty is, PDCurses is compatible with the unix equivalent of Curses.
But, really, today, it is all about GUI and Windows....
What kind of application are you trying to do?
IIRC, from my old days, there was an object orientated framework for this using TurboVision, which has a port available with open source now, see this wikipedia entry on this TurboVision.
Today, console applications are either old DOS applications emulated more and less in Windows, or command-line interpreters.
Anyway, if you really want to do an editor, use the System.Console class in the System NameSpace and use the SetCursorPosition method to write what you want where you want
The edit.com window you are showing appear to be developed with Turbo Vision, an old console gui library written by Borland many years ago.
Borland put the software in public domain and release its C++ sources. There is also a porting to Pascal, developed by the community, called Free Vision.
Unfortunately ,I don't think there is a porting or a wrapper to dot.net, so you have to write your own. Or, at least, you can look at the sources to get inspired...

Using Java-classes with C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a project written in Java (>1.5).
Is it possible to write parts of the project with C#?
For instance the GUI and calling the methods and instantiate the classes written in java?
If yes, how?
I am author of jni4net, open source intraprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.
Not without something like ikvm - or using web services etc to communicate between the two sides. Basically it's likely to be much more work than either rewriting your existing project code in C# or writing the GUI in Java.
There is something called Java Language Conversion Assistant for .NET. You can convert your Java classes to c# and start coding.
There is also something called JNBridge (not free).
It seems like my solution is very limited. and apply only to specific version of java.
I probably will stay with old good C :) Can't imagine how to work without shared libraries :)
This document explain how to create a dll from java and use it in C code. I'm not C# or java expert but i'm sure that you can load external dll's in C# as well. So not a complete solution but good starting point, IMHO.
Generally dll it's a perfect way to mixing languages.
In simple way you can pack your java classes to jar file then
In C# use Process class for execute and map IO stream
I did some research on this a few years ago (2005 I believe) and I liked JNBridgePro as the best third party product to do this. Check it out here http://www.jnbridge.com/
Good luck!

Categories