View Full Version : MeGUI - x264/XviD/lavc/Snow encoder with MP4/MKV/AVI output & audio
If you are not yet very experienced, only use {1-pass:CRF or 2-pass:bitrate}, speed preset, content tuning, and possibly playback device. If you like, make your own profile with these options.
3-pass encoding is not recommendable in general. It was an attempt to optimize very low bitrate encodings, but the results might look even more artifical than a 2-pass or CRF encoding, due to a more narrow quantization range. Nothing substitutes "enough bitrate".
daemon_k
22nd May 2013, 18:21
Thank you for your reply.
There are three problems are not very clear. What I mean is:
1, "{1-pass: CRF or 2-pass: bitrate}" What does this mean?
Is not to be understood as: "1-pass: CRF" <=> "Targeting quality (Default: Quality = 23.0)" And "2-pass: bitrate" <=> "Targeting file size (Default: Bitrate = 1000)" ?
2, if this understanding is correct, then when using the 2-pass approach, based on your experience, to achieve different quality, you can set the bitrate roughly how much?
For example the following three scenarios:
A: canopus chqx Lossless (1440 * 1080i) -> Blu-ray
B: Blu-ray Re -> 1080
C: Other -> ipad
3, if you need to import "MeGUI-x264_generic_profiles_v85.zip"? These profiles and Megui 2341 compatible? Or is one of those that can be used in Megui2341?
Thank you again!
Betsy25
23rd May 2013, 04:39
Zathor,
FYI x264 r2334 is now stable.
Zathor
23rd May 2013, 07:10
1, "{1-pass: CRF or 2-pass: bitrate}" What does this mean?
Is not to be understood as: "1-pass: CRF" <=> "Targeting quality (Default: Quality = 23.0)" And "2-pass: bitrate" <=> "Targeting file size (Default: Bitrate = 1000)" ?
2, if this understanding is correct, then when using the 2-pass approach, based on your experience, to achieve different quality, you can set the bitrate roughly how much?
3, if you need to import "MeGUI-x264_generic_profiles_v85.zip"? These profiles and Megui 2341 compatible? Or is one of those that can be used in Megui2341?
My opinion: Use bitrate only when you need to hit a specific file size. The bitrate will then be set automatically. Otherwise use the "quality" mode and choose different values there until you find your value.
Do not use the old profiles anymore. They are no supported.
FYI x264 r2334 is now stable.
Thanks - updated.
@ daemon_k:
1) OK, a little more like pseudo-code: I meant that you should use only
{EITHER target quality OR target size} AND preset AND tuning [AND MAYBE playback device]
but you should not change any more advanced options unless you studied their meaning thoroughly. The mentioned basic options were well balanced (in relation to each other) by the developers with probably more experience than the average user.
superhil
24th May 2013, 18:51
just curious, how to reencode vfr video?
I always get audio out of sync when reencode using MeGUI
(video length is exactly same with original, but different fps)
Simple tools made by LoRd_muldeR works very fine (link (http://forum.doom9.org/showthread.php?t=144140))
What's basic difference between both of them?
---
edit:
---
I think I found the basic difference between those two,
LoRd_muldeR's tool using avs2yuv, while MeGUI using avs4x264mod for piping
I'm a newbie in encoding, could somebody please explain it?
Thank you very much
DoctorM
8th June 2013, 06:32
I noticed in some recent update DXVA's settings were changed to "--level 4.1 --vbv-bufsize 78125 --vbv-maxrate 62500".
Isn't that Level 4.2? Searching I can find no explanation for the change.
detmek
8th June 2013, 10:12
No, VBV values are correct for Level 4.1 High Profile.
Look here (http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels).
Also read the first line of text below the table.
DoctorM
8th June 2013, 19:06
So was the previous line of "--level 4.1" wrong or is the addition of the bufsize and maxrate a tweak to compensate for changes made in the x264 code?
jq963152
8th June 2013, 22:53
So was the previous line of "--level 4.1" wrong or is the addition of the bufsize and maxrate a tweak to compensate for changes made in the x264 code?
You might want to read through the following thread:
http://forum.doom9.org/showthread.php?t=165627
;)
detmek
8th June 2013, 23:14
--level parametar only limits refferent frames if those are not manualy specified. If you want fully compliant video stream you need to manualy add --vbv-maxrate and -vbv-bufsize.
DoctorM
9th June 2013, 00:07
So then you all are saying the old preset was wrong and anything previously encoded using that setting is not compliant.
I'd been using DXVA as a general setting since Level 4.1 is frequently considered compatible with more devices.
How is that effected by the new maxrate and bufsize? Are we talking more compatible?
detmek
9th June 2013, 11:17
I don't know what settings are used by old DXVA preset. But even without VBV settings those files should be DXVA compliant as VBV restrictions are very high. Consider that Blu-Ray uses --vbv-maxrate 40000 and --vbv-bufsize 30000 with average bitrate 20000-30000kbs. And people usually use lower average bitrate which, in most cases prevents spikes over 62500kbs.
Basically yes, new preset should be more compatible if old preset did not contain VBV restrictions.
DoctorM
9th June 2013, 20:43
Thanks. That does indeed clarify things.
Is it reasonable to believe that the DXVA setting (as that stand now) is a better 'General' setting than the Default preset (which does not have any restrictions or Level 4.1?
I've been doing encodings (mostly 720p) that I'm currently watching on a PC but would like to have future compatibility with standalone devices or 'smart' TVs. I'm aware that many of these devices do have a Level 4.1 restriction.
SHaKOL
10th June 2013, 12:49
Hi
does MeGUI encode 10-bit video? and would you add all the things in x264gui like encodeing 10-bit videos and such.
thanks in advance.
LigH
11th June 2013, 07:14
The simple way: You can exchange the tools\x264\x264.exe against a 10 bit version. But it will still receive YV12.
Handling higher bitdepths and finer chroma subsampling requires both manually editing the script and adding custom command line parameters. MeGUI will not (yet?) add these by checking a box.
Zathor
11th June 2013, 20:55
Please tell me what need to be changed and I may add it (without ETA)
LigH
12th June 2013, 07:44
A first step would be, similar to supporting both 32 and 64 bit architecture compiles of x264, also supporting both 8 and 10 bit channel depth compiles alternatively. There are many reports that the 10 bit channel bitdepth support already enhances compression efficiency, even with provided default YV12 video (YUV 4:2:0). Unfortunately, most consumer decoder chips may not support the AVC profile high10.
AviSynth 2.6x also supports finer chroma subsampling (e.g. YV16 or YV24 (http://avisynth.nl/index.php/Convert)). To feed x264 with such video, it will require the use of the parameters --input-csp and --output-csp, and will lead to even less compatible AVC profiles (high422, high444). And many plugins may not support these color spaces.
Possibly beyond capabilities of a script generating GUI may be the support of Deepcolor filters (http://avisynth.nl/index.php/External_filters#Deepcolor_Filters), they may require manual script editing...
detmek
12th June 2013, 10:22
A first step would be, similar to supporting both 32 and 64 bit architecture compiles of x264, also supporting both 8 and 10 bit channel depth compiles alternatively. There are many reports that the 10 bit channel bitdepth support already enhances compression efficiency, even with provided default YV12 video (YUV 4:2:0). Unfortunately, most consumer decoder chips may not support the AVC profile high10.
AviSynth 2.6x also supports finer chroma subsampling (e.g. YV16 or YV24 (http://avisynth.nl/index.php/Convert)). To feed x264 with such video, it will require the use of the parameters --input-csp and --output-csp, and will lead to even less compatible AVC profiles (high422, high444). And many plugins may not support these color spaces.
Possibly beyond capabilities of a script generating GUI may be the support of Deepcolor filters (http://avisynth.nl/index.php/External_filters#Deepcolor_Filters), they may require manual script editing...
+1
Although most hardware decoders do not support 10-bit video or other color spaces there are a lot of people (like me) who use PC for watching videos on monitor or TV connected via HDMI.
10-bit support should be easy to add, just like x64 binaries and checkbox.
For other color spaces Avisynth should be updated to 2.6 and AVS Script Creator would require a checkbox (or checkbox + dropdown box) for ConvetToYVxx. Plus, input/ouput csp dropdown box in x264 configuration dialog.
jq963152
12th June 2013, 10:53
And also add the appropriate profiles to the AVC Profile dropdown list in the MeGUI x264 configuration dialog, namely: High 10 Profile (--profile high10) and High 4:2:2 Profile (--profile high422) and High 4:4:4 Predictive Profile (--profile high444).
And make sure to apply the correct VBV restrictions for those profiles.
As you already know, for --profile high the VBV restrictions are 1.25 times higher than those of --profile baseline / --profile main.
So:
For --profile high10 the VBV restrictions are 3 times higher than those of --profile baseline / --profile main.
And for --profile high422 and --profile high444 the VBV restrictions are 4 times higher than those of --profile baseline / --profile main.
luke83
10th January 2014, 23:58
Error with ASS subtitles
Repack/encoder video to MP4 for Apple iPhone, iPad, ATV2. MkvToMp4 version 0.224 (x32)
Build from: Sep 24 2013 14:57:33
Use log file: ../Temp/Logs\10_01_2014_23_48_46.txt
CoreAudioToolbox version: 7.9.7.3
Added on list: D:/Video/Naruto/HD/Shippuden 4/082 - Squadra Dieci.mkv
Started processing file: D:/Video/Naruto/HD/Shippuden 4/082 - Squadra Dieci.mkv
Starting MkvExtract with the parameters:
../Tools/mkvextract\mkvextract tracks "D:/Video/Naruto/HD/Shippuden 4/082 - Squadra Dieci.mkv" 0:"../Temp/video.264" 1:"../Temp/082 - Squadra Dieci_internal_audio_2.AAC" 4:"../Temp/082 - Squadra Dieci_internal_sub_5.ASS"
Estrazione traccia 0 con ID codec 'V_MPEG4/ISO/AVC' nel file '../Temp/video.264'. Formato contenitore: AVC/h.264 elementary stream
Estrazione traccia 1 con ID codec 'A_AAC' nel file '../Temp/082 - Squadra Dieci_internal_audio_2.AAC'. Formato contenitore: raw AAC file with ADTS headers
Estrazione traccia 4 con ID codec 'S_TEXT/ASS' nel file '../Temp/082 - Squadra Dieci_internal_sub_5.ASS'. Formato contenitore: SSA/ASS text subtitles
Starting Eac3To with the parameters:
..\Tools\eac3to\eac3to "K:\Documents and Settings\Luca\Documenti\Software\Video Editing\MkvToMp4_0.224\Temp\082 - Squadra Dieci_internal_audio_2.AAC" "..\Temp\082 - Squadra Dieci_internal_audio_2_new.AAC" +9ms -progressnumbers
AAC, 2.0 channels, 48kHz
A remaining delay of +9ms could not be fixed.
Creating file "..\Temp\082 - Squadra Dieci_internal_audio_2_new.AAC"...
Done.
Starting GSConv with the parameters:
../Tools/GSConv\GSConv SRT "K:/Documents and Settings/Luca/Documenti/Software/Video Editing/MkvToMp4_0.224/Temp/082 - Squadra Dieci_internal_sub_5.ASS"
GSConv terminated with error: 3221225477
Skipping subtitle K:/Documents and Settings/Luca/Documenti/Software/Video Editing/MkvToMp4_0.224/Temp/082 - Squadra Dieci_internal_sub_5.ASS
Starting Mp4Box with the parameters:
../Tools/mp4box/x32/MP4Box.exe -new -set-meta "[:tk=2]" -add "../Temp/video.264":fps=29.970:lang=jpn:name="Naruto Shippuden 082 _ Squadra dieci by danny11 _ LeBlanco" -add "K:/Documents and Settings/Luca/Documenti/Software/Video Editing/MkvToMp4_0.224/Temp/082 - Squadra Dieci_internal_audio_2_new.AAC"#1:fps=29.970:lang=ita:name="[AAC]" -itags tool="MkvToMp4 [www.mkvtomp4.ru] version 0.224 (x32)" "K:/Documents and Settings/Luca/Documenti/Video/Shippuden/HD 4\082 - Squadra Dieci.mp4" -tmp "../Temp/Mp4Box"
AVC-H264 import - frame size 1280 x 720 at 29.970 FPS
AVC Import results: 40859 samples - Slices: 345 I 9015 P 31499 B - 6 SEI - 345 IDR
AAC ADTS import - sample rate 48000 - MPEG-4 audio - 2 channels
Saving K:/Documents and Settings/Luca/Documenti/Video/Shippuden/HD 4\082 - Squadra Dieci.mp4: 0.500 secs Interleaving
Correction mp4 file.
TKHD atom correction for video. TRAK 1
TKHD atom correction for audio. TRAK 2
Writing tags in file: K:/Documents and Settings/Luca/Documenti/Video/Shippuden/HD 4\082 - Squadra Dieci.mp4
Optimizing the file K:/Documents and Settings/Luca/Documenti/Video/Shippuden/HD 4\082 - Squadra Dieci.mp4
Open result file K:/Documents and Settings/Luca/Documenti/Video/Shippuden/HD 4\082 - Squadra Dieci.mp4 for test.
Audio 1 error. Does not match time source (00:23:09.890) and result (00:23:04.980) files.
The file D:/Video/Naruto/HD/Shippuden 4/082 - Squadra Dieci.mkv is processed successfully
File processing time: 2 min. 21 sec.
Total time: 2 min. 21 sec.
1 files processed.
Kurtnoise
11th January 2014, 08:30
wrong thread...
Ruriko
18th January 2014, 01:55
Is there a way to make megui auto split file by duration while it's encoding?
luke83
21st January 2014, 02:26
hi,
is there an avisynth filter order?
usually i use this
source
deinterlacing(yadif)
derainbower(bifrost)
color corrections (chromashift, tweak)
cropping
Sharpener (MSharpen,awarpsharp)
Linesarkeners (ToonLite)
Resizer (Lanczos)
Dehalo (abcxyz)
Anti-aliasing (FAA,AAA)
Is it good?
Thanks :)
LigH
21st January 2014, 08:21
There are indeed sequence parts with a recommended order, based on the common sense regarding the effect of the filters.
Just a few examples: Using a deinterlacer early is certainly a good decision because it wouldn't work anymore after a vertical resize. Denoisers should be applied quite early too because their behaviour would be different on already filtered material (but consider if they might interfer with interlacing). Cropping-before-resizing (or even more efficient: resizing only the remaining area) is sensible too. The use of debanding filters is recommended at the very end to avoid that other filters destroy the dithering pattern.
In general, the location of filters changing the luminance or chrominance of the whole image equally is not too important, if you don't risk exceeding valid ranges or feel like debating the precision down to the least significant bits.
Using half a dozen filters to sharpen and then limit the side effects of the sharpening appears to be a bad idea, though; at least in general. Depending on the material, there might be more efficient and harmless filters.
luke83
21st January 2014, 14:01
Using half a dozen filters to sharpen and then limit the side effects of the sharpening appears to be a bad idea, though; at least in general. Depending on the material, there might be more efficient and harmless filters.
LOL :D
I know but
MSharpen makes an over-sharpen to balance dehalo filter. I found that if i use dehalo after sharpen and i make an over-sharpening, my video has not halo eff and it's not too smoothed.
Instead, if i use only sharpen filter and normal settings, i've halo artifacts :/
aWarpsharp makes lines thinner.
ToonLite makes those lines darkener as the previous filter made them very thin
Dehalo is dehalo and then anti-aliasing :p
Any advice? :)
LigH
21st January 2014, 19:08
I am no expert in denoising, and I hardly need the copy sharper than the original; but I read about a filter which was developed using the brains of quite experienced and understanding people; it was called LimitedSharpenFaster. Might be worth a try.
hkenneth
24th January 2014, 06:02
Hi, I have some DVDs that contain several episodes of documentaries in a single disk, divided by chapters. Is that possible to let MeGUI split encoded MKVs based on each chapter? I know that mkvtoolnix allows to split before each chapter but that is not very accurate since it can only split the file at keyframes...
hello_hello
24th January 2014, 21:04
Hopefully you can re-author the DVD files. Open them with DVDShrink (set the target output size to something large in DVDShrink's options so it won't try to re-encode) and select the re-author button. If there's a single large title (which hopefully there is) drag it from the right pane to the left. There's an edit button above the left pane which lets you specify the start and end points for each title. They can be selected by chapter too. When you've edited the title down to the first episode, drag it from the right pane to the left a second time and edit it again for episode two.... and so on.
When you're done, the backup function should give you a newly re-authored version with a vob file (or a set of vob files) per episode.
Zathor
24th January 2014, 21:45
Or you can encode into a new MKV with the OneClick tool. By default the chapters of the MKV file will be encoded as key frames (in x264). Lateron it should be possible to split this new MKV files at the chapter points.
Tiny Mud
6th February 2014, 16:52
Will MeGUI get into X265 encoding?
detmek
6th February 2014, 18:40
MeGUI Dev build already have basic x265 support. Just enable x265 in MeGUI's global settings and run update.
Motenai Yoda
12th March 2014, 17:29
Hi! I found a mistype into audio speedup avs script (both 23.976->25 and 24->25)
the TimeStretch pitch args are the slowdown ones..
megui:
23.976->25
AssumeSampleRate((AudioRate()*1001+480)/960).SSRC(AudioRate()).TimeStretch(pitch=Float((AudioRate()*1001+480)/960)*100.0/Float(AudioRate()))
24->25
AssumeSampleRate((AudioRate()*25)/24).SSRC(AudioRate()).TimeStretch(pitch=Float((AudioRate()*25)/24)*100.0/Float(AudioRate()))
corrected:
23.976->25
AssumeSampleRate((AudioRate()*1001+480)/960).SSRC(AudioRate()).TimeStretch(pitch=100.0*AudioRate()/((AudioRate()*1001+480)/960))
24->25
AssumeSampleRate((AudioRate()*25)/24).SSRC(AudioRate()).TimeStretch(pitch=100.0*AudioRate()/(AudioRate()*25/24))
I removed float casting cause 100.0 is already float.
Zathor
12th March 2014, 22:17
Thanks, please have also a look here:
http://forum.doom9.org/showthread.php?p=1672774#post1672774
Does this fix also the problem?
What's with development server outdated x264 rev? You already skipped 22 revisions since April. Latest x264 revision is 2431 (http://komisar.gin.by/old/2431/x264_changelog.txt), and dev server's is 2409. Update please.
Zathor
17th May 2014, 17:35
I "skipped" only one x264 release and that's simply as I am not every day checking all web sites for updates. Feel free to update it on your own - but thanks to your post I am now aware of it and will update it in the next days.
Carpo
17th May 2014, 18:19
What's with development server outdated x264 rev? You already skipped 22 revisions since April. Latest x264 revision is 2431 (http://komisar.gin.by/old/2431/x264_changelog.txt), and dev server's is 2409. Update please.
The latest releases aren't always the best, sometimes bugs creep in, so older versions are better, as they will have had more time to be tested and make sure all is good with them
rhaz
20th June 2014, 22:10
Hi, it's me again. I had to end megui via Task manager because it got stuck on File Indexer with eating up to 1gb of ram for some reason and I just found out that for some reason it wiped out all custom profiles from allprofiles/ dir. Now why would it do that? I had like 20 profiles and now all gone. Just awesome, plain awesome.
Zathor
22nd June 2014, 16:25
This happens sadly sometimes :(
I had no time to rewrite the profile handling. Not sure if I will have the time in the future.
scottws
9th July 2014, 01:12
I recently upgraded from MeGUI 3.1.1056 to 2507 (don't ask) and I'm noticing that muxed (not embedded) subtitles extracted using VobSubber are no longer showing up in my MP4 files when played via VLC. I know the IDX and SUB files that VobSubber is creating are good, because I'm able to add the subtitle via VLC while the MP4 is playing and it works, but of course that isn't a permanent solution.
I'm using MP4Box r4929 (gpac) and VobSub 2.23. I do not remember what the working versions of those two products were under MeGUI 3.1.1056.
Any ideas?
scottws
9th July 2014, 03:40
I ended up manually replacing MeGUI's MP4box with the version from GPAC framework 5.1 rev 5294 (available on this page (http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/#Windows%2032%20bits)) and subtitle muxing seems to be working again to a certain degree.
It didn't add the second language bundled in the IDX, but at least it got one of them.
trumpet205
18th July 2014, 18:59
I have a problem with one-click encoding when using custom avisynth templates.
I have many 4:3 Blu-ray videos that need cropping (1920x1080 --> 1440x1080). In the past I used Handbrake to do the cropping (encode at CRF 0) before putting them in a folder for one-click encoding.
I'm trying out on Avisynth templates but encoded file always have different PAR other than 1:1. My Avisynth templates is,
<input>
crop(240,0,-240,0)
<denoise>
If I open each source file using AVS Script creator to generate .avs individually, then encode them individually, PAR will stay as 1:1. So what went wrong?
Zathor
19th July 2014, 11:39
Please post a sample file and the log.
trumpet205
21st July 2014, 07:27
Please post a sample file and the log.
Log file and sample file,
https://www.dropbox.com/s/591yvz0q3dju1k6/logfile-14-07-20_23-06-25.log
https://www.dropbox.com/s/fq378o2equ5xjuy/clip10.mkv
Here is the encoded file using sample file under one-click:
https://www.dropbox.com/s/i9mmhl3y0szqgla/clip_result.mkv
Tylerr
4th August 2014, 22:41
Can anyone tell me how to change the fps of my videos inside the one-click profile?
LigH
5th August 2014, 10:27
If you wanted to norm-convert, it would not be "one-click" anymore... ;) ;)
Sharc
5th August 2014, 13:38
I have a problem with one-click encoding when using custom avisynth templates.
I have many 4:3 Blu-ray videos that need cropping (1920x1080 --> 1440x1080). In the past I used Handbrake to do the cropping (encode at CRF 0) before putting them in a folder for one-click encoding.
I'm trying out on Avisynth templates but encoded file always have different PAR other than 1:1. My Avisynth templates is,
<input>
crop(240,0,-240,0)
<denoise>
If I open each source file using AVS Script creator to generate .avs individually, then encode them individually, PAR will stay as 1:1. So what went wrong?
Log file and sample file,
https://www.dropbox.com/s/591yvz0q3dju1k6/logfile-14-07-20_23-06-25.log
https://www.dropbox.com/s/fq378o2equ5xjuy/clip10.mkv
Here is the encoded file using sample file under one-click:
https://www.dropbox.com/s/i9mmhl3y0szqgla/clip_result.mkv
Source:
SAR is 1:1 => correct
DAR is 16:9 => correct
Result:
SAR is 4:3 => WRONG
DAR is 16:9 => WRONG
So the SAR should have been kept 1:1 (cropping does not change the SAR), but the DAR should have been changed from 16:9 to 4:3 after cropping the borders.
(Maybe you can change the settings in MeGUI; I am not very familiar with it).
Added:
From your log: The problem manifests in the x264.exe cmd: ...... --sar 4:3 ..... and in the mkvmerge.exe cmd:
..... --aspect-ratio 0:16/9 .....
hello_hello
5th August 2014, 14:47
I'm trying out on Avisynth templates but encoded file always have different PAR other than 1:1. My Avisynth templates is,
<input>
crop(240,0,-240,0)
<denoise>
If I open each source file using AVS Script creator to generate .avs individually, then encode them individually, PAR will stay as 1:1. So what went wrong?
I can duplicate your problem by checking the anamorphic encoding option in the OneClick encoder configuration. I'd assume it shouldn't be setting the aspect ratio to 16:9, so there appears to be something wrong there. If that's the cause, make sure the anamorphic option is unchecked. You'd generally only use it when encoding anamorphic video anyway.
I also noticed there's no way to change the aspect ratio using the Display Aspect Ratio dropdown box. I don't use the OneClick encoder but I'd assume you should be able to. It's defaulting to 16:9 after opening the sample video. Maybe that's related to the problem.
Xor
15th February 2015, 22:41
Hi
use megui 2513, if use "avi muxer" to assemble avi+ac3 and set "splitting: NO splitting" if file is >2gb create two files.
I try to set 8GB but @ 1.9gb create onother files. How to force really NO splitting for mux avi?
Thanks
hello_hello
16th February 2015, 00:28
In the "Device Type" drop-down box, try selecting "PC".
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.