Log in

View Full Version : MeGUI - x264/XviD/lavc/Snow encoder with MP4/MKV/AVI output & audio


Pages : 1 2 3 4 5 [6] 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

lesnick
6th July 2005, 16:05
hello, i have the problems:
1) i cant use 1st pass cording x264 with mencoder: fps -1, time 0

Next job job4-1 is a video job. encoder commandline:
"E:\My things\Prog\meGUI\tool\mencoder.exe" "E:\vid\tg.avs" -ovc x264 -o NUL: -passlogfile "2pass.log" -x264encopts pass=1:bitrate=700:bframes=1:b_adapt:subq=1:no8x8mv:nob8x8mv:me=0
successfully set up video encoder and callbacks for job job4-1
----------------------------------------------------------------------------------------------------------
Log for job job4-1
----------------------------------------------------------------------------------------------------------
job job4-1 has been processed. This job is linked to the next job: job4-2
Next job job4-2 is a video job. encoder commandline:
"E:\My things\Prog\meGUI\tool\mencoder.exe" "E:\vid\tg.avs" -ovc x264 -passlogfile "2pass.log" -x264encopts pass=2:bitrate=700:bframes=1:b_adapt:i4x4 -o "E:\vid\gh\ged.264" -of rawvideo
successfully set up video encoder and callbacks for job job4-2
---------------------------------------------------------------------------------------------------------
Log for job job4-2
----------------------------------------------------------------------------------------------------------
The current job was aborted. Stopping queue mode

