Author Topic: An easy way to make a simple gui?  (Read 11223 times)

Offline amgeex

  • Member
  • Posts: 10
    • View Profile
An easy way to make a simple gui?
« on: December 13, 2009, 05:47:23 PM »
Well, meGUI was my gui of choice until it started to crap out, so now I want to make a replacement 'cause none of the current gui's out there are nice. I know how to program, but I'm too lazy, so could anyone recommend a really easy way to build a gui?

Offline Dark Shikari

  • x264 developer
  • Administrator
  • Member
  • *****
  • Posts: 650
    • View Profile
Re: An easy way to make a simple gui?
« Reply #1 on: December 13, 2009, 05:51:58 PM »
Don't we already have an absurd number of "simple" GUIs?  There's even that new Micro GUI by buzzq that just came out.

Offline neuron2

  • Member
  • Posts: 5
    • View Profile
Re: An easy way to make a simple gui?
« Reply #2 on: December 13, 2009, 05:52:28 PM »
There's no easy way to make a GUI.

Don't give up on Megui. Zathor at Doom9 is releasing versions that support the new parameters of x264 and which fix bugs. I've been working with him to support DG tools.

Also, you have a few new simple GUI's, such as Lord_MuldeR's simple GUI.

Offline Mixer

  • Member
  • Posts: 14
    • View Profile
Re: An easy way to make a simple gui?
« Reply #3 on: December 13, 2009, 09:45:54 PM »
I really like Xvid4PSP even though its not hosted at Doom9, perhaps its an acquired tasted but I tried MeGUI, Staxrip and Xvid4PSP and its the one I have stuck with.  I love the results I get from it.

Offline nakTT

  • Member
  • Posts: 37
    • View Profile
Re: An easy way to make a simple gui?
« Reply #4 on: December 13, 2009, 10:15:35 PM »
There's no easy way to make a GUI.

Don't give up on Megui. Zathor at Doom9 is releasing versions that support the new parameters of x264 and which fix bugs. I've been working with him to support DG tools.

Also, you have a few new simple GUI's, such as Lord_MuldeR's simple GUI.
Agree. Perhaps people should give MeGUI (patched version) another try. So far it has been well maintained after a long development freeze (before patched version).

Offline Zarxrax

  • Member
  • Posts: 8
    • View Profile
Re: An easy way to make a simple gui?
« Reply #5 on: December 14, 2009, 09:00:57 AM »
There's no easy way to make a GUI.
Seriously? I don't know jack about programming, and I've made my own gui in Visual Studio. It's very easy, I think. It really just depends on how much you need it to do.

But yea, there are already tons of guis out there. It's hard to believe that none of them meet your needs.

Offline amgeex

  • Member
  • Posts: 10
    • View Profile
Re: An easy way to make a simple gui?
« Reply #6 on: December 14, 2009, 10:24:44 AM »
None of them except meGUI. Anyway I tried the patched version and so far is working well, thanks for mentioning it I wasn't aware of it. I guess we can close this thread now.  ;D

Offline sumawo13

  • Member
  • Posts: 4
    • View Profile
Re: An easy way to make a simple gui?
« Reply #7 on: December 14, 2009, 08:59:12 PM »
I've pretty much given up on GUIs and have since fallen back on writing batch files.

My problem is that too many of them want to generate an Avisynth script for me, but I write them myself, so ideally the encoder would just load my script and give me access to the settings of x264/NeroAacEnc/etc.

Offline Emess

  • Member
  • Posts: 27
    • View Profile
Re: An easy way to make a simple gui?
« Reply #8 on: December 15, 2009, 02:26:28 AM »
sx264 is decent although the latest builds have somwhat confusing option names. It also doesn't support x264 presets and tunings currently, however you can override the CLI. It has a decent job system and doesn't force you to use avisynth, and it uses Qt so it works on loonix/BSD/OSX/windows/whatever. With the new presets and tunings in x264 though I don't see why a GUI is needed at all.

Offline Kurtnoise

  • Member
  • Posts: 30
    • View Profile
Re: An easy way to make a simple gui?
« Reply #9 on: December 15, 2009, 04:15:48 AM »
There's no easy way to make a GUI.
that's pretty wrong nowadays...it's clearly easy.

