Log in

View Full Version : MeXgui cross platform Megui port in development


Pages : [1] 2

Jeroi
4th November 2013, 16:56
Project details:

This is project to port .NET C# MeGUI (WIN only) into QT C++ native WIN/UNIX/OSX operating systems support as well as include new features. Project welcomes all developers to join the porting effort.

Website: MeXgui (http://mexgui.wordpress.com/)

Talk: #mexgui @freenode.net (irc://irc.freenode.net/mexgui)

Eye candy:

Windows Vista looks NOFILE and VIDEOPREVIEW:

http://but.fi/t/2hy (http://but.fi/2hy) http://but.fi/t/2hz (http://but.fi/2hz)

Donate:

3% goes to beneficial aid.

https://pledgie.com/campaigns/22683.png?skin_name=chrome (https://pledgie.com/campaigns/22683)

LoRd_MuldeR
4th November 2013, 17:12
Just one side note: Shouldn't the original MeGUI run on *nix systems thanks to the Mono runtime?

(Of course one would have to replace all the "external" tools with Linux/MacOS compiles)

Jeroi
4th November 2013, 17:28
Just one side note: Shouldn't the original MeGUI run on *nix systems thanks to the Mono runtime?

(Of course one would have to replace all the "external" tools with Linux/MacOS compiles)

Well theory it might but is hard, because Megui uses some windows spesifig code and ways to display and encode video. We need to fall using only libavcodec, libmkv, libmp4 and such which can rely on cross encoding the way like handbrake does transcoding with libavcodec. I can see that we can pretty easilly obtain x264 presests from Megui project and things like encoding prosesses from handbrake and so on.

Also Megui uses avisynth where MeXgui should use both Avxsynth and Avisynth. One great advantage with QT is that it is native code for every platform and you should be able to expect the program work where it is build. I gives option to port code to the weird systems also :D. Another creat feature of QT4 is Phonon, which is native videoplayer widget so we can have easilly video preview nativelly to all systems.


Lots to do still :D

Jeroi
4th November 2013, 20:54
I have made design choice. I will do instead of how megui does job controlling with SQLlite. This will be an easy method for adding and deleting queve and so on.

Selur
5th November 2013, 13:49
Small question: Why Avxsnyth and not Vapoursynth instead? (Is Avxsynth even still developed?)
Also will there be a Qt project file so that one can simple use Qt Creator as development IDE?

Another creat feature of QT4 is Phonon, which is native videoplayer widget so we can have easilly video preview nativelly to all systems.
Nice, I'm looking forward to read that code. :) Last time I tried that, I ended up frustrated and switched back to mplayer in slave mode as cross-platform back-end.

ultim
5th November 2013, 14:21
Small question: Why Avxsnyth and not Vapoursynth instead? (Is Avxsynth even still developed?)


Avisynth+ will be coming to Linux too.

Jeroi
5th November 2013, 15:49
Small question: Why Avxsnyth and not Vapoursynth instead? (Is Avxsynth even still developed?)
Also will there be a Qt project file so that one can simple use Qt Creator as development IDE?



Nice, I'm looking forward to read that code. :) Last time I tried that, I ended up frustrated and switched back to mplayer in slave mode as cross-platform back-end.

No there is only QT4 desinger UI file for main form. All the code for it atm is hand written. I have no QT project file made as I did not feel that necessary for it, I shall take a look into it.

Do please join #mexgui irc chan at freenode to talk about it.

At this moment I am mainly creating variants of megui .net forms to QT forms. If anyone know .net form to QT form generator please advice me and make the work a lot faster.

I have added basic sql functions to create database, open, insert table, insert row, delete and such but theres still much doing.

I have considered to do the forms first and then move to the coding prosess but if the project gets contributors at code base then project starts ongoing a lot faster.

Jeroi
5th November 2013, 16:39
Ok I made now QT project file and cleaned the repo from unnecessary files.

Jeroi
5th November 2013, 20:58
Some updates: Mexgui basic gui dialog "done" only tool bar missing and then prolly some configure to it more later on. x264 dialog tab1, tab2 done...

qyot27
6th November 2013, 01:04
Small question: Why Avxsnyth and not Vapoursynth instead? (Is Avxsynth even still developed?)
If the AviSynth support is written correctly (read: dynamically loading the library itself), then there's little reason not to include support for AvxSynth. The amount of code deviation to support both of them is pretty small. Just look at x264 and FFmpeg - as a totally unscientific guess, I'd estimate that 85-90% of the codepaths for AviSynth vs. AvxSynth in x264's input/avs.c and FFmpeg's libavformat/avisynth.c are identical. If you go in and actually quantify the line count differences it might actually be even higher.



The only other general thing I'd recommend is to use mpv rather than mencoder. There's very few things that mpv can't do that mencoder can, but mpv is actively developed (and some of those things can be covered by regular ffmpeg).

Selur
6th November 2013, 12:38
The only other general thing I'd recommend is to use mpv rather than mencoder.
1st time I hear of mpv, looks interesting,.. is there some way to get a title<>mpls mapping for blu-ray playback? (I normally know the mpls I want to playback and not the mplayer title)

Jeroi
6th November 2013, 17:21
Now x246 config dialog is completed. For one who wants to start importing gui code can now have x264 also implemented in the code.

Edit1:
Now also neroAAC configure dialog done.

Edit2:
Now also Audio configure dialog done which is used for mp3.

Jeroi
6th November 2013, 23:22
BIG news. I have succesfully converted all C# code from whole Megui project to C++ with good reputation program. Now project is migrated to C++ and any more misses QT gui dialogs and dialog controlling code changes and other c# to c++ porting code.

Jeroi
7th November 2013, 17:11
I am aware that project file is down atm begause I migrated all the cpp files and moved files and so on in the git. Stay tuned.

Jeroi
7th November 2013, 17:38
Now the trunk has project file. In future if you want edit something type in aplication folder: qmake -project. Also all project files added to lips and wrappers.

Sorry for incovensies if you have branced old trunk url. The new url is changed in first post.

Monarc
7th November 2013, 17:47
Another creat feature of QT4 is Phonon, which is native videoplayer widget so we can have easilly video preview nativelly to all systems.

Qt adopted Phonon at Qt 4.4. Support will remain for the Qt 4.x series, but not for Qt 5. http://qt-project.org/doc/qt-5.1/qtmultimedia/changes.html (http://qt-project.org/doc/qt-5.1/qtmultimedia/changes.html)

sl1pkn07
7th November 2013, 22:33
phonon works with qt5 http://www.phoronix.com/scan.php?page=news_item&px=MTUwNDM

Jeroi
8th November 2013, 00:43
I am modifying atm avisynth wrapper. Lots needed for changing the dll structure. Firstly qt dont use stdcalls. You define functions showing outside into dll header and combiler handles all calling correctly for every system...

Also finding all M$ code takes time, debugger used a lot for this :D

Also since this is going to be cross platfrom program I am cosidering to build those dll as statics to include in binary so that we need to build only one time the lib and then just build binary 3 times.

qyot27
9th November 2013, 06:12
1st time I hear of mpv, looks interesting,.. is there some way to get a title<>mpls mapping for blu-ray playback? (I normally know the mpls I want to playback and not the mplayer title)
If I'm not misunderstanding either the question or mpv's documentation, this seems to be what TOOLS/mpv_identify.sh (in the source tree) is meant for. I've never used that script nor have I ever really done anything with libbluray support since I only have access to one computer with a BD-ROM drive. I've only built libbluray to make sure it builds and can link to FFmpeg and mpv.

Jeroi
9th November 2013, 17:29
Selur: Are you planning to join development? It would be nice to have more develpoers and also someone who is expert with QT to provide assistant.

Jeroi
9th November 2013, 22:01
I have started a job with the website and it currently introduces wordpress in free account at wordpress.com

Selur
11th November 2013, 09:10
Are you planning to join development?
Nope, not enough time, already got a hobby project.

greatdanton
12th November 2013, 07:09
What a wonderful project!

handaimaoh
15th November 2013, 04:46
OMG qt5.1 has removed phonon and added some other medialayer protocol which means basically that I need to write my player again...

Yes, and Monarc told you on the first page that they removed it in 5.1. He even posted the link to the qt-project.org page about it.

Qt adopted Phonon at Qt 4.4. Support will remain for the Qt 4.x series, but not for Qt 5. http://qt-project.org/doc/qt-5.1/qtmultimedia/changes.html (http://qt-project.org/doc/qt-5.1/qtmultimedia/changes.html)

Jeroi
21st November 2013, 18:22
I have started to look Megui code and boy it looks good. They use standard c++ datatypes rather than microsoft __int datatypes and it really seams that only thing to do is to make all these new qt gui forms same name, same invidual textbox names and so on. Then the orginal code should work from QT forms instantly. How ever some new coding needs to be done since in unix we do not need to download new version libraries automatically since all the files are kept updated with package manager natively. In windows tho the megui download system should be kept.

Selur
23rd November 2013, 15:42
a. Using Qt 5.1.1 and Qt Creator what should be build-able using the VSC++ compiler? (tried a few .pro files and set my normal build settings but everything I tried threw errors)
b. Why is there a 'build-Phonoplayer-Desktop_Qt_4_8_1_in_PATH_System-Debug'-folder? moc_*-files? *.user-Files?

Jeroi
23rd November 2013, 16:00
a. Using Qt 5.1.1 and Qt Creator what should be build-able using the VSC++ compiler? (tried a few .pro files and set my normal build settings but everything I tried threw errors)
b. Why is there a 'build-Phonoplayer-Desktop_Qt_4_8_1_in_PATH_System-Debug'-folder? moc_*-files? *.user-Files?

Had bad config on windows Qt creator it made those folders while debugging. And yes, no building anything atm, code is not ported to native c++ yet. It is converter code that has replaced some functions with c++ version and so on but any qt dialogs are not implemented at the code yet. Code porting has not started and the code misses all visual studio gui files, only gui file code there which should be proted to qt ui files.

Atm core/gui/ folder is about all forms with some chages, orginal forms are split into separate files what I thinks the reason is to generate settings dialog on the fly with the code. So some things need to adjust a bit.

And no qt 5.1 I will use Qt4.8 because Phonon support that makes videoplayer so easy to code. The mediasource lib in QT5 [...] compared to phonon.

Jeroi
23rd November 2013, 18:37
Moved/moving the project information to the website and more free talk in there about this project. And this means that I have made there development status thread that will get all status updates. I don't post them here anymore because I don't live in Russia and we have free speech law in our country which prevents some calling names to others but other way free speech.

Jeroi
8th December 2013, 16:54
I added new project images.

I am adding main layout support for preview video and editor. No longer additional editor and preview windows and they are implemented directly to main window. This means you can open any kind of video to encode and if not avs file the editor is empty and when you add scripting to editor the open file will be changed to filename.avs and video is reopened when you click back to preview tab. This also means that you will get picture update always when switching from editor to preview and video is updated always.

Enjoy the image candys.

Another announce is that Editor will be supporting Qscintilla and that said, the editor is written from scratch for MeXgui. This means the editor will have AVS syntax highlighting. Later it will have an option to use Vapoursynth scritp instead and thus having Python highlight also.

Edit:
Until someone comes to say that what about 720p or 1080p material I will answer here:

By default they are scaled down to NTSC resolution for obivous reasons. The PreviewEditor will support tab detaching. That said you can detach the video player tab and move it into another screen and resize the player as you want. PreviewEditor will support double click fullscreen.

djcj
6th January 2014, 17:55
Hi! I'm the guy who originally requested the multi-platform support on sourceforge. It's great to see you're still working on this project. I wish I could contribute with coding but all I can do is a bit shell scripting. Maybe I could test the app on Linux to see how it works and report bugs.

How ever some new coding needs to be done since in unix we do not need to download new version libraries automatically since all the files are kept updated with package manager natively.
Does this only apply to the typical system packages like qt4 and libphonon4, or will MeXgui also use tools like ffmpeg, x264 and lame installed on the system, rather than downloading them from its own repo?

And do you plan to add fdk-aac, maybe even if MeGUI won't do it?

Jeroi
8th January 2014, 18:11
Hi! I'm the guy who originally requested the multi-platform support on sourceforge. It's great to see you're still working on this project. I wish I could contribute with coding but all I can do is a bit shell scripting. Maybe I could test the app on Linux to see how it works and report bugs.


Does this only apply to the typical system packages like qt4 and libphonon4, or will MeXgui also use tools like ffmpeg, x264 and lame installed on the system, rather than downloading them from its own repo?

And do you plan to add fdk-aac, maybe even if MeGUI won't do it?

Hello, yes MeXgui shall use every codec installed by pacgake manager through phohon for playpack and for encoding some encoder plugins like ffdshow. Also when this program matures that far that it can be downloaded from package manager then it will automatically install additional packages.

djcj
11th January 2014, 00:51
I hope the Linux community will help you and create packages of your project for each distribution. I know a few things about creating Debian packages (for Ubuntu), but unfortunately not how to create a PPA (maybe I'll find out).

Another question: Would it be difficult to port MeGUI's bitrate calculator to a small standalone Qt application? I'm thinking of something like "Bitrate calculator by philippe734" (https://sourceforge.net/projects/bitratecalc/) which unfortunately is written in visual basic and therefore useless outside of Windows. It might run perfectly with wine, but I prefer native solutions.

Selur
16th January 2014, 14:43
Would it be difficult to port MeGUI's bitrate calculator to a small standalone Qt application?
no, it isn't difficult.

djcj
8th February 2014, 16:31
I did some testing and I couldn't really get avxsynth nor vapoursynth to work on Ubuntu. In the end I think the easiest and most reliable solution to get a working frameserver on any GNU/Linux distribution (and possibly OSX too?) is to use a script which automatically installs a pre-configured avisynth 32 bits wine prefix into the user's home folder. I wrote such a script and it works fine. To avoid license problems the archive containing the prefix comes without vcrun6sp6, instead the script downloads and installs it afterwards, which works automatically too. If I knew how MeGUI runs avisynth without needing to install it into the system directories, I might be able to get it to work on wine without a seperate prefix folder.

By the way, is this project still alive or already dead?

Jeroi
10th February 2014, 12:43
By the way, is this project still alive or already dead?

It's active but I have done vacation for 3 weeks and now moving little by little to new house and some electric work needed for our adsl wall sockets and so on. Life is pain at some point.

Jeroi
12th April 2014, 23:15
I added now Development branch to the Github that has at the moment video loading and previeweditor playback somewhat working but in development atm. When I get playback done I will get to see how to implement avisynth video loading. This is the next stage. Ofcourse someone who is expert with C++ and Qt can always give help on this project.

Jeroi
15th April 2014, 17:11
Slowly getting there. I have made desing choice to convert all std::strings and maps and vectors with Qt similar methods. Also unsigned long longs and long longs and such going with QT variants. I know some one may prefer c++ orginals but atleast qt communty prefers to chose qt datastream to make sure that variables are always same in every platform. And since they are default datastream so it is easier to look the code when all datatypes are named equally. At the moment I am replacing the MainGUi with QT gui. Atleast copying all the methods in orginal mainform.h to equalient qt mainform.h keeping namespace and all method names as same for supporting method files. Also need to remove some functions as they are M$ forms spesifig methods and such.

Earlier yesterday I converted quite many files to native qt files already but chosed today to make full project scale name overides to make editing a bit faster. It looks to me that there is very little work needed to done, mainly if someone knows object method in C# and how to handle those types in C++ Qt would be nice.

Here is reference for object: http://msdn.microsoft.com/en-us/library/9kkx3h3c.aspx

Currently I have drafted linux support to box. I want to first make this work in windows, compiled with mingw32 and when the orginal megui is running then probably start to take a look about the avisynth portability. Since it then could be compiled in windows with qt, it could be able to combile in Linux too, but thats then another topic.

Jeroi
18th April 2014, 12:34
I have starting to have good crasp on form converting. The Creator way is to make ui file with contains all ui classes which are included with ui_classname.h. Then Need to copy the class names from gui class.h constructor and set exact same class names for components. Then this form code can be deleted form the constructutor as in Creator you can reference qui elements with ui->classname->dosomething. Also intializesintances function can be removed and disposing function can be used to propacate some custom exit code.

All and all when gui class is edited it has far less code than orginal thus having the form code in own file all together. What makes this project interesting is that quite many time you need to go and read C# references to understand how to implement same in Qt. Makes you learn both languages in same time :)

Addtionally I have renamed all MeGUI.core..... names into default names. Also putting ui files in folder called forms to separate them from main gui headers and implementation. NameSpace is now renamed into MeXgui and things start to look nice. I am now implementing smaller dialogs to Qt version as there is much less work than with MainForm :D. Also a good place to start handling QDialogs and how to handle them.

Jeroi
29th April 2014, 17:21
I will soon publish my current development status. For it I shall now say that I have implemented sclitedatabse for jobs, some video codecs and for audio codecs settings. I haven't done xml parser script and any databse movement yet as I am focusing at the moment in the text editor that is mostly complete. It has all the basic funtionalitys for avs editing:


Line numbers
Identication
AVS syntax coloring
AVS autocompletation
Cut/copy/paste
Search and Replace
New/Save/Save As
Undo/Redo
Video update
Drag'n'Drop


Main layout is somewhat working at the moment and it includes videoplayer detaching and using at separate screen. Basically videoplayer is tied always to Preview editor child so when preview editor is killed even the separater videoplayer will be killed and the encoder remains. Detaching work with doubleclick and when closing player it well move back to the PreviewEditor widget where it stays at default.

Then I am doing video opening with lates ffmpeg libraries and using Qpainter to draw the images to the videoPlayer srceern. Basically I will use either QFFmpegDecoder or QtAV to open files. Basically ffmpeg should support Avisynth opening in windows/linux so no additinal code need for separate avisynth opening. This makes life easier. For encoding the first encoder shall be naturally ffmpeg that supports all platforms and then when time moves forward I shall add separate encoders as well. I shall be using QFFmepgEncoder lib to encode.

Any help is would be always nice to have.

Jeroi
30th April 2014, 08:59
Another nice feature where I was part on adding AVS lexer to the QScintilla project. The latest snapshot now includes experimental Highlevel AVS syntax coloring and completation support.

Usage:

#INCLUDE <Qsci/QsciScintilla.h>
#INCLUDE <Qsci/QsciLexerAVS.h>
QsciLexerAVS avs = new QsciLexerAVS;
QScintilla * textEditor = new QScintilla(this);
textEditor->setLexer(avs);

Happy days for avisynth!

foxyshadis
2nd May 2014, 23:34
Would you like to have this moved to the MPEG-4 GUI section, where it would get a lot more attention, or is it fine here until it's ready?

Jeroi
3rd May 2014, 11:11
This is still in early development, no encoding yet, sql database almoust complete, gui sql parser not done yet and only gui handling and text editor (some bugs with search and replace with Qscintilla still) is done. Video player needs rewrite but I think I delay it a bit and focus next qui functionalities with sql database. Also why it takes so much time is that mostly I am doing all new version using Qt and code pretty much with the gui needs rewrite with sql from scratch.

If you feel that this project would get more view there then move it. Always getting help to make MeGui crossplatform clone would be very nice. Especially someone with more experience dealing with avisynth would be very good help for this project.

Guest
3rd May 2014, 13:45
Until it is usable it should stay here. People go to the GUIs forum to find working solutions. Good luck with your project.

Jeroi
7th May 2014, 20:36
Here is nice peek for my changes for queve. Queve is renamed as Encoder since input is separate tab which makes encoder jobs. Another big change is removing current workers implementation and using threads spinbox to define how many threads user wants yo use for encoding. Also the start end mechanism will allocate new threads if new line is selected and started. You can then start as many encodings as you want without thread spinbox altering. When you will define threads like 4 then encoder makes 4 encoding jobs concurrent but you can start new ones with starter. Any other changes you could see as improvement?

http://but.fi/t/2sp (http://but.fi/2sp)

I found one improvement again, I removed tablewidget and instead using treeview widget. Since MeXgui handles passes and audio and muxing separately it' is nice to have them subfoldered as a jobproject. So Jobs are listed as complete jobs and can be expanded to view subjobs for the jobproject. This way one single jobproject does not take too much space on the list and more separate job projects can be seen in the default view height.

While I was thinking improvements to this one big improvement hit on my mind. I am always looking a good batch prosessor for many files. So I may incorportate in future batch projects to this. This would be like batch prosess a folder and select profile and queve all. So if you are anime maker you could do three avs projects and then run batch importer and make general setup for all videos and instantly get encoder to display the jobs.

Edit:

I now decided to separate encoder from main gui to own widget form so that it has it's own class implementation and separate headers. Makes debugging more easier. Here is screenshot with tree widget in action:

http://but.fi/t/2sr (http://but.fi/2sr)

And must say, I have done now first xml importer script that uses batch import from many files the xml reader srcipt was awful pain to write. Imaging one single line with sql and like 40 lines with xml. Thats the difference in api's.

Jeroi
9th May 2014, 14:44
Here is some sample code how nice Qt is to handle sql data. This is sample image of globals.h which defines all global things like defines, variables, data structs which various gui and classes need to operate:

http://but.fi/t/2sz (http://but.fi/2sz)

Here you can see that I setup global memeory allocation to allocate some space in memory while program is running. It has profiles, jobs and SQL databse id defines visble to help SQL functions to store right id's when storing/updating data. Dont mind about the videoProfile, it is copy of audioProfile atm and since I think 2 video profile structs for mpeg4 and x264 and maybe x265 later on. Also those current profiles are not declared as extern yet in this image.

How ever you can see That QList<datatype> is nice method getting SQL tables sorted in a list of structs. You can then acces all the data with list[0].name and so on where 0 is list position where first struct is and then name repsenet struct variable that holds some data.

microchip8
9th May 2014, 15:32
Here is some sample code how nice Qt is to handle sql data. This is sample image of globals.h which defines all global things like defines, variables, data structs which various gui and classes need to operate:

http://but.fi/t/2sz (http://but.fi/2sz)

Here you can see that I setup global memeory allocation to allocate some space in memory while program is running. It has profiles, jobs and SQL databse id defines visble to help SQL functions to store right id's when storing/updating data. Dont mind about the videoProfile, it is copy of audioProfile atm and since I think 2 video profile structs for mpeg4 and x264 and maybe x265 later on. Also those current profiles are not declared as extern yet in this image.

How ever you can see That QList<datatype> is nice method getting SQL tables sorted in a list of structs. You can then acces all the data with list[0].name and so on where 0 is list position where first struct is and then name repsenet struct variable that holds some data.

Funny that you use Windows to develop an app for Linux/UNIX :D

LoRd_MuldeR
9th May 2014, 15:39
Funny that you use Windows to develop an app for Linux/UNIX :D

I think the goal of this project is to create a cross-platform (Windows, Linux, OS X, etc) port/rewrite of MeGUI, not specifically a Linux/Unix one ;)

So, ideally, it should run equally well on all supported platforms. And it shouldn't matter which platform is used for development...

Jeroi
9th May 2014, 15:54
I think the goal of this project is to create a cross-platform (Windows, Linux, OS X, etc) port/rewrite of MeGUI, not specifically a Linux/Unix one ;)

So, ideally, it should run equally well on all supported platforms. And it shouldn't matter which platform is used for development...

Yes you can develop this project in windows, OsX, Linux with QtCreator. The easiest method is unix based osses since you can download qt5-sdk which includes Qt creator pre build with gnu.

You need qscintilla and ffmpeg atm with current develop files. Qscintilla needed to build from source. FFmpeg that has avisynth support build and dev files

Jeroi
9th May 2014, 16:17
Few fundamentals, I think making public structs for gui is good idea to handle gui updating and such. But for tasks like jobs, if there is is 100 jobs in a memory, it starts to take toll in memory. So would direct sql fetching be more better method for jobs?

What do you think?

I mean when encoder starts to encode, it fetches next available job data from sql database and process it. This would be more Functional aproach to data handling rather than Object oriented.

Edit:

I see now that public Qlists are stupid thing, I can fetch the list in a function and print the text to boxes. I use only memory when running the function to print data to gui. Updater can run the function again and again to fetct new stuff added to db.

Jeroi
9th May 2014, 16:59
Here is my changes to gui:

http://but.fi/t/2t0 (http://but.fi/2t0)

What do you guys like?