View Full Version : MeGUI - x264/XviD/lavc/Snow encoder with MP4/MKV/AVI output & audio
Doom9
3rd July 2005, 01:56
the new version is out. enjoy
buzzqw
3rd July 2005, 09:30
Hi !
some notes:
if in configuration of avc i choose ABR, and then on main window autoencode a job for 2 pass encoded is created
Would be better to use antoencode to determinate the bitrate for avc choiced configuration ?
or, is possible to integrate a mini bitrate calculator to calculate exactly the bitrate needed ?
in d2v creator if i stick "On close load file" after demuxing this option isn't fuctional
in avisynth script generator dgdecode.dll isn't loaded, so the script do not run (i haven't set a avisynthdir plugin in my registry for conflict between filter dll), could be useful to set path to filters dll in tools -> setting
in avisynth script generator after creating a project and avs script, after checking "On save close and load to be encoded", when i close the script isn't loaded, the preview yes, but not the "avisynth script" to be encoded
Thanks Doom9
BHH
(and sorry for my english)
JoeBG
3rd July 2005, 09:43
the new version is out. enjoy
And it´s great, thanks a lot.
Ishan
3rd July 2005, 11:27
@Doom9
Could you add a way to select the audio sample rate ? I'm trying to do a PSP compliant MPEG4 SP+LC AAC file but audio is always set @ 44.1 wich the PSP don't like.
It needs to be 24khz (thx Sony :| )
Pasqui
3rd July 2005, 11:46
@Doom9
Thanks for this new version. It works great !
So far, I've found only two small issues:
- in D2V creator, the word "Français" is displayed as "Franais" as if extended charset was not supported
- in auto encode panel, when configuring the muxing, the avi extension is automatically added even if a MP4 file is muxed.
It needs to be 24khz (thx Sony :| )
not only that
the .mp4 files which should play on the psp also need to have some extra info not defined by mpeg-4, so you will not be able to play the output from megui directly anyways, but need to remux the file again to make it psp-compatible (if such a tool exists)
Doom9
3rd July 2005, 11:47
if in configuration of avc i choose ABR, and then on main window autoencode a job for 2 pass encoded is created
Would be better to use antoencode to determinate the bitrate for avc choiced configuration ?Have you tried running the jobs? The bitrate is automatically calculated and adjusted according to the effective audio size you get (in case you're doing audio encoding as well, not just audio muxing).
In order to reach the target size, two or three pass encoding is required. You can configure which one of the two is done in the settings, and override that in the codec configuration dialog (if the codec you're using it set to automated 2 or 3 pass that one is taken, anything else (except for CQ where I abort right away) leads to the number of passes configured in the settings. The bitrate you specify in the configuration is not used in auto-mode whatsoever, it is always overridden by the calculated one.
or, is possible to integrate a mini bitrate calculator to calculate exactly the bitrate needed ?Not needed, it is done automatically and I take care of all container overhead you'll get as well.
in avisynth script generator dgdecode.dll isn't loaded, so the script do not run (i haven't set a avisynthdir plugin in my registry for conflict between filter dll), could be useful to set path to filters dll in tools -> settingI have considered and discarded that back when creating the avisynth window. Why? I use 3 computers for development, and each of them has a different AviSynth configuration.. so when transfering my source material I neded up having to adjust AviSynth scripts because the plugin path was hardcoded. It it much easier for most users to have the script auto-load and not having to worry about absolutel paths. If you're not using plugin auto-loading, that means you know just fine what you're doing and are capable of adding the appropriate line by yourself, wouldn't you agree?
Ishan
3rd July 2005, 11:49
Some of the psp video encoder (like pspvideo9) use ffmpeg for encoding, I assume they found out what to mux with the stream to make it works.
Gotta check that out.
Doom9
3rd July 2005, 11:56
in avisynth script generator after creating a project and avs script, after checking "On save close and load to be encoded", when i close the script isn't loaded, the preview yes, but not the "avisynth script" to be encodedfixed in the new version
Could you add a way to select the audio sample rate ? I'm trying to do a PSP compliant MPEG4 SP+LC AAC file but audio is always set @ 44.1 wich the PSP don't like.
It needs to be 24khz (thx Sony :| )Eww, bad audio quality. Though the thing is.. you cannot use MeGUI for the PSP.. the MP4 files it creates are not compatible with the PSP since sony had the foresight to break the MP4 specs.. you need a special ffmpeg build to create MP4s that the PSP can handle (at least that's what all the FAQs say). So, if the MP4s MeGUI create will never be PSP compatible (please verify and report back), it obviously makes no sense to add downsampling.. it just gives people the idea that they could use the output for the PSP which is in fact misleading.
in auto encode panel, when configuring the muxing, the avi extension is automatically added even if a MP4 file is muxed.I cannot reproduce that.. please elaborate. When you set filetype to MP4, auto-encode will run in MP4 mode (so naturally the extension is mp4), when you set filetype to AVI, auto-encode will run in AVI mode, so naturally the extension is AVI.
Doom9
3rd July 2005, 12:02
in d2v creator if i stick "On close load file" after demuxing this option isn't fuctionalI cannot confirm that.. works fine here. Three things happen when I activate that option: VOBInputWindow closes, in the main GUI I have audio input configured (AC3 file as input, mp4 as output... audio codec was previously set to AAC), and the avisynth creator window opens with the d2v project preselected and the preview window present. What are your demuxed audio files called? What exactly doesn't work (guide me through it step by step).
Ishan
3rd July 2005, 12:10
ok, I checked out how they encode a compliant file.
It's just MPEG4 SP + LC AAC@24khz in mp4 container and they use the -title "mytitle" option of ffmpeg (wich I think makes it "compliant" to Sony mp4 format)
Doom9
3rd July 2005, 12:11
- in D2V creator, the word "Français" is displayed as "Franais" as if extended charset was not supportedI've seen that.. not quite sure why that happens.. I thought StreamReader was capable of handling the default codepage. Turns out it seems to default to ASCII. I've now forced it to using the System's default codepage and special characters (I tried ~ and ç) are properly shown now.
Doom9
3rd July 2005, 12:12
@Ishan: well, it's a special ffmpeg build. If you can manage PSP compliant files muxed with mp4box let me know and I might support it.. but unless I'm sure my output can be played I won't touch the featureset and mislead people into believing they can use MeGUI to create PSP content when in fact they cannot.
Ishan
3rd July 2005, 12:14
Ok, I wasn't aware it was a special build ^^
My bad :)
lesnick
3rd July 2005, 13:47
In meGUI 2.0.0.6 i can`t use 1st pass:
Next job job1-1 is a video job. encoder commandline:
"E:\My things\Prog\meGUI\tool\mencoder.exe" "" -ovc lavc -o NUL: -passlogfile "2pass.log" -lavcopts vpass=1:vbitrate=825:vqdiff=2
successfully set up video encoder and callbacks for job job1-1
----------------------------------------------------------------------------------------------------------
Log for job job1-1
File not found: ''
Failed to open
Cannot open file/device.
Doom9
3rd July 2005, 13:55
In meGUI 2.0.0.6 i can`t use 1st pass:Quote obviously, there's no video input defined.. can you tell me how you created this job, starting from you starting up MeGUI?
buzzqw
3rd July 2005, 14:01
Have you tried running the jobs? The bitrate is automatically calculated and adjusted according to the effective audio size you get (in case you're doing audio encoding as well, not just audio muxing).
i try to explayn better:
i want to do 1 pass (and only) abr encoding.
even if i choose abr in avc config, and use autoencode to determinate bit rate given a specified size (kb) , on automatic encoding windows on click on queue , a 2 pass job is created. I want 1 pass abr at bitrate calculated by autoencode
Not needed, it is done automatically and I take care of all container overhead you'll get as well.
but for 1 pass encode ?
not having to worry about absolutel paths. If you're not using plugin auto-loading, that means you know just fine what you're doing and are capable of adding the appropriate line by yourself, wouldn't you agree?
OK, i agree. Not happy but i agree
in d2v creator if i stick "On close load file" after demuxing this option isn't fuctional
What exactly doesn't work (guide me through it step by step).
start megui (great appz !!)
tool -> d2v creator
open a vob (just a vob laying around in hd, no ifo, vts info...)
choose d2v project output
click on prepare
after the run of dgindex, click "On close load files"
click on exit (X)
no project is loaded
hope that helps !
BHH
Doom9
3rd July 2005, 14:08
no project is loadedWhat about the audio configuration.. what did you chose there? Is it a series of vobs or a single one?
but for 1 pass encode ?Not supported. 1 pass means CBR for lavc, snow and XviD, which is about the worst thing you can do, and ABR still means a non optimal bitrate distribution, and less accuracy hitting the target size. However, since the calculated bitrate is automatically shown, you can just go into the autoencode window, note the calculated video bitrate, get back to the main screen, plug the bitrate into the x264 config, and press Queue to just encode the video. One pass in auto mode is not supported for the reasons explained in this and my last reply. I know there's a lot of OPV this OPV that going on in this board and I see programmers spend an outrageous amount of time getting this thing to work for a scenario it's not meant for. So I have decided not become another one of these programmers.
The bitrate calculation even works if you configure an audio stream for encoding that you're going to mux later on.. but not knowing the size in advance, obviously the bitrate isn't as accurate as it could be.
berrinam
3rd July 2005, 14:15
start megui (great appz !!)
tool -> d2v creator
open a vob (just a vob laying around in hd, no ifo, vts info...)
choose d2v project output
click on prepare
after the run of dgindex, click "On close load files"
click on exit (X)
no project is loaded
hope that helps !
BHH
Actually, that checkbox really means: once dgindex has closed, close d2vprojectcreator and open files in avisynth window. It isn't supposed to load files when the d2v project creator is closed.
Doom9
3rd July 2005, 14:17
after the run of dgindex, click "On close load files"
click on exit (X)Urgh.. I completely missed that.. thanks berrinam. I guess I shouldn't just read diagonally.
Doom9
3rd July 2005, 14:44
@amed: good news: the next version is able to handle your stream info files.
Doom9
3rd July 2005, 15:07
so the new version is out now. The file is smaller because 0.2.0.6 was a debug build (my new PC crashed and ruined the Visual Studio installation so I simply put up the debug build that I already had)
A word about the automated threepass mode that I forgot to mention before: if you uncheck "Overwrite Stats File in 3rd pass", and do an automated 3 pass, you'll get video jobs of the following types:
3 pass 1st pass
3 pass 2nd pass
2 pass 2nd pass
Don't worry about that, it's just that 3 pass 3rd pass updates the stats file again, whereas 2 pass 2nd pass doesn't.. this has no influence at all on the resulting file but just keeps the stats file from the 2nd pass.
Sharktooth
3rd July 2005, 15:34
bug 1: when loading custom matrices it searches for .txt files even even if .cfg files are selected in the dropdown list.
bug 2: the custom matrix editor parser needs to be fixed coz it erratically says "invalid quantizer..."
suggestion1: to avoid confusiom it's better you disable lossless option in modes other than CQ (i know it automatically switches to CQ...)
suggestion2: add "queue" button to AVI and MP4 muxers.
suggestion3: add "normalize volume" in the audio codec config
Doom9
3rd July 2005, 15:55
bug 2: the custom matrix editor parser needs to be fixed coz it erratically says "invalid quantizer..."Please post a sample file that you loaded.. I used the intial 3 matrices posted in this forum for testing and they seem to be working just fine.
bug 1: when loading custom matrices it searches for .txt files even even if .cfg files are selected in the dropdown list.There are two instances.. it looks like the one in the quantizer editor works and the one in the x264 configuration dialog doesn't.
suggestion3: add "normalize volume" in the audio codec configI use hybridgain automatically (see commandline: -ota( -d 0 -g max )) isn't that even better than to give people the ability not to perform anything and end up flooding the audio forum with "my audio is too low" posts?
suggestion2: add "queue" button to AVI and MP4 muxers.The mux button really is a Queue button.. it queues the job.. it'll only be started if autostart is enabled in the settings. Should I rename the button?
Sharktooth
3rd July 2005, 16:04
bug 2: it's my AVC HR matrix (find it in my sig. or in x264CLI rev.270B).
bug 1: right
suggestion 3: some ppl prefer to keep the original volume. maybe adding that option and have it enabled by default would fit.
suggestion 2: yes, less confusing.
Doom9
3rd July 2005, 16:53
about the matrices
here's how a line of an 8x8 matrix looks in the reference format (jvt matrix):
6,10,13,16,18,23,25,27,
and here's one of your lines
6, 7, 8,10,12,14,16,18
You use a trailing comma at the end of each line for the 4x4 matrices (except for the last line), but none for the 8x8 matrices. So if you adapt your matrix to the standard format it'll work. The x264 parser might be more forgiving, MeGUI expects exactly the standard format.
suggestion1: to avoid confusiom it's better you disable lossless option in modes other than CQ (i know it automatically switches to CQ...)I'm not at all convinced.. the way it is now.. people realize that CQ mode is a must.. if they don't know that.. they come here asking "how do I use lossless mode" and we have to tell them "lossless mode is used when you set the quantizer to 0 so you have to use CQ mode and set the quantizer to 0". The way it is now, they select high profile, click on lossless mode, and that's that.
Yama4050242
3rd July 2005, 18:31
newbie problem:
i encode the video through megui with a .mp4 output instead of .264, then how to set the fps, since my source is 29.9 progressive,but the output is 25 fps,thx
Doom9
3rd July 2005, 19:13
@Yama4050242: please have a look at my generic problem reporting guidelines: http://forum.doom9.org/showthread.php?t=96137
As it is now I have to ask you a dozen questions to get an idea about what you're doing. I kindly ask that you do provide all that info without me having to ask for it. AS a general rule, if you tell people everything you do since the start of the program in question, it makes things much easier. For instance, MeGUI supports 4 codecs.. since you have an MP3 I know it's not Snow but that still leaves 3 other possibilities, plus two different encoders for x264. Then, there's a manual mode, a manual mode in which multiple jobs are generated, and an automated mode. That alone gives us 4 * 3 = 12 permutations not taking into account any settings you may have changed, or how you determine that the output has the wrong framerate. I also don't see a logfile.. for instance if there was a problem detecting the framerate, the log would possibly reflect upon that.
Doom9
3rd July 2005, 19:37
Bugfix release for automated 2/3 pass encoding is out. Sorry for breaking things.. it worked when I tested it yesterday night.
@lesnick: this should take care of your problem.
nightrhyme
3rd July 2005, 20:49
Sounds like a nice app. Decided to give it a try. Downloaded all the appropriate appz's (inluding 7z) only to find out I'm not able to unpack X264CLI_rev270B_mmx.7z (not supported archive) Why do people insist on using this futile compression tool :(
Yama4050242
3rd July 2005, 20:57
ok, i c, detail, i am using megui(0206) with x264.exe(rev.207) as an encoder to encode my 29.9 fps progressive hd mv capture to .mp4 as an output with onli video, i guess it wouldnot change the framerate, but it did so(change to 25)
second pass log
job job1-1 has been processed. This job is linked to the next job: job1-2
Next job job1-2 is a video job. encoder commandline:
"xxxxxxxxx\x264.exe" --pass 2 --bitrate 2048 --stats "2pass.log" --ref 3 --bframes 3 --no-b-adapt --b-pyramid --subme 6 --weightb --analyse all --8x8dct --me esa --progress --no-psnr --output "xxxxxx\xxx.mp4" "xxxxxx\xxx.avs"
successfully set up video encoder and callbacks for job job1-2
----------------------------------------------------------------------------------------------------------
Log for job job1-2
avis [info]: 1024x576 @ 29.97 fps (5999 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
mp4 [info]: initial delay 200 (scale 2997)
x264 [info]: slice I:140 Avg QP:26.49 Avg size: 23127
x264 [info]: slice P:1739 Avg QP:27.72 Avg size: 13815
x264 [info]: slice B:4120 Avg QP:29.53 Avg size: 7105
x264 [info]: slice I Avg I4x4:9.2% I8x8:38.2% I16x16:52.6%
x264 [info]: slice P Avg I4x4:3.1% I8x8:23.3% I16x16:36.1% P:20.7% P8x8:1.2% PSKIP:15.5%
x264 [info]: slice B Avg I4x4:1.7% I8x8:9.6% I16x16:9.2% P:29.0% B:5.0% B8x8:2.1% DIRECT:4.4% BSKIP:38.8%
x264 [info]: 8x8 transform intra:41.2% inter:51.2%
x264 [info]: kb/s:2259.5
Actual bitrate after encoding without container overhead: 2259.70
desired video bitrate of this job: 2048 kbit/s - obtained video bitrate: 2262.50457221537 kbit/s
my avs did not apply any filter but just add the .d2v then return video
my question is how to tell the encoder"hi, dont change my framerate!!!"
@ nightrhyme:
http://sourceforge.net/projects/sevenzip
compresses tighter than almost any other tool - that's why! ;)
__
P.S.: Looks like the new .7z archives require at least 7-zip v4.2x (current version is 4.23). If it still doesn't decompress, you might have received an incomplete archive and should download again.
I was able to unpack it with version 4.20.
Doom9
3rd July 2005, 21:24
@Yama4050242: now we're talking. There's no muxing going on so no error on my part and x264 properly detects the framerate. Question is.. how do you figure the framerate is wrong? If your player tells you so.. perhaps your player is wrong? Stranger things have happened. Or is the video effectively running too slow.. it's a 17 % difference so it would definitely be clearly visible. And you're not muxing this video only mp4 you got from megui? I'm asking because I know that mp4box uses 25fps when muxing anything unless you override the default framerate.
Doom9
3rd July 2005, 21:25
you can also unpack 7zip files with a recent version of Winrar.. that's how I do it. Unfortunately I cannot control how other people redistribute software and those tools that come in 7zip format are changing very often (sometimes several times a day) I cannot have my own redistribution.. it would just cut into the time I spend developing and I'm convinced that that time is better spent developing and helping people rather than to download and repack x264 and mencoder builds.
Yama4050242
3rd July 2005, 21:29
ffdshow tells me my video is 25 fps, i havent mux the video with audio yet, since i notice the .264 output can use the framerate configurator, but if the video input for the muxer is .mp4, i can not configurate it since it's grey
Doom9
3rd July 2005, 21:50
ffdshow tells me my video is 25 fps,alright.. you didn't check if it actually ran at a wrong framerate, did you? I dare you to try. Chances are you'll find that ffdshow always reports 25 fps.. I just checked with a 23.976fps source (that is perfectly in synch with the audio that belongs to it)..
Yama4050242
3rd July 2005, 21:55
i check using mpc Ctrl+g for the original file to find out where it is, then use mpc to play the encoded file, Ctrl+g and give the frame number i got in the original file, the pic is not the same. i just want to find out if my 2m video can beat the aveage 8m mpeg2 file, so i need the same pic to compare
Yama4050242
3rd July 2005, 22:03
original frame 2966, 29.970
i checked my encoded video with both 2996, 25.000 and 2996, 29.970, the 2 are differ from the original one
Doom9
3rd July 2005, 22:10
come on, please.. does the video run 17% slow or not? mux audio and see for yourself..
I have ample experience with the go to function to know not to trust it. Half the DS filters don't go to the right frame.. plus then there's the b-frame issue (they cause delays).. just read the damned codec comparison for my rant on this issue.. or ask somebody writing DS filters.. try bobololo from ateme for instance.. we've had discussions on this during the last codec comparison.
Yama4050242
3rd July 2005, 22:32
no, the time is the same, not slow, maybe i try the .264 output.
is there a way to check the real framerate?
and if my source is 29.97 fps, then no matter what format i set to the output, it should be the same as source no matter how the decoder may play on it, am i right?
and how to play the .264 file, they should be playable right?
Doom9
4th July 2005, 07:16
you can't really play the raw streams. But here's my last attempt at trying to convince you that ffdshow is full of shit: plug in "--fps 29.97" into the Custom Command Line options in the More tab of the x264 codec configuration dialog.. that forces 29.97 output. It will not change anything because x264.exe uses the input fps as output fps.. but just so that you can sleep during the night. Or even better: try mp4box on the file.. here's the commandline: mp4box -info your-mp4.mp4. It'll tell you the properties of the streams.
Seriously though this is it for me. If you trust ffdshow over anything else, even common sense (muxing in audio, compare playlength and playback speed of source and encoded material), nobody will take you seriously around here.
Ishan
4th July 2005, 07:22
I can confirm ffdshow is often reporting false frame rate. I often get 25fps while the stream is in fact 23.976...
Sharktooth
4th July 2005, 12:10
Sounds like a nice app. Decided to give it a try. Downloaded all the appropriate appz's (inluding 7z) only to find out I'm not able to unpack X264CLI_rev270B_mmx.7z (not supported archive) Why do people insist on using this futile compression tool :(
Futile? It's the best compressor around... however if you watched the build changelog, you would have known i used 7zip 4.23 to compress the files...
Sharktooth
4th July 2005, 12:15
about the matrices
here's how a line of an 8x8 matrix looks in the reference format (jvt matrix):
6,10,13,16,18,23,25,27,
and here's one of your lines
6, 7, 8,10,12,14,16,18
You use a trailing comma at the end of each line for the 4x4 matrices (except for the last line), but none for the 8x8 matrices. So if you adapt your matrix to the standard format it'll work. The x264 parser might be more forgiving, MeGUI expects exactly the standard format.
I removed the trailing comma (it was a bug in my matrix editor) but i'll keep the alignment for better readability.
Hope it wont cause problems.
EDIT: ehr... megui still doesnt want to read it... :(
Doom9
4th July 2005, 13:25
I removed the trailing comma (it was a bug in my matrix editor) but i'll keep the alignment for better readability.Alignments won't cause problems, but I'm afraid you misunderstood.. your 8x8 matrix lack the trailing comma.. the default jvt matrix from the avc reference code has that trailing comma.. so my matrix editor looks for it and uses it as quantizer separator. Your 8x8 matrix looks as follows when read
1,2,3,4,5,6,7,8 9,10,11,12, 13, 14, 15, 16
then I separate the string by comma.. so these two lines turn into the following lines (quantizer separated by -)
1-2-3-4-5-6-7-8 9
10-11-12-13-14-15-16
and in the end I don't have all the 64 values as the value at the end of a line and the first of the subsequent value are combined.. and "8 9" cannot be parsed into an int directly. So quant = Int32.Parse("8 9"); throws an exception, which in turn leads to the "invalid quant" error message.
Sharktooth
4th July 2005, 13:59
...going to buy a pair of googles...
Doom9
5th July 2005, 19:18
I see that you've added the trailing comma. If you encounter any problem with my matrix editor please let me know.. I don't think it's a widely used feature and I may not have tested it enough.
Sputnik776
5th July 2005, 23:31
I'm trying to use MyGUI but I'm running into an error at a very basic level. I'm trying to open an avs file but get the AVIStreamGetFrameOpen failed error. The same avs file opens fine in both virtual dub 1.6.8 and wmp. Video file in question is using HFYU codec at 640x480. Script posted below.
# Created by AVSEdit
# Admin 6/14/2005
AVISource("c:\quake3sh.avi")
berrinam
6th July 2005, 11:52
Hello Sputnik776. Welcome to this forum.
I was able to reproduce your error after a bit of testing. While VirtualDub will not throw an error when opening an avs file without a YV12 decoder, VirtualDubMod will, and MeGUI will throw the AVIStreamGetFrameOpen error for the same reason. Try installing a YV12 decoder (ffdshow, and set Raw Video decoding to All supported in the VFW codec configuration; XviD should also work).
Sharktooth
6th July 2005, 14:11
I see that you've added the trailing comma. If you encounter any problem with my matrix editor please let me know.. I don't think it's a widely used feature and I may not have tested it enough.
will do ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.