With the new presets and tunings in x264 though I don't see why a GUI is needed at all.
+1...GUIs are required today for devices as output target. it's not that easy.
« Last Edit: December 15, 2009, 04:18:07 AM by Kurtnoise »

Offline JEEB

  • fushizenなDTVエンコーダー
  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
    • Yet Another x264 Builder
Re: An easy way to make a simple gui?
« Reply #10 on: December 15, 2009, 04:27:04 AM »
+1...GUIs are required today for devices as output target. it's not that easy.
Agreed completely, encoding to hardware devices is usually so limited (PSP f.ex.) that making a GUI that's easy to use but still does stuff properly is not that hard. Or well, making a GUI is always somewhat hard, but that's more of a design / usage testing kind of an issue.

And yeah, with things like PyQT etc., GUIs can be rather easily done.

Offline Forteen88

  • Member
  • Posts: 47
  • Didée-fan!
    • View Profile
Re: An easy way to make a simple gui?
« Reply #11 on: December 16, 2009, 07:55:03 AM »
And yeah, with things like PyQT etc., GUIs can be rather easily done.
And wxWidgets. Personally I mostly only use GUI's (like MeGUI) for the bitrate-calculator.

Offline elguaxo

  • Member
  • Posts: 11
    • View Profile
Re: An easy way to make a simple gui?
« Reply #12 on: December 16, 2009, 08:09:48 AM »
I mostly only use GUI's (like MeGUI) for the bitrate-calculator.

the only reason why I haven't uninstalled MeGUI is the bitrate calculator.  :D

Offline MaxBlack

  • Member
  • Posts: 41
    • View Profile
Re: An easy way to make a simple gui?
« Reply #13 on: December 16, 2009, 08:43:29 AM »
I too use cmd/bat files, but like RipBot to do my bitrate calcs (only). I also have a spreadsheet for multi-episode projects.

All of the GUIs I've seen are either too complex (MeGUI) or too author-focussed (RipBot) though I used to use StaxRip years ago and have been thinking to give that one another try.

Offline prOnorama

  • Member
  • Posts: 20
    • View Profile
Re: An easy way to make a simple gui?
« Reply #14 on: December 16, 2009, 08:59:25 AM »
the only reason why I haven't uninstalled MeGUI is the bitrate calculator.  :D


Yeah me too, because I haven't found a better bitrate calculator. Actually I'm a bit surprised there isn't a better one available, but I guess it's not a very challenging project for programmers and most people use the bitrate calculators from the main encoding apps. Hopefully someone can make a "standalone version" of the MeGUI bitrate calculator or a new up to date one.



Offline amgeex

  • Member
  • Posts: 10
    • View Profile
Re: An easy way to make a simple gui?
« Reply #15 on: December 16, 2009, 09:46:08 AM »
Anyone knows how to make a bitrate calculator? Like the math behind it and stuff like that, if someone helps me out I can make one in my free time.  ;D

Offline theholyduck

  • Member
  • Posts: 4
    • View Profile
Re: An easy way to make a simple gui?
« Reply #16 on: December 16, 2009, 10:08:56 AM »
filesize = audiobitrate*audiolenght + videobitrate*videolenght + container overhead, subtitles, fonts and whatever else you want

Offline amgeex

  • Member
  • Posts: 10
    • View Profile
Re: An easy way to make a simple gui?
« Reply #17 on: December 16, 2009, 10:10:18 AM »
I got the source from the megui bitrate calculator that someone else extracted in vb code, I'm studying it right now, gonna work on that today and see what happens. I'll keep you guys posted.

Update 1: Gui layout done on Qt Creator (nice ide by the way), I am now trying to figure out the vb code and implementing a class on my C++ code...
« Last Edit: December 16, 2009, 04:06:37 PM by amgeex »

Offline prOnorama

  • Member
  • Posts: 20
    • View Profile
Re: An easy way to make a simple gui?
« Reply #18 on: December 16, 2009, 12:33:42 PM »
Sweet! Hope you can figure it out.

Offline Bill

  • Member
  • Posts: 17
    • View Profile
