View Full Version : MeGUI - x264/XviD/lavc/Snow encoder with MP4/MKV/AVI output & audio
QuadraQ
1st November 2005, 04:36
OK I've been trying to do some digging and this is what I've found:
I updated DGIndex to version 1.4.5 (according to the developer's website this is the latest release version). I did a search for DGDecode.dll on my system, and made sure they were all the latest version (including the one in the MeGUI folder).
I'm using a single VOB file as my test. So I launched DGIndex and opened the vob file. I choose to demux all audio tracks, and the "Forced Film" option. I then saved the project as ManualTest.d2v.
I then launched MeGUI and brought up the d2v creator and selected the same VOB file as before. I selected the AC3 audio channel to demux and saved it as MeGUITest.d2v.
Now I opened the ManualTest.d2v file in MeGUI's AviSynth Script Creator and check the "Suggest Resolution" checkbox and click the "Auto Crop" button and then save the script as ManualTest.avs.
Next I followed the same exact procedure except this time I opened the file MeGUI created MeGUITest.d2v, and save the script as MeGUITest.avs.
OK here's the fun part. If I open the ManualTest.avs and then bring up the Bitrate Calculator, the fps show as 23.976 (correct). If I shutdown MeGUI and bring it back up and this time open the MeGUITest.avs and again go to the Bitrate Calculator, the fps show as 25 (incorrect). In addition if I queue the job I get the dead status window problem I'm trying to track down (works fine with the ManualTest.avs).
I did a line by line compare of the two d2v files using ExamDiff 1.6 and the only difference is this line:
ManualTest.d2v
"Field_Operation=1"
MeGUITest.d2v
"Field_Operation=1 (0:None 1:ForcedFILM 2:RawFrames)"
The avs scripts are identical except for the d2v files they point to.
When I remove the " (0:None 1:ForcedFILM 2:RawFrames)" from the MeGUITest.d2v file so that it's identical to the ManualTest.d2v file then everything works (the bitrate calculator shows 23.976 and the encoding job proceeds normally).
Could someone run this test to confirm my results. Thanks.
berrinam
1st November 2005, 05:43
@QuadraQ: :goodpost: This seems to be a result of MeGUI's auto force film (it's in the settings), probably in combination with varying versions of DGIndex. I can reproduce this problem by reducing the Auto Force Film threshold to 0% in MeGUI's settings.
QuadraQ
1st November 2005, 06:17
@QuadraQ: :goodpost: This seems to be a result of MeGUI's auto force film (it's in the settings), probably in combination with varying versions of DGIndex. I can reproduce this problem by reducing the Auto Force Film threshold to 0% in MeGUI's settings.
OK that makes sense! What version of DGIndex are you using?
berrinam
1st November 2005, 06:31
v1.4.0, but it causes the same problems that you described (ie, it shows up as 0.0fps)
What I meant by version considerations is that I do seem to recall some d2v files which had (0:None 1:ForcedFILM 2:RawFrames) in them, and I doubt that Doom9 would accidentally have made MeGUI to insert that line unless it was previously accepted by DGIndex, and so I presume that it was simply a line which is now obsolete.
Doom9
1st November 2005, 08:14
I added that because when I wrote the autoforcefilm code that suffix was in the file (I always wondered why something that looks like comment was in the file, but on the other hand it's nice not to have to search for it).
hpn
1st November 2005, 15:24
Required tools:
.NET Framework 1.1 (http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en) Version 2.0 is currently not supported!
For a few days I've been testing the final 10/27/2005 (not beta) .NET Framework Version 2.0 (http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en) and seems it works fine with MeGUI. I don't want to jump to any conclusion and say it's safe to use, just if other people want to try it and see if they encounter problems.
Sharktooth
1st November 2005, 15:28
i have it installed and it does work (at least with megui-x264).
dimzon
1st November 2005, 15:50
i have it installed and it does work (at least with megui-x264).
.NET Framework support side-by-side execution (so v1.1 may be used)
Doom9
1st November 2005, 16:25
I have downloaded VS2k5, Express, MSDN docu, runtime and SDK but I cannot install it right now.. I might whip up a VM to test it and if it all works out upgrade.. the thing is though I sometimes develop on the way from and to work and upgrading at work means I have to get a lot of colleagues to upgrade because they use software I've written (and am still working on).
stax76
1st November 2005, 17:45
Try to always install the runtime a application was build against. I'm hoping most developers will make the switch to 2.0 soon. Retail version of VisualStudio 2005 as well as SharpDevelop 2.0 is not out yet but hopefully soon.
QuadraQ
1st November 2005, 19:09
I added that because when I wrote the autoforcefilm code that suffix was in the file (I always wondered why something that looks like comment was in the file, but on the other hand it's nice not to have to search for it).
Well I went to the DVD2AVI / DGIndex forum to ask neuron2 about this and this was his reply:
The extra stuff on the strings was removed as of version 1.3.1 beta 8.
So I'm hoping that you'll be able to update MeGUI soon to reflect that. Thanks! :cool:
Doom9
1st November 2005, 19:48
So I'm hoping that you'll be able to update MeGUI soon to reflect that.already done.
@Sharktooth: I've been unable to reproduce your problem in the 0.2.2.9 build.
Doom9
2nd November 2005, 08:21
Regarding AVC Levels I need your input: VBV isn't so much of a problem, but levels impose limits on frame size and bitrate. Now if we're queueing video jobs manually and have the AviSynth script loaded prior to configuration, I can display the appropriate warning right in the configuration. But once you start using profiles the problems start: say you select your profile prior to selecting the input. When do I notify that the level is incompatible with the frame size, and what about the bitrate?
It gets worse in auto mode as there the bitrate may only be known after audio encoding, so I would have to interrupt the queue to ask you if you want to relax the level for a certain bitrate, or reduce the bitrate (thus not achieving your desired size anymore).
One click mode is worst as there prior to encoding I know neither the framesize of the AviSynth script, nor what bitrate I'm getting.
Either way, as soon as we go automated, levels either have to be ignored or I have to interrupt the queue and you can forget about setting up a couple of movies and encode them through the night or while you're at work if you've made one small mistake with regards to levels.
subcool
2nd November 2005, 15:26
i'v come across a really annoying bug in MeGui... "sticking to jobs"
when a job is supposed to be finished, MeGui will _not_ start the next job scheduled...
This is version 0.2.2.8 im using
http://arienai.com/Capture.jpg <-- screenshot
also, when i output a x264 encode in .MP4, i cant playback the MP4 (even when muxed with sound)
So i encode to raw first and then mux audio + video -> MP4 wich works fine.
forgot to mention this, but when i Abort the stuck job and manually start the next job, the resulting file is playable (when muxed) without errors
Doom9
2nd November 2005, 17:29
also, when i output a x264 encode in .MP4, i cant playback the MP4 That is definitely in the wrong thread here.. it's an x264 issue not a megui issue. Using the exact same commandline you will get the exact same file regardless of who runs x264.exe. And I see no logs, commandlines and such.. and how do you know it's a bug if nobody else has a problem?
Sharktooth
2nd November 2005, 17:42
use the "nicefps()" filter in your .avs file: http://mirror05.x264.nl/eMotionEstimation/nicefps.zip
bond
2nd November 2005, 18:10
mp4 files created during an aborted encode will not work. thats the normal behaviour
bob0r
2nd November 2005, 18:24
"new: you can now manually enter a negative audio delay (delay in filenames was always properly recognized)"
:thanks: **** KISS **** :thanks:
hackboyz
2nd November 2005, 19:07
Hi
what means this error:
Log for job job2-4
IsoMedia import - track ID 1 - Video (size 640 x 272)
Error importing D:\Leon\VTS_01_1 T01 3_2ch 448Kbps DELAY 0ms.mp4: Invalid IsoMedia File
----------------------------------------------------------------------------------------------------------
The current job contains errors. Skipping chained jobs
----------------------------------------------------------------------------------------------------------
Log for job job2-4
IsoMedia import - track ID 1 - Video (size 640 x 272)
Error importing D:\Leon\VTS_01_1 T01 3_2ch 448Kbps DELAY 0ms.mp4: Invalid IsoMedia File
an exception ocurred when trying to read from stdout: Key cannot be null.
Parameter name: key
-------------------------------------------------------------------
subcool
3rd November 2005, 01:26
mp4 files created during an aborted encode will not work. thats the normal behaviour
I know that, but if you look at the screenshot. All the frames have been processed ;)
@Doom9:
just because nobody else has the same problem, doesnt mean it can't be a bug :P
i'v had this 'sticking' of jobs in multiple encode over multiple version of MeGui en its kinda annoying when you wanna do long encodes at night.
and if you wanna read logs, here is the log of the job that got stuck:
----------------------------------------------------------------------------------------------------------
Next job job1-1 is a video job. encoder commandline:
"C:\x264\x264.exe" --pass 1 --bitrate 718 --stats "D:\encoding\raws\kaleidoscope\Kaleidoscope.stats" --keyint 240 --bframes 2 --subme 1 --weightb --analyse none --qpmax 27 --ratetol 90 --qcomp 0.9 --me dia --sar 1:1 --progress --no-psnr --output NUL "D:\encoding\raws\kaleidoscope\Kaleidoscope.avs"
successfully set up video encoder and callbacks for job job1-1
----------------------------------------------------------------------------------------------------------
Log for job job1-1
avis [info]: 640x480 @ 23.98 fps (34884 frames)
x264 [info]: no need for a SAR
x264 [info]: using cpu capabilities MMX MMXEXT SSE 3DNow!
x264 [info]: slice I:250 Avg QP:22.16 size: 22593
x264 [info]: slice P:16274 Avg QP:24.32 size: 5707
x264 [info]: slice B:18360 Avg QP:25.93 size: 1001
x264 [info]: mb I I16..4: 43.0% 0.0% 57.0%
x264 [info]: mb P I16..4: 11.5% 0.0% 0.0% P16..4: 36.4% 0.0% 0.0% 0.0% 0.0% skip:52.1%
x264 [info]: mb B I16..4: 0.6% 0.0% 0.0% B16..8: 11.7% 0.0% 0.0% direct: 4.9% skip:82.8%
x264 [info]: kb/s:642.8
Actual bitrate after encoding without container overhead: -174933.45
----------------------------------------------------------------------------------------------------------
The current job was aborted. Stopping queue mode
The current job contains errors. Skipping chained jobs
Richard Berg
3rd November 2005, 06:19
Version 2.0 final may work as well. Please report your findings.
Different versions of the .Net framework install side-by-side. MeGUI will always be run inside the 1.1 framework unless you recompile it with VS2005.
Richard Berg
3rd November 2005, 06:33
Bugs in 0.2.2.9a:
* Tools -> Settings -> OneClick Defaults gives an unhandled exception. Stack trace:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: '2' is not a valid value for 'index'.
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at MeGUI.OneClickDefaultWindow..ctor(Hashtable videoProfiles, Hashtable audioProfiles, Int32 videoIndex, Int32 audioIndex)
at MeGUI.SettingsForm.configOneClick_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)
* Adding/deleting profiles does not refresh the main window. New profiles don't show up; selecting deleted profiles gives an unhandled exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at MeGUI.MeGUI.audioProfile_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.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)
Doom9
3rd November 2005, 09:26
* Tools -> Settings -> OneClick Defaults gives an unhandled exception. Stack trace:And the scenario would be? I see index two meaning you have profiles.. I can't just reproduce it with the amount of information you've given me. I suspect what happened is that you deleted a profile but due to issue number 2 you mentioned, it wasn't removed from the combobox in the main gui, was still selected, then you went to the settings- one click settings, and it tried to set the video profile combobox to the non existing profile.
However, I cannot reproduce your deletion problem either so can you please give me a scenario, starting with a blank megui.exe (no settings, profiles and jobs), how to create profiles and how I can reproduce your second problem?
Different versions of the .Net framework install side-by-side.Does that really work? I'm wondering if I could create 1.1 compatible binaries with VS2.5.. if so I'll probably upgrade shortly (just burned the DVD image yesterday).
@subcool: does using mencoder work? besweet? mp4box? mkmerge? mencoder for avi merging?
@hackboyz: it probably means something is wrong with your mp4 file
stax76
3rd November 2005, 09:55
Of course does side by side execution work, you can install different .NET versions. Assemblies can be installed to the GAC that have same filename but are different in version. Your application will run with the runtime and assembly versions it was compiled against. DLL hell is a thing of the past.
I don't think VS 2005 can compile against .NET 1.1 so you would have to fire up csc.exe by hand. You might have a hard time not to use .NET 2.0 features ;)
Doom9
3rd November 2005, 10:28
hmm... they finally did something right then. This is a major bonus over Java. I know the runtime picks the proper DLL versions but I wasn't aware it also applied to the whole runtime libraries. Thinking about it, it does make sense though. Since you have 2.0 installed and know how to handle a compiler, have you tried compiling MeGUI with the 2.0 csc? It would be neat if I could develop with VS2k5 and then for the release just compile with the 1.1 csc.. but as you said, I've been using the new Java 1.5 features extensively and have missed typed arraylists and hashtables in C# ever since.
stax76
3rd November 2005, 12:42
irc compiling your app didn't even issue a compiler warning. When I started StaxRip in april using DVX as base I enabled "treat all warnings as errors". I got more than hundred compile time errors and warnings as the compiler was much improved. Not to mention I had cross thread gui code *everywhere* which worked fine with 1.1 but it is not permitted with 2.0 (you'll get a nice runtime exception). I knew it shouldn't be done back then but I didn't care since it appeared to work very well. Since I felt like redoing anything (having some lessons learnt...) I wasn't much concerned that my code was completely broke using the new runtime. Anonymous methods can be handy for cross gui code btw, not a VB feature as it don't mix well with basic VB concepts but maybe they'll come anyway.
subcool
3rd November 2005, 14:35
@subcool: does using mencoder work? besweet? mp4box? mkmerge? mencoder for avi merging?
Besweet works, MP4box and mencoder work too. I do not use mkvmerg and avi merging. I only output to RAW and mux that to MP4.
Strange thing is that sometimes is does do the chained jobs (1-1 and 1-2) but then gets stuck on job 1-2.
Doom9
3rd November 2005, 19:44
over multiple version of MeGui en its kinda annoying when you wanna do long encodes at night.with which version did it start?
Is x264.exe still running before you manually abort?
Also, could you run the exact same commandline that gets stuck (does it always? if you restart the job does the same thing happen) in a commandline and paste everything you see here?
Richard Berg
3rd November 2005, 23:13
Your application will run with the runtime and assembly versions it was compiled against.
Yup. I have about 15 versions of the framework on my dev machine...
It would be neat if I could develop with VS2k5 and then for the release just compile with the 1.1 csc..
I don't know if there's a 2.0 compiler switch to warn you before using 2.0-only features, so you'd have to be careful. The 2.0 framework is actually a smaller download than 1.1 was, so if you switch to VS2k5 you may as well have people grab 2.0 instead.
I will see about reproducing that OneClick Settings problem when I get home. I've never been to that dialog before (analog capture = no OneClick for me). I have Sharktooth's x264 profile collection installed.
Sharktooth
4th November 2005, 00:12
@Doom9: x264 has got a new option: trellis quantization.
usage:
-t, --trellis <integer> Trellis RD quantization. Requires CABAC. [0]
- 0: disabled
- 1: enabled only on the final encode of a MB
- 2: enabled on all mode decisions
Doom9
4th November 2005, 08:57
I've just released a build with trellis support.
I'm already working on levels but I have received zero feedback to my questions. Since levels limit framesizes, using levels can be disastrous (if you want to enforce a level, you may need to make compromises on frame size, and likewise, if you don't want to compromise on framesize, you must bump up the level or use unrestricted) so I really need a good way to handle this. I suppose the first release will just take care of the VBV values (the necessary mv option is not exposed in cli anyway) and mb decisions, not frame sizes.
berrinam
4th November 2005, 09:08
I'm already working on levels but I have received zero feedback to my questions.I can't see myself using levels much, but in any automated process, what would seem most logical to me is to give the level precedence over all other settings, ie compromise frame size and/or bitrate to meet the required level.
max-holz
4th November 2005, 09:12
Don't care of my post!!!
Chainmax
4th November 2005, 13:26
I think there's a bug in MeGUI that's been going on since 0.2.2.9a. When configuring the first pass in a 2-pass encode, after selecting a custom matrix the "Video Output" option gets greyed out, and so does the dropdown box with the Mode selection. Any idea why this happens? The only workaround I found is: configure the 1st pass as normal, queue it, close MeGUI, open it again, configure the second pass, queue it and start the encoding.
Doom9
4th November 2005, 13:54
The only workaround I found is: configure the 1st pass as normal, queue it, close MeGUI, open it again, configure the second pass, queue it and start the encoding.The description isn't entirely accurate.. it has nothing to do with the matrix.. it also happens if you just set the profile to high profile, close and reopen the configuration dialog. Should be easy to fix. Here's the workaround: select main profile, then select high profile again and the encoding mode field will no longer be locked. Also, why do you not use automated 2 or 3 pass mode?
netchris
4th November 2005, 14:22
If that aint much trouble, i would like to see a start frame-end frame option in the avisynth script creator (or maybe itll be more noob friendly to make it starting/ending time).
Megui rocks! Thanx alot for your effort Doom9.
:thanks:
Doom9
4th November 2005, 16:55
hmm... I'm assuming you're using a DGIndex project.. and in that case to make audio synch you need to limit the range of your DGIndex project.. if you do it in AviSynth, since there's no audio, limiting the range of frames actually does harm and no good. Or how exactly do you plan to get the audio in synch if you're limiting the encoding range in AviSynth?
ChronoCross
4th November 2005, 17:31
@Doom9
The only way he can do it is in DGIndex...unless he's changing the audio to wav(which is a little umm well dumb) then he could just use audio dub and then trim. but yeah it makes no sense if he's planning on using it with other types of advanced audio.
Perhaps you could add the function for people who are encoding video only. They might be using it to overlay a song or something to a personal movie clip which can always be done later because sync really doesn't matter in that case.
Sharktooth
4th November 2005, 18:27
New x264 option: --b-rdo (requires --subme 6+)
Extends RDO to B-Frames (similar to b-vhq in xvid).
Doom9
4th November 2005, 19:59
@Sharktooth: will do as soon as I'm done with the levels. I can already force the non source dependant things and I've added a nice little check that you can run against your source and that can automatically increase the level to match your source if the current level isn't enough. I plan on using something similar for the one click mode to reduce the resolution until it matches the required level.
Sharktooth
4th November 2005, 20:35
cool :eek:
Chainmax
5th November 2005, 01:10
Also, why do you not use automated 2 or 3 pass mode?
I will try that, is it any different from manually setting the two passes?
netchris
5th November 2005, 01:52
Im encoding mpeg files (dvb source- video clips in exact), so i have to use DGIndex to create d2v files. I only play with video (testing different x264 options for my own sake). This can be done with creating new d2v files (each time containing the frames i want to process) but its easier having a starting full video-clip-d2v and just choose the portions of the clip i want to play with each time.
This can be done by manually editing the avs file (adding trim() ) but it would be easier to have such an option ready at the gui.
(Im sure i could have said all that with less words so sorry for the big message)
Im aware of the problems related to audio (when using the full audio clip while part of the vid), but doesnt the Nero aac encoder or the Faac codec have an option to choose the starting time and end time of the audio clip you want encoded (encode part of the audio clip)? If the timestamps are the same as the ones in the video, wouldnt they be synched?
Doom9
5th November 2005, 01:52
I will try that, is it any different from manually setting the two passes?less work... and if you insist you can still load the jobs from the queue and reconfigure them.
Doom9
5th November 2005, 02:11
A new build is out.
A few words about the level feature: levels enforce VBV and certain macroblock values. But AVC levels mostly concern source properties, which may not be known at configuration time. Hence, I have added a new tool called AVC profile validation. After loading a video source, you can use it to verify if your source can be encoded at the selected level. If not, you're informed which level is needed for your source and you'll have an option to automatically change the level accordingly. In one click mode, if your video profile has a level set, the resolution will be adapted until the movie can be encoded fullfilling your desired level. In extreme circumstances (say you're selecting a very low level), this could lead to the output no longer being as large as desired because the resolution has to be reduced considerably, so chose your levels wisely. In addition, please refer to aku's posts about levels and how they apply to x264.
DeadRinga
5th November 2005, 03:29
I am having trouble with the D2V creator. When i put in the vob and select an audio track pressing Queue doesnt do anything. If i check both the checkboxes at the bottom the window just closes. I've got the newest version of dgindex and i made sure it was in the MeGUI folder. I'm using 0.2.3.1
DeadRinga
5th November 2005, 06:32
Nevermind. It adds it as a separate job. Just found it.
bond
5th November 2005, 14:38
doom9, is it ok that with high levels p4x4 isnt useable anymore, but with low levels it is?
Doom9
5th November 2005, 14:49
did you check out the link in the changelog? It explains it.. it's needed for compliance.
charleski
5th November 2005, 14:50
For a few days I've been testing the final 10/27/2005 (not beta) .NET Framework Version 2.0 (http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en) and seems it works fine with MeGUI. I don't want to jump to any conclusion and say it's safe to use, just if other people want to try it and see if they encounter problems.
I've had .NET v2.0.50215 installed for a couple of weeks now and MeGUI works fine with it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.