2) if i use B frames (when i don`t use b frames - all is O.K.) in AVC with mencoder i have file 0 kb:
Log for job job4-1
----------------------------------------------------------------------------------------------------------
job job4-1 has been processed. This job is linked to the next job: job4-2
Next job job4-2 is a video job. encoder commandline:
"E:\My things\Prog\meGUI\tool\mencoder.exe" "E:\vid\tg.avs" -ovc lavc -passlogfile "2pass.log" -lavcopts vpass=2:vbitrate=700:vmax_b_frames=2:vb_strategy=1:qpel:vqdiff=2:trell -o "E:\vid\gh\ged.m4v" -of rawvideo
successfully set up video encoder and callbacks for job job4-2
----------------------------------------------------------------------------------------------------------
Log for job job4-2

[mpeg4 @ 00A9C848]b_frame_strategy must be 0 on the second passCould not open codec.
FATAL: Cannot initialize video driver.
Cannot find codec matching selected -vo and video format 0x32315659.
desired video bitrate of this job: 700 kbit/s - obtained video bitrate: 0 kbit/s
----------------------------------------------------------------------------------------------------------
job job4-2 has been processed. This job is linked to the next job: job4-3
Next job job4-3 is a mux job. mp4box commandline:
"E:\My things\Prog\meGUI\tool\MP4Box.exe" -add "E:\vid\gh\ged.m4v" -fps 25 -new "E:\vid\gh\ged.mp4"
successfully set up muxer and callbacks for job job4-3
----------------------------------------------------------------------------------------------------------
Log for job job4-3

an exception ocurred when trying to read from stdout: Could not find file "E:\vid\gh\ged.mp4".
----------------------------------------------------------------------------------------------------------

Doom9
6th July 2005, 16:22
Let's start with number two: I see you're using the b-frame reduction mode, and the 2nd pass error message tells me all I need to know.
Looking at the mencoder manpage I found this:
vb_strategy=<0-1> (pass one only)It appears that I missed that one and add vb_strategy to first and second pass, causing your problem. I will fix this in the next version. For now just don't use the adaptive b-frame setting when using lavc.

As for your first problem, I had to consult the manpage again but I'm afraid that's my fault, too. The me=0 option is the culprit.. mencoder uses me=1-4

I guess the error message in both cases would be there, but doesn't have either the word error or anything else I identify as an error in it.. otherwise MeGUI should halt immediately and not start subsequent jobs.

lesnick
6th July 2005, 17:48
Sorry for oftop. Can you tell me, what you prefer: Mencoder or x264 for x264 cording, and why? And can you tell me where i can get x264CLI SSE/SSE2 ?

Sharktooth
6th July 2005, 17:54
x264 CLI (coz it's smaller and is usually more up to date - also, less code, less bugs...) and it already comes with SSE/SSE2. The MMX suffix is there to warn ppl it REQUIRES AT LEAST MMX to work.

Doom9
6th July 2005, 17:55
Mencoder or x264 for x264 cording, and why?It depends.. if you want AVI output, mencoder is clearly preferable. If you want mp4 output, x264 is more practical. Right now with the summer break this one doesn't matter much, but the reason I added support for another encoder in a mencoder GUI is because x264.exe is smaller and more up-to-date.. we're lucky to get one mencoder build a week, but the latest x264 compilations are out only hours after a new revision has been committed.

But I'm glad you're using mencoder.. you discovered two bugs.. not good for me but good for all the other users.

lesnick
6th July 2005, 18:19
Thanks for prompt replies. I shall wait the following release

Doom9
6th July 2005, 20:27
Alright, before I unleash the one click mode upon the world here's the list of caveats for the upcoming release:

You will need to create a profile for the audio and video codec you're going to use.

Set AR to Auto Detect in the one click window or make sure you select the proper one manually.

DVDs with MPEG audio might cause problems.. if you have one, please get me the stream info file. The same applies to LPCM tracks.

AVI output in the one click window has NOT!! been tested. Trying to use it might make your head explode.

The language selection seems to suffer from the fact that depending on where you bought a DVD, the language might be indicated using the native name (like Français), or the English name. Currently, MeGUI only supports English names. Whether or not it will be possible to support both is currently under investigation.

I moved around a LOT!! of tested code which inevitably might lead to problems. It is therefore crucial that those who try the one click mode and run into problem, try reproducing the problem using a "lesser" mode. So here's the how to for the various parts:

Opening a video source: start the dgindex project creator (control-d), and set it up just like you did set up the job in the one click window

DGIndex problem: same as above, try reproducing in the dgindex project creator window

DGIndex has run successfully but jobs are not properly created: try the AviSynth project creator (Control-A in the main gui). Open your d2v, check "autocrop", check "suggest resolution", check "on save close and load", then press save. This reproduces the steps that will be taken after running dgindex in the one click window.

Problem encoding/muxing: try using the auto mode using the same video and audio profile and the video/audio you got demuxed.

Since the code is the same, bugfixing will always be done first in the separate modules (easier scenarios).

Doom9
6th July 2005, 20:57
alright, the new release is out now.

haubrija
7th July 2005, 04:01
Ok... I'm laying myself out for ridicule... but I don't want anyone else to go through the same thing.

I set up my jobs doing an auto encode. Come back in the morning and my mp4 is way oversized. Plus it has no audio. I'm thinking what the hell?

Doom9... it might be a good idea to have megui perform a check so the user doesn't name both the video and audio output the same thing hence overwriting one of their jobs in the process. I realize this may be a little redundant and no one else may make my idiotic mistake...but just in case :)

btw love your tool. Keep up the good work.

Doom9
7th July 2005, 08:30
Doom9... it might be a good idea to have megui perform a check so the user doesn't name both the video and audio output the same thing hence overwriting one of their jobs in the process.Well, I could certainly do that.

As for the oversize I would need to see your logfile..

leowai
7th July 2005, 08:38
I set up my jobs doing an auto encode. Come back in the morning and my mp4 is way oversized.

I got the same problem. I used v0.2.0.8. Double checked that v0.2.0.9 also the same.

haubrija, you're more lucky than I am. I only realize this oversize problem on the process of 2nd pass. First pass takes me about 22hrs to complete on my P3 1GHz machine. :(

From the command line generated by MeGUI, I think MeGUI should replace the bitrate in the configuration panel (says 700 default) to what it calculated (says 626kps, with 128kps of AAC audio) in the AutoEncode mode.

It doesn't make sense since the audio size is already known, the "Automatic Encoding" dialog box also shows the required Avereage Bitrate to fit the target output size. Why the program doesn't allow to change the default 700 (in config panel) to the calculated bitrate? This option is remain in gray and unselectable. :(

This is a bug of MeGUI?

Thanks.

Doom9
7th July 2005, 08:54
It doesn't make sense since the audio size is already known, the "Automatic Encoding" dialog box also shows the required Avereage Bitrate to fit the target output size. Why the program doesn't allow to change the default 700 (in config panel) to the calculated bitrate? This option is remain in gray and unselectable. What do you mean by the config panel? There's no panel.. just dialogs. You can set any bitrate you want in a codec configuration dialog (this is the window you get when you press the config button in the main gui).. in auto-mode, this will be discarded... you cannot set a bitrate you are required to set a size and the bitrate is automatically calculated based on your configuration.. all that calculation info is actually part of the log (so where is it?). The way you're describing things, I'm wondering if you are using MeGUI correctly.. you get your jobs set up from the autoencode window, don't you? If you load one of those created jobs from the queue, you'll see that it has the bitrate that was calculated. It makes absolutely no sense to propagate a calculated bitrate to the codec configuration dialog.. once you enter the auto mode, you cannot reconfigure the codec and your last configured settings will be taken. The only way you can still change anything after clicking queue in the auto encode window is if you load a job from the queue, change something, and update the existing job.

A job has it's own configuration.. at the point you press queue, the currently active settings (minus bitrate in case of video in auto-encode or one click mode) will be plugged into that job. After it is in the queue, it has no reference whatsoever to what you see in the codec configuration dialog. You can change that all you want.. once a job is in the queue, you can only change it if you a) load it, b) modify it, c) update it. a & c require the appropriately named buttons in the queue tab.

Now if you're refering to the "Average Bitrate" textfield in the "Automatic Encoding" groupbox in the Automatic Encoding window... this is a bitrate preview and it does change if you change the file size. I'm quite confused why you think you need to specify a bitrate. You do not.. MeGUI is smart enough to calculate the bitrate for you, taking up to two audio tracks and up to 5 subtitle tracks automatically into account. And it has to be a hell of a coincidence if the average bitrate in the place I just mentioned is exactly 700 kbit/s. Try this: configure audio and video, go into one click mode, note the average bitrate shown. Then press cancel, press the X button to clear the audio, and go to the auto encode window again. Note that the average bitrate has changed.

leowai
7th July 2005, 10:46
Now if you're refering to the "Average Bitrate" textfield in the "Automatic Encoding" groupbox in the Automatic Encoding window... this is a bitrate preview and it does change if you change the file size.
Yes, I mean the Average Bitrate in "Automatic Encoding". I also noticed the change of video size and bitrate if an audio is included.
I'm quite confused why you think you need to specify a bitrate. You do not.. MeGUI is smart enough to calculate the bitrate for you, taking up to two audio tracks and up to 5 subtitle tracks automatically into account.
Yes, it does show the changes. However, when I double check with the command line in quequed jobs (3 pass), it shows the bitrate is equals to the one specified in the config dialog instead of the calculated one.

Following is my encoding steps:
1. Video: a. Set input AviSynth Script. (A movie windows shown).
b. Define the Video Output: AVC, MP4 and use "automated 3pass"
*If the bitrate is 800 here, I will get this in the command line!

2. Define Audio input and output @128kbps (assume no problems here).
3. Click on "AutoEncode", now I got the calculated is 626kbps (Video file size will be 593221KB). Assume no additional audio, subtitles and chapters to add. I click on "Queque" button.
4. Use text edit to open the corresponding job file *.xml. I found the command lines in jobs now specifying "--bitrate 800". This 800 is the bitrate in the config dialog rather than the calculated 626 (which takes audio size into account).

My problem is the MeGUI "AutoEncode" provide correct bitrate but when it generate the command line for jobs, it uses the bitrate in the config dialog! Wondering is this happen to you too, or it just happen to me only. :(

May be my steps in creating the jobs are incorrect.

And it has to be a hell of a coincidence if the average bitrate in the place I just mentioned is exactly 700 kbit/s. Try this: configure audio and video, go into one click mode, note the average bitrate shown. Then press cancel, press the X button to clear the audio, and go to the auto encode window again. Note that the average bitrate has changed.
"One Click Mode"="One Click Encoder" in the tools menu? If you refers to the "AutoEncode" button, see above.

Hope my explanation above is clear enough.

Thanks.

Doom9
7th July 2005, 12:06
Yes, it does show the changes. However, when I double check with the command line in quequed jobs (3 pass), it shows the bitrate is equals to the one specified in the config dialog instead of the calculated one.That is correct, if you are also encoding audio. Think about it for a second: when you're encoding audio, you do not know the audio size in advance... you can guess (which MeGUI does and shows you the results from that guess), but that guess is generally not very accurate, especially in VBR mode. So what happens is that the bitrate is left as configured in the configuration dialog, up until the point where all audio jobs have been completed. Then you'll see entries in the log in between the last audio and the first video job telling you the size of the audio stream(s) and which bitrate MeGUI recalculates for the video knowing how big your audio file(s) is/are. Sure I could add the calculated bitrate from the autoencode average bitrate field into all the jobs.. but what good will that do me if I have to recalculate the bitrate anyway? It's just an additional step that serves no purpose.

However, if you try without audio encoding, but do specify an audio track to be muxed, then you will immediately see in the log that MeGUI is calculating the video bitrate, and if you check the jobs, the bitrate will match the value the log tells you. If you're just muxing pre-existing audio files, MeGUI can calculate the video bitrate accurately right there. And if you combine the two scenarios (one pre-existing audio track, one to be encoded), you'll have a hybrid mode in which MeGUI reduces the desired size by the size of the pre-existing audio, and then recalculates again once your audio track to be encoded has been encoded.

So, once again.. if your output is oversized I need to see the log, plain and simple. You'll see MeGUI recalculating bitrates in there. The last version might lack some entries but you'll see the recalculation for sure as that's a part of the code I have not touched since the introduction of the 3 pass mode. And naturally I have checked that the bitrate recalculation works properly when I made those changes.

leowai
7th July 2005, 13:02
However, if you try without audio encoding, but do specify an audio track to be muxed, then you will immediately see in the log that MeGUI is calculating the video bitrate, and if you check the jobs, the bitrate will match the value the log tells you.
Yup. Check that if I mux the video with an existing audio, the command output to the jobs are correct. i.e. skip step 2 and add additional audio(s) at the end of step 3.

If you're just muxing pre-existing audio files, MeGUI can calculate the video bitrate accurately right there. And if you combine the two scenarios (one pre-existing audio track, one to be encoded), you'll have a hybrid mode in which MeGUI reduces the desired size by the size of the pre-existing audio, and then recalculates again once your audio track to be encoded has been encoded.
I see. This means the bitrate will be changed according to the output audio size. Just wondering, since job files are save after MeGUI closed, will MeGUI update the jobs when encoding if the jobs start after MeGUI is closed and re-open?

My senerio might be able to be explained. I've input an EXISTING audio as one of the encoding job. I then delete off the job later because only doing this I would notice the change of bitrate in Video to fit 1 CD correctly in the "AutoEncode" dialog. I simply thought that the shown bitrate in gray will be used in the encoding process. That is my first use of MeGUI and that's why I thought I was correct. Now I know I shouldn't do so :).

I've tried the encoding with auto3pass and it takes me 20hrs+ for a pass of 2hr DVD movie. I don't want to wait for another day and I think it might be good enough with a 2nd pass video. It is my mistake to remove the 3rd pass while the 2nd encoding is in process. I just thought that they are independent processes running in sequence. Not knowing that MeGUI is getting the jobs done in sequence with dependant of previous job in auto3pass.


I believe that is the cause where the video size is increased to an undesired size after I've remove the 3 pass from the encoding sequence.

Thanks for you well explanation about the details. Keep on the good job.

berrinam
7th July 2005, 13:12
it takes me 20hrs+ for a pass of 2hr DVD movieI'm not sure if you are aware, but the Turbo option in the x264 (if that's what you're using) settings will give a 3-5 times speed-up on the first pass with no noticeable quality loss.

Doom9
7th July 2005, 13:18
Just wondering, since job files are save after MeGUI closed, will MeGUI update the jobs when encoding if the jobs start after MeGUI is closed and re-open?It depends. As I said, the update is done when you have a series of jobs belonging together. If an audio job links to a video job, that's when the recalculation kicks in. The only time this isn't done is if audio encoding is manually aborted (but then if you redo it, it'll be done again switching from audio to the video job), or if there was an error in the audio job (same thing here, redoing the audio job will redo the calculation).

So, even if you stop encoding after audio encoding by pressing the stop button in the queue tab, the bitrate will still be updated.. but the next job won't be encoded.

So unless you manage to crash MeGUI just in the right moment, the recalculation will always be done.

With pre-existing audio, unless MeGUI crashes before adding the jobs to the queue, the bitrate will be in order.

I've input an EXISTING audio as one of the encoding job. I then delete off the job later because only doing this I would notice the change of bitrate in Video to fit 1 CD correctly in the "AutoEncode" dialog.Yes that is indeed your problem. Doing so you the knowledge about the audio stream away from MeGUI, and it no longer knew that it had to reduce the video bitrate prior to encoding the first pass. That is why there's a warning if you delete a single job of a series of jobs.. deleting one can cause undesired results.

What you should've done is just set up video, then check "add additional streams" and specify your audio stream in the mux window that pops up.. that way the size of the audio would've been taken into account and your video would've ended up having the size you wanted it to have.

leowai
7th July 2005, 13:33
I'm not sure if you are aware, but the Turbo option in the x264 (if that's what you're using) settings will give a 3-5 times speed-up on the first pass with no noticeable quality loss.
Thanks, heard that before but haven try on it yet.

Again, thanks doom9. I would try these out and let the machine runs for this coming weekends. I'll report again if the oversize problem presented. However, I don't think it will happen again. :)

haubrija
7th July 2005, 17:11
Doom9,

Just a point of clarification. I beleive it was oversized because it mp4box imported the video twice. It saw that they were the same name so it imported the video (named temp.mp4) and then what it thought was the audio but was actually the same file (temp.mp4). So I don't think the oversize was the fault of megui... just me.

IgorC
7th July 2005, 18:57
What version of xvid (1.0.3 or 1.1 beta 2) mplayer has?

Doom9
7th July 2005, 20:30
What version of xvid (1.0.3 or 1.1 beta 2) mplayer has?as far as I can tell from my limited experience with the mencoder source, you have to compile in the xvid sources to actually get xvid support. Thus it would be up to whomever compiles mencoder to include whichever version of the xvid sources he/she saw fit. I know it's devapi4 (so 1.x), but that's that.

IgorC
7th July 2005, 20:38
It would be great (at last for me) to see mplayer/MeGUI working with last Xvid 1.1 beta 2 Koepi's build.

Doom9
7th July 2005, 20:45
Xvid 1.1 beta 2 Koepi's build.that is a vfw build.. I'm not using vfw for encoding and I don't plan to ever change that. If you want vfw, look for tools automating avs2avi or the VfW codec (Gordian Knot, AutoGK, DVX, AVI.NET, etc).

MeGUI is a mencoder gui (hence the first two letters of the name).. it'll support what mencoder supports in terms of codecs.

Doom9
7th July 2005, 21:52
the new build for today is out. enjoy

LigH
8th July 2005, 14:47
I got a crash on exiting MeGUI 0.2.1.0a - I cleaned the directories for a fresh install of MeGUI and all required tools, created a few video profiles, and closed MeGUI. Here, .NET reported a failure not being able to access a file (unsupported path format). The reason must be: I used a colon in the profile description ("x264 HQ Auto3pass 16:9"). This would result in an invalid filename.

In case you still need a crash report, I saved it.

Beave
8th July 2005, 17:24
MeGUI is getting better and better. I like it. I'm still playing around with x264 and found your GUI very helpful.

A few suggestions from my side:

Could you add the output filename automaticly when opening an avs or an audio file? Like when I open mymovie.avs, the output box could already have the filename "mymovie-video.mp4" or something simmilar in the same directory. For autoencode it doesn't really matter how the immidiate files are called anyways.

I wouldn't mind seeing the commandlines in the mainwindow. Something like in the config windows, would be nice.

In the x264 config window when selecting automated 2-pass the shown commandline is a bit confusing. Could you maybe show both passes seperately on top of each other in the commandline?

The avsynth creator doesn't support resolutions higher than 720.

I would like to be able to define the noise-options with my favorite filters for avisynth myself somewhere.

I wouldn't mind seeing ProjectX support in MeGUI to fix the sync-issues in some of the TS files. Having this in the 1-click tool would be great, too.

Now something farfetched maybe, but I'll ask anyways:
When doing lots of testencodes with x264 with resolution up to 720p I noticed, that playback load depends on many parts. The more options you choose for x264 the higher the playback load (obviously!). The higher the bitrate, the higher the playback load. The more noisereduction filters in avisynth the lower the playback load. The last two things are hard to predict, but they change the playback performance quite a bit.
Maybe there is some way to guess or compute the expected playback performance?

Could you add a compressibility check with x264 to MeGUI? There is probably too little experience with this yet, but it would help to decide on the right options.

superdump
8th July 2005, 17:40
The higher the bitrate, the higher the playback load. The more noisereduction filters in avisynth the lower the playback load. The last two things are hard to predict, but they change the playback performance quite a bit.
Maybe there is some way to guess or compute the expected playback performance?
The higher the bitrate, the more data that has to be decoded, hence why it produces more load. Noise reduction filters make the video easy to encode, reducing the bitrate and so reducing playback load.

There is a standardised restriction on bitrate and other properties such that the video can be guaranteed to be playable on hardware capable of decoding this h.264 profile/level. I believe Doom9 is considering adding these profiles/levels to the gui.

Doom9
8th July 2005, 18:08
Could you add the output filename automaticly when opening an avs or an audio file?Yes, that would be no problem.

I wouldn't mind seeing the commandlines in the mainwindow. Something like in the config windows, would be nice.I don't see the point of that.. when you configure you can show the commandline and it won't change in the main window.. all that is added is input and output filenames..

In the x264 config window when selecting automated 2-pass the shown commandline is a bit confusing. Could you maybe show both passes seperately on top of each other in the commandline?Why is it confusing? You're configuring the second pass.. MeGUI does the rest when it's time. It's not like the first pass configuration is just out there.. it has to be generated manually and that code doesn't belong into the commandline generation.

The avsynth creator doesn't support resolutions higher than 720. Hmm.. I guess that is due to me setting a maximum for the updown control. I can change that in function of the video that is being opened.. I just wanted to prevent that people resize video to a size larger than the original.

I would like to be able to define the noise-options with my favorite filters for avisynth myself somewhere.And you can.. copy and paste them into the avisynth creator preview once you're done selecting from the available options in the GUI. I you want a full fledged AviSynth encoder, there are plenty of tools around for that and it just wouldn't be right copying other tools - I rather spend my time elsewhere.

I wouldn't mind seeing ProjectX support in MeGUI to fix the sync-issues in some of the TS files. Having this in the 1-click tool would be great, too.I have no idea what you mean by that.

Maybe there is some way to guess or compute the expected playback performance?I don't have a clue about that.. there's not even an attempt anywhere at such a thing.

Could you add a compressibility check with x264 to MeGUI? Asked and answered before. I don't know how a compcheck works so I need somebdy to lay it out for me. Give me the specs and I'll tell you if I can and will do it. But since it's not a feature I consider useful (I know it's in my guides but I have never personally used it for my own purposes, ever), all you can potentially expect from me in this matter is coding.. not the "figuring out how it works and specify the workflow" work. But bring it here and we'll see.

haubrija
8th July 2005, 18:15
Doom9,

I'm at work right now so I can't drop post a log, but I beleive I'm having a problem with the acc encoding. I want to encode to 5.1 aac but it seems to only be encoding in regular 2.0. I'm using mplayer for playback. In my audio options, I've been setting it for: 5.1, CBR 224, HE, leaving everything else default.

I have a soundstorm motherboard so I'd really love to get the 5.1 working. Is this a limitation of mplayer or a possible problem with megui. Thanks for any help.

Doom9
8th July 2005, 18:34
@haubrija: :logfile:

I believe Doom9 is considering adding these profiles/levels to the gui.those, yes, but that's for standalone players/hardware chips, not PCs.

LigH
8th July 2005, 20:25
To #275 ^:

Maybe this might help? http://www.codeproject.com/file/isvalidfilename.asp

Beave
9th July 2005, 01:11
I don't know how a compcheck works so I need somebdy to lay it out for me. Give me the specs and I'll tell you if I can and will do it. But since it's not a feature I consider useful (I know it's in my guides but I have never personally used it for my own purposes, ever), all you can potentially expect from me in this matter is coding.. not the "figuring out how it works and specify the workflow" work. But bring it here and we'll see.
OK, basicly it encodes a certain percentage of the video (usually 1-5%) with a fixed quant and generates the probable size for the whole movie. This way you can easily see how well compresseble it is when comparing to the final desired filesize.
I would suggest an extra window for that. There should be a box to put in the percentage for the comptest. A box for the desired filesize and for the bitrate (radio button style, so that only one can be selected). A config button to choose the x264 settings. Then you would take the input avs add a line to it (selectevery(300,15) for example, depending on the given percentage) and start the test.
Why is it confusing? You're configuring the second pass.. MeGUI does the rest when it's time. It's not like the first pass configuration is just out there.. it has to be generated manually and that code doesn't belong into the commandline generation.
When I select "turbo" it shows partly the settings of the second pass, but changes some settings to reflect the ones from the first pass.
I have no idea what you mean by that.
ProjectX is a software that takes input files like TS Transport Streams and demuxes them to .m2v and .ac3 or to another TS. While doing that it corrects errors to keep video and audio in sync.
I'd love to see a on click version for that. Taking a .ts file running it through ProjectX, then making a d2v file, then creating an avs with desired resolution and encoding it to .mp4. But maybe there isn't much demand for that?

Beave
9th July 2005, 01:22
The higher the bitrate, the more data that has to be decoded, hence why it produces more load. Noise reduction filters make the video easy to encode, reducing the bitrate and so reducing playback load.
When I encode a movie to a desired filesize the overall bitrate doesn't change. If the movie is more compressible the codec will just do a better job in compressing it. But how should that effect the playback performance? My guess is, it doesn't use that much "tricks" to encode so that playback doesn't need to decode all those "tricks". But shouldn't those "tricks" use the settings in the config? If I choose CABAC or 8x8dct or bframes playback should suffer, but not if the movie is less compressible. In that case it should only look worse, but use the same cpu load on playback.
Sorry for bringing this up in this thread. It only has slightly to do with MeGUI.

Doom9
9th July 2005, 01:28
When I select "turbo" it shows partly the settings of the second pass, but changes some settings to reflect the ones from the first pass.Which ones? I don't reacall turbo changing anything.. it shouldn't.

Don't you have a whole bunch of other things that need to be done with digital TV streams? Like cutting. That's definitely no job for MeGUI.. it's a video and audio encoding application.

Beave
9th July 2005, 02:14
I posted a screenshot. It shows different settings when selecting turbo in the commandline. Notice the subme=1 part. In the GUI there is number of reference frames = 3 selected.

Doom9
9th July 2005, 02:18
I posted a screenshot. okay.. I got it. This will actually happen in every codec that has turbo.. the problem is that in automated mode you have your second/third pass settings and the turbo flag that belongs to the first pass. When creating the jobs, the two are separated.. but that's only done when adding jobs to the queue. I'll remove the turbo flag for the commandline generation in the next version. if you set encoding mode to 2nd/3rd pass you'll see what you get in automated encoding mode (the two changes that are made when adding the job is setting the mode to second/third pass and removing the turbo flag)

stax76
9th July 2005, 03:28
To #275 ^:

Maybe this might help? http://www.codeproject.com/file/isvalidfilename.asp

thanks for the link, I just rewrote my routine based on this, in optimized basic it looks like this


Public Shared Function IsValidFileSystemName(ByVal name As String) As Boolean
For i As Integer = 0 To name.Length - 1
Dim charValue As Char = name.Chars(i)

Select Case charValue
Case """"c, "*"c, "/"c, ":"c, "<"c, ">"c, "?"c, "\"c, "|"c
Return False
End Select

If AscW(charValue) < 32 Then
Return False
End If
Next

Return True
End Function


translated to C# with Reflector:


public static bool IsValidFileSystemName(string name)
{
int num2 = name.Length - 1;
for (int num1 = 0; num1 <= num2; num1++)
{
char ch1 = name[num1];
char ch2 = ch1;
if (((((ch2 == '"') || (ch2 == '*')) || (ch2 == '/')) || ((ch2 == ':') || (ch2 == '<'))) || (((ch2 == '>') || (ch2 == '?')) || ((ch2 == '\\') || (ch2 == '|'))))
{
return false;
}
if (ch1 < ' ')
{
return false;
}
}
return true;
}


Microsoft has a internal method that don't follow this rules exactly, it throws an exception and can be seen with Reflector and accessed with Reflection:


GetType(System.IO.Path).InvokeMember("CheckInvalidPathChars", _
Reflection.BindingFlags.InvokeMethod Or _
Reflection.BindingFlags.NonPublic Or _
Reflection.BindingFlags.Static, _
Nothing, Nothing, New String() {"filename"})

stax76
9th July 2005, 05:16
Don't you have a whole bunch of other things that need to be done with digital TV streams? Like cutting. That's definitely no job for MeGUI.. it's a video and audio encoding application.


You've got a video preview and AviSynth script maker, these could be used to add cutting, it don't require much or sophisticated code I think. There was just a topic about a AC3 cutting tool that would be handy for this. Tools like ProjectX and Cuttermaran that are slow or don't support keys or lack features in general do the cutting job rather poor.

berrinam
9th July 2005, 05:39
Cutting can be done with the current apps that MeGUI requires -- video cutting is easy and frame-accurate with AviSynth (trim command), and BeSweet can cut audio, I believe.

lesnick
9th July 2005, 08:21
Help please - sometimes I need to recode very quickly, certainly I use mencoder for this purpose, prompt me, what options are desirable for the maximal speed. (though on mine celeron 1.7 it likely is ridiculous)

LigH
9th July 2005, 08:52
@ stax:

Great!

One of my most important problems with new programming languages being learned is: How is that function named, which will do what I want - and does it already exist at all, or do I have to write myself? Syntax can be learned in a snap, but the "word pool / vocabulary" is often sooooo different... you are lost without well referenced help.

stax76
9th July 2005, 11:15
Cutting can be done with the current apps that MeGUI requires -- video cutting is easy and frame-accurate with AviSynth (trim command)


I meant that our applications generate those Trim commands, I've done cutting in DVX with VirtualDub script and in AVSEdit with AviSynth Trim commands, in Stax Media Encoder both will be supported VirtualDub and AviSynth cutting.

@LigH

If you learn .NET I highly recommend to use Visual Studio 2005, the Express Beta Versions are free and work very well (until May 2006) and will be very cheap (50$) after that. They are designed for beginners. I use VS 2005 Express exclusively and many new features like generics extensively, there are tons of really cool new features though a beginner much likely struggles with the basics.

Doom9
9th July 2005, 11:40
Alright, so video cutting could be done easily.. and be analogue to zones. But what about audio? You cannot cut audio at an arbitrary position, it needs to be aligned with an audio frame or you'll get corrupt audio. And say we're using AC3 audio and incurr an almost 30ms delay (size of an audio frame) for each cut.. the audio would get way off base.

And I wasn't aware that besweet supported audio cutting.. I thought that was something for besplit.

I wrote my own filename code similar to the above, but it returns a string with a valid filename. I replace all invalid character by _<2 letter shortcut to the invalid char>_, so for instance * turns into _st_, < turns into _lt_, etc. I think it's reasonable to assume that users will not have a profile using such convention and another one using the invalid character so that there'll be two files named the same.

@lesnick: select 2 pass first pass, check turbo, check the commandline. Basically it's no MV options, subq 1, the lowest me method. But, if you use that for the second pass quality will be visibly degraded. Plus, perhaps you're using one of the other 3 codecs ;) <hint>it is important to tell us right when asking the question exactly what it is you want</hint>

stax76
9th July 2005, 11:56
Alright, so video cutting could be done easily.. and be analogue to zones. But what about audio? You cannot cut audio at an arbitrary position, it needs to be aligned with an audio frame or you'll get corrupt audio. And say we're using AC3 audio and incurr an almost 30ms delay (size of an audio frame) for each cut.. the audio would get way off base.

wave would be fine for my captures which AviSynth can Trim, other formats I have to investigate first

lesnick
9th July 2005, 12:02
meGUI 0.2.1.1 was crashed if push "config" for XVID
-----------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at MeGUI.CommandLineGenerator.generateXviDCommandline(String mencoderPath, xvidSettings xs, String input, String output)
at MeGUI.CommandLineGenerator.generateVideoCommandline(MeGUISettings settings, VideoCodecSettings vSettings, String input, String output)
at MeGUI.xvidConfigurationDialog.showCommandLine()
at MeGUI.xvidConfigurationDialog.dropDownBox_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at MeGUI.xvidConfigurationDialog.set_CodecSettings(xvidSettings value)
at MeGUI.MeGUI.videoConfigButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
MeGUI
Assembly Version: 1.0.2016.3771
Win32 Version: 1.0.2016.3771
CodeBase: file:///E:/My%20things/Prog/meGUI/MeGUI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
bz6gxvzg
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
----------------------------------------------------

Doom9
9th July 2005, 12:21
wave would be fine for my captures which AviSynth can TrimBut the problem is that BeSweet doesn't read AviSynth scripts..

meGUI 0.2.1.1 was crashed if push "config" for XVIDWeird.. I don't recall changing anything since testing and it worked then but I can reproduce this now.

Doom9
9th July 2005, 15:15
OK, basicly it encodes a certain percentage of the video (usually 1-5%) with a fixed quant and generates the probable size for the whole movie. This way you can easily see how well compresseble it is when comparing to the final desired filesize.
I would suggest an extra window for that. There should be a box to put in the percentage for the comptest. A box for the desired filesize and for the bitrate (radio button style, so that only one can be selected). A config button to choose the x264 settings. Then you would take the input avs add a line to it (selectevery(300,15) for example, depending on the given percentage) and start the test.and then what? Using given settings I can predict how big the final movie is going to be.. but that's not what the comptest is about, is it? It's about picking the proper resolution given a certain target size.

towerblocks
9th July 2005, 17:13
meGUI 0.2.1.1 was crashed if push "config" for XVID
-----------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at MeGUI.CommandLineGenerator.generateXviDCommandline(String mencoderPath, xvidSettings xs, String input, String output)
at MeGUI.CommandLineGenerator.generateVideoCommandline(MeGUISettings settings, VideoCodecSettings vSettings, String input, String output)
at MeGUI.xvidConfigurationDialog.showCommandLine()
at MeGUI.xvidConfigurationDialog.dropDownBox_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at MeGUI.xvidConfigurationDialog.set_CodecSettings(xvidSettings value)
at MeGUI.MeGUI.videoConfigButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
MeGUI
Assembly Version: 1.0.2016.3771
Win32 Version: 1.0.2016.3771
CodeBase: file:///E:/My%20things/Prog/meGUI/MeGUI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
bz6gxvzg
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
----------------------------------------------------


I get the same error,Using windows2000

Doom9
9th July 2005, 22:59
@towerblocks: lesnick already reported that bug and I confirmed it.. on the very same page nontheless.. please take a couple minutes to read posts since the last release for any issues that might already have been reported. Thank you.

towerblocks
10th July 2005, 11:30
@towerblocks: lesnick already reported that bug and I confirmed it.. on the very same page nontheless.. please take a couple minutes to read posts since the last release for any issues that might already have been reported. Thank you.

ok prob sorted thanks,But i've ran into another prob,it crashes on 2pass-1st pass,I hit the start button window appears then closes,It's probarbly
something i'm doing wrong here's the log.

Next job job3 is a video job. encoder commandline:
"C:\Megui.2.1.1\mencoder.exe" "C:\Documents and Settings\Administrator\Desktop\buf.avs" -ovc xvid -o NUL: -passlogfile "C:\Documents and Settings\Administrator\Desktop\Megui.2.1.1\logs\2pass.log" -xvidencopts pass=1:bitrate=963:max_key_interval=250:vhq=4:chroma_me:trellis:min_iquant=1:max_iquant=2:min_pquant=1:max_pquant=2:min_bquant=1:max_bquant=2:keyframe_boost=100:kfthreshold=1:kfreduction=20:chroma_opt:zones=1,q,1/60631,q,20
successfully set up video encoder and callbacks for job job3
----------------------------------------------------------------------------------------------------------

Log for job job3

Option xvidencopts: Unknown suboption zones