Re: An easy way to make a simple gui?
« Reply #19 on: December 16, 2009, 05:01:10 PM »
I know how to program,..., so could anyone recommend a really easy way to build a gui?

How to build a dumb x264 GUI:
  • Parse x264 --fullhelp for sections (eg. Frame-type options), options (eg. --b-pyramid), parameter types (eg. string), defaults (eg. none), and anything else that's relevant to the functionality of x264 (like supported output types (.mp4, etc.)). Everything else that's non-functional would be a tooltip.
  • Assign a 1-to-1 mapping between options and GUI elements.
    Eg.                  _______
    [ ] --b-pyramid |none__|

    [ ] is a check-box.  When checked, the option, with the value in the input box, will be used when x264 is called.
    --b-pyramid is a label representing the x264 option, with a tooltip that contains its x264 --fullhelp description.
    |none__| is an input box for options having inputs.

Points to note:
  • This GUI simply replaces "typing options in CLI" with "clicking check-boxes next to x264 options".
  • This GUI has absolutley no encoding logic whatsoever.
  • Do note that there are inconsistencies in the format/syntax of the x264 help output. For example, --b-adapt doesn't have <integer> next to it.
    I would urge x264 developers to normalize the help output (--normalizedhelp if necessary) to ensure consistent syntax/structure of the (current and future) API documentation for rigorous parsing by any GUI.
  • Additional features to the GUI could be:
    • Save settings in user-defined profiles.
    • Queue encodes.
    • Add a pre-rendering job of the Avisynth script to the queue.
    • Encode audio (including Avisynth script audio) (eg. to AAC with NeroAAC).
    • Mux video and audio into MP4 or MKV with the appropriate tools.
    I use those features frequently (and almost exclusively) within MeGUI.  BTW, the latest MeGUI patched builds by Zathor are up-to-date.


Bottom line - keep the presentation layer separate from the business logic layer.

Offline Dark Shikari

  • x264 developer
  • Administrator
  • Member
  • *****
  • Posts: 650
    • View Profile
Re: An easy way to make a simple gui?
« Reply #20 on: December 16, 2009, 05:13:28 PM »
I'm going to be fixing various minor typos and such issues in the fullhelp; what other ones are there?  I've fixed b-adapt locally.

Offline amgeex

  • Member
  • Posts: 10
    • View Profile
Re: An easy way to make a simple gui?
« Reply #21 on: December 16, 2009, 05:43:45 PM »
Thanks for the help Bill.

If someone could explain audio and video overhead calculation it'd be great, or point me to some docs or something. I'm searching but haven't found something substantial. This is for the bitrate calculator, as although it is going well I'm porting functions blindly, as I can understand what its going on, but I don't know what they are supposed to do, so I can't be sure that they are ok.

Thanks!  ;D

Offline prOnorama

  • Member
  • Posts: 20
    • View Profile
Re: An easy way to make a simple gui?
« Reply #22 on: December 16, 2009, 05:56:34 PM »
I'm going to be fixing various minor typos and such issues in the fullhelp; what other ones are there?  I've fixed b-adapt locally.

I'm guessing --weightp and maybe --sar


Offline Bill

  • Member
  • Posts: 17
    • View Profile
Re: An easy way to make a simple gui?
« Reply #23 on: December 16, 2009, 06:28:15 PM »
The x264 help is comprehensive from a user's point of view, but perhaps not to a parser.
The intent of --normativehelp is to make the API documentation as normative as W3C specs (just an example) so a well-defined rigorous parser can be implemented.  Every little detail in the syntax of each option in the commandline would need to be explicitly specified.  
However, I realise this is an ideal, and the time and effort required for such a thorough document may not be practical.

In general, every option that takes a parameter should have the parameter type specified next to it.
Eg. --profile <string>

A few odd options are:
--deblock <alpha:beta>
--fps <float:rational>
--pass <1|2|3>
--cqm4 --cqm8 <list>
--zones <zone0>/<zone1>/...
--sar width:height

A somewhat exhaustive list of option <type> to be fixed:

--profile <string>
--preset <string>
--tune <string>

--b-adapt <integer>
--weightp <integer>
--mvrange-thread <integer>
--psy-rd <string>

--deadzone-inter <integer>
--deadzone-intra <integer>

--output <string>
--stdout <string>
--stdin <string>

Additionally, making the help output as parser-friendly as possible would be great.  
For example, tokenizing sections, options, parameter types, defaults, anything else that's relevant to the functionality of x264, and anything that should be a tooltip.  That would help in avoiding parsing mistakes, which may arise with descriptions containing options.
Also, specifying the range for numeric parameters would be helpful.  Eg. --weightp <integer> [0-2|2]
List of words could be enumerated. Eg. --profile <string> [baseline,main,high|high]

The long-term objective of --normativehelp is to isolate API changes to a parser (Controller), which aids modularization of GUI (View) and x264CLI (Model, which enforces business rules).

Edit: Replaced normalizedhelp with normativehelp.  Added a few more options to be fixed.
« Last Edit: December 17, 2009, 03:22:41 PM by Bill »

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: An easy way to make a simple gui?
« Reply #24 on: December 19, 2009, 01:49:46 PM »
The easiest way to make a GUI will be here soon :D
I'm working on a plugin based GUI. It's a GUI that allows parts (visual components) to be replaced and tools/utils to be add using plugins. It also allows for "hooking" actions. Probably about any programmer can write the plugins, because the only requirement is that they have to be compiled for .net (obviously implementing the necessary interfaces). To keep things clean, the default interface for the script will be a textbox, so that would be more or less what you need.

If you're interested or need some specific function let me know (feel free to send an pm).

Just wondering, what's up with python? I've never used it, but know that AvsP uses it (btw, that's the most unstable program I use). What's so good about it?

Offline Sagekilla

  • Member
  • Posts: 3
    • View Profile
Re: An easy way to make a simple gui?
« Reply #25 on: December 19, 2009, 09:46:25 PM »
Python is good as a scripting language. It's just another tool to get the job done: Perl, Python, or any other one like them. IMO, I've seen both (I'm more familiar with python, though) and it's just a matter of whichever one you're more comfortable with.

I dug through the AvsP code a while back in hopes of reviving development, but I didn't get far due to lack of time and the (for me at the time) massive code base to deal with.

At some point I would like to fiddle with it and update it some more, as it's proven extremely useful for what it is.

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: An easy way to make a simple gui?
« Reply #26 on: December 20, 2009, 01:51:24 AM »
I guess I missed something.... AvsP is just a text editori with intellisense and live avisynth preview right? I've never seen de source but that should take too many lines of code (read: less than 100). The only problematic part is the code highlighting and intellisense as I've never seen a free working intellisense component/source and coding a good one will take quite some time (maybe the massive code base is because of that?).

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: An easy way to make a simple gui?
« Reply #27 on: December 20, 2009, 02:48:34 PM »
Today I had some spare time so I decided to write a code highlighter (the code can be used for IntelliSense or code-completion as well). It isn't perfect yet, but handles everything except paste operations. Surprisingly I needed less than 100 lines of (readable) code. When I'll include paste operations There will be probably about 20-30 lines more. Altogether a lot less than I expected.
Thanks to this experiment, my GUI will have a nice text editor :D I should have somewhere a Staxrip like interface (dropdown combos). With that combination I hope I'll be able to serve almost everyone.

p.d. IntelliSense = CallTips - the first one is a Microsoft TM, so the 2nd is more correct.

Offline multicast

  • Member
  • Posts: 16
    • View Profile
Re: An easy way to make a simple gui?
« Reply #28 on: December 21, 2009, 10:50:32 AM »
There's no easy way to make a GUI.

Don't give up on Megui. Zathor at Doom9 is releasing versions that support the new parameters of x264 and which fix bugs. I've been working with him to support DG tools.

Also, you have a few new simple GUI's, such as Lord_MuldeR's simple GUI.

"neuron2 said:There's no easy way to make a GUI "

what are you talking about?, OC there are Very Easy, simple, and Quick ways to make Tiny exe + script GUI collections , both simple and complicated for CLI apps, and its scripts are Cross platform too.

 forget about installing and using mundane things like the Massive  .Net , V Basic, Qt Creator and associated Libs that go with them for the base, all you need is a reasonable willingness to try the tiny Rebol View and its cli and cross platform GUI scripting capability's.

a simple copy of the Free Rebol view (written and created By Carl Sassenrath, lead programmer of amiga OS fame)for your OS of choice http://www.rebol.com/view-platforms.html
and a read of this beginners  Learn REBOL By: Nick Antonaccio is all you really need.

http://re-bol.com/rebol.html

"6.3 GUIs (Program Windows)

Graphic user interfaces ("GUI"s) are easier to create in REBOL than in any other language. The functions "view" and "layout" are used together to display GUIs. The parameters passed to the layout function are enclosed in brackets. Those brackets can include identifiers for all types of GUI elements ("widgets"):

view layout [btn]  ; creates a GUI with a button

view layout [field]  ; creates a GUI with a text input field

view layout [text "REBOL is really pretty easy to program"]

view layout [text-list]  ; a selection list

view layout [
    button
    field
    text "REBOL is really pretty easy to program."
    text-list
    check
]
"

for instance cut&pasting this Rebol script into the Rebol cli gets you a fully working GUI paint program with clickable png save button, simple easy and works fine...

with a little imagination and some scripting skills your all set to make any No of x264 and related CLI app Gui's in a few minutes, and even run remotely and/or download them to the device at run time...

...cut
view center-face layout [
    s: area black 650x350 feel [
        engage: func [f a e] [
            if a = 'over [
                append s/effect/draw e/offset
                show s
            ]
            if a = 'up [append s/effect/draw 'line]
        ]
    ] effect [draw [line]]
    b: btn "Save" [
        save/png %a.png to-image s
        alert "Saved 'a.png'"
    ]
    btn "Clear" [
        s/effect/draw: copy [line]
        show s]
    ]
]

---cut

"For the sake of saving space in this tutorial, I uploaded the compressed, embedded code to http://musiclessonz.com/rebol_tutorial/lame.r. The following line writes the lame.exe program to the current directory of your hard drive:

do http://musiclessonz.com/rebol_tutorial/lame.r  ; ~250k download

To use our media player program without having to download anything, simply put the above lame.r code directly in your script. Once you've got lame.exe on your hard drive, you can use it to convert .mp3 files to .wav files using the format:

call/wait {lame.exe --decode your-input.mp3 your-output.wav}

"

and here's working examples of some really old Rebol view Gui Apps scripts running inside the IE web browser
http://www.rebol.net/plugin/demos/

use them as a basic reference if for instance you prefer to write your GUI for local and remote browser use...

http://www.rebol.net/plugin/demos/new-demos/REB-Calc.html
http://www.rebol.net/plugin/demos/new-demos/speak.html
http://www.rebol.net/plugin/demos/pongo.html
Pongo Game - REBOL Plugin Demo
Arkanoid style block game.
Author: Kurt (Age 13)

if a 13 year old kid can learn to produce such good quality code as that pongo example, in 8K of Rebol script, then surely You can at least give it look and try making something interesting and x264 GUI related, and posting the rebol scripts somewhere, paste bin or something if not here on doom10, who knows people might even actually start to like its small size and easy use download and run anywhere, single self contained 600k Rebolview exe , no installing required etc, and help expand these basic GUI scripts for specialist uses later.

perhaps if your scripts are good enough Nick Antonaccio might even include them in his tutorial above if you let him know about them, and everyone will then know and use Your x264 rebol scripts for greater learning to everyone's benefit, we might even get a new rebol plug-in for all the browsers today if the many seasoned C coders here see fit to help out and write a new R2/R3 browser plug-in code later.
http://www.rebol.com/article/0440.html
http://www.rebol.com/article/0443.html
« Last Edit: December 21, 2009, 12:39:33 PM by multicast »

Offline Kurtnoise

  • Member
  • Posts: 30
    • View Profile
Re: An easy way to make a simple gui?
« Reply #29 on: December 23, 2009, 05:04:13 AM »
forget about installing and using mundane things like the Massive  .Net , V Basic, Qt Creator and associated Libs that go with them for the base, all you need is a reasonable willingness to try the tiny Rebol View and its cli and cross platform GUI scripting capability's.
you cannot compare apples and oranges...
« Last Edit: December 23, 2009, 05:06:20 AM by Kurtnoise »