Log in

View Full Version : MCbatch-0.0.9.0.3pb - GUI for mencoder


Pages : [1] 2 3

dancho
12th October 2005, 11:27
Main purpose of this GUI is to help users to make bat file with all
their settings and passes in a way that mencoder can use.
Settings are for MPG2 encode only.
The idea came to me when I saw excellent results that mencoder
achieve in " [Challenge Low Bitrate] Best MPEG2 Encoder for objectives tests "
but I didnt want write all those commands and then check for corect
spelling and min - max values etc.
MCbatch will do all that work for you...:)
Try it and if it helps you , use it.
New version is out : MCbatch-0.0.9.0.3 public beta...
Download-Link: http://www.savefile.com/files/1680559
Test it plz...

http://img74.imageshack.us/img74/1961/mcb0089dc.jpg (http://imageshack.us)

dancho
14th October 2005, 10:21
I'm planning to add following options to MCbatch:-fps , -ofps , lmin , lmax , vb_strategy , vratetol .

If anyone have any other option to suggest now is the time to

speak... :thanks:

Amnon82
14th October 2005, 19:01
Img has 'Attachments Pending Approval'. Upload it to www.imageshack.us

GUI design is ok. Nice work

dancho
14th October 2005, 20:17
Please explain !!
Do I upload this image from the forum or
that same image from my comp to imageshack.us and
then I upload link to forum or something else ??
:confused:

dancho
14th October 2005, 23:39
Never mind.

:thanks:

video_magic
15th October 2005, 09:17
It looks nice, will it output its mpeg2 as an 'm2v' that is suitable for DVD. Is this going to be like a DVD-Profile that the user can select? :)

dancho
15th October 2005, 10:35
@video_magic
Thx...
Output is ***.m2v -of rawvideo -ffourcc MPG2 so you can use it without
any problems ( I hope :) ) with MuxMan or some other program of your
choise to get DVD files ready to burn...
No dvd profiles in plan for now.

dancho
15th October 2005, 16:57
New version of MCbatch is out:

MCbatch 0.0.3a
* added lmin,lmax
* added -fps,-ofps
* added vb_strategy
* gui redesign

-new version is out...

dancho
16th October 2005, 20:59
New version of MCbatch is out:

MCbatch 0.0.3e
* pass2 and pass3 settings are without vqscale option
now you can really achieve targeting bitrate :D
* added comboboxes for aspect,fps and ofps
* code cleaning

hank315
16th October 2005, 22:51
This little app. already does a very good job.
Just wanted to post about the vqscale in the 2/3 pass, is already fixed :)

Because it's meant for MPEG2 creation maybe it's better to set the next defaults:
- keyint 15
- vrc_maxrate 9000
- dc 9
- vmax_b_frames 2

TheCreamCrackerBoy
17th October 2005, 00:39
Dancho, this GUI is really excellent! Usually typing all the commands at "cmd" window requires some attention, otherwise if one mistake is done the result can be frustrating...
Congratulations on your GUI!!

dancho
17th October 2005, 19:58
@hank315
Thx...
The following versions of MCbatch will have options load/save custom
settings that will be used as input on start ( from ***.ini or ****.txt )
as a default settings and if that file is missing MCbatch will use built in
( default ) settings .....
Thx to Amnon82 for that remark :)
I'll correct my default values with your proposal values...

@TheCreamCrackerBoy
Thx and Thx again........:)

dancho
20th October 2005, 22:36
New version of MCbatch is out:

MCbatch 0.0.4
* added load/save custom settings...
* all values,except vbitrate, are saved...
* check readme.txt for details

Amnon82
20th October 2005, 23:25
ahh you got it with imageshack ;) great work again.

dancho
20th October 2005, 23:50
@Amnon82
Yes...
Thx,I'll do my best ( as a beginner in asm ) :thanks:

dancho
21st October 2005, 05:28
New version of MCbatch is out:

MCbatch 0.0.4a
*-fps and -ofps values were not present in pass2 adn pass3 - corrected...

TheCreamCrackerBoy
26th October 2005, 07:14
Hello, Dancho,

Is it possible to include a command for importing matrices (*.xcm files)? I'd like to try some different ones...

And/Or:

Could you include Jawor, ECM and NOTCH matrices in your next release, please?

Thank you for your attention,

TheCreamCrackerBoy.

EDIT: I've typed it wrong. Please consider ECM = EQM. :-P

dancho
26th October 2005, 10:00
@TheCreamCrackerBoy

Well I could do a command for importing matrices but in ***.txt format ...
--> You can easily export any ***.xcm matrices to ***.txt via
Custom Quantization Matrix Editor // excellent program by Ligh //
search for CQME 1.0c <--
And I could include Jawor and Notch matrices in MCbatch but I never heard
for ECM , if you can plz post ECM's intra and inter settings ...

Thx

TheCreamCrackerBoy
26th October 2005, 10:41
Hello Dancho, what's up?

You can find the 5 ECM matrices - developed by Sharktooth - at

http://forum.doom9.org/showthread.php?t=83125

These are: EQM V3HR (High Bitrate), EQM V3LR (Low Bitrate), EQM V3ULR (Ultra-Low Bitrate), EQM V3UHR (Ultra-High Bitrate) and EQM V3EHR (Extremely High Bitrate). At the url above you can also find the recommended bitrates (very useful, by the way!). :-)

You can find the Notch matrix and all the specifications (number of GOPs, etc) at http://www.kvcd.net/portal/articles.php?lng=en&pg=20

Thank you,

TheCreamCrackerBoy.

EDIT: I've typed it wrong. Please consider ECM = EQM. :-P

dancho
26th October 2005, 11:18
@TheCreamCrackerBoy

ah,LOL...silly me :)

You call it ECM and Sharktooth call it EQM...

ECM != EQM or what...plz explain...

greetings from dancho ;)

***btw I'm not so sure that m2v file with that matrices
will be within spec...

TheCreamCrackerBoy
26th October 2005, 11:25
@TheCreamCrackerBoy
You call it ECM and Sharktooth call it EQM...

ECM != EQM or what...plz explain...

Ooooops, sorry! You're right... post edited.



I'm not so sure that m2v file with that matrices will be within spec...

You're right, EQM and Jawor's are for MPEG4 compression.

EDIT: Sharkooth's matrices were designed for MPEG4 compression; he didn't test it with MPEG2.

But if you want to include Notch's matrix (for MPEG1/2 compression) I'd be very happy... :-)

Thank you,

TheCreamCrackerBoy.

Sagittaire
26th October 2005, 20:10
Hello Dancho, what's up?

You can find the 5 ECM matrices - developed by Sharktooth - at

http://forum.doom9.org/showthread.php?t=83125

These are: EQM V3HR (High Bitrate), EQM V3LR (Low Bitrate), EQM V3ULR (Ultra-Low Bitrate), EQM V3UHR (Ultra-High Bitrate) and EQM V3EHR (Extremely High Bitrate). At the url above you can also find the recommended bitrates (very useful, by the way!). :-)

You can find the Notch matrix and all the specifications (number of GOPs, etc) at http://www.kvcd.net/portal/articles.php?lng=en&pg=20

Thank you,

TheCreamCrackerBoy.

EDIT: I've typed it wrong. Please consider ECM = EQM. :-P

But if you want to include Notch's matrix (for MPEG1/2 compression) I'd be very happy... :-)


Don't use these matrix ... it's not compliant with Mencoder (coef must be always > 16 )

dancho
26th October 2005, 20:25
New version of MCbatch is out:

MCbatch 0.0.4d
*added load custom matrices - plz read readthis.txt for details
*correct input for all editboxes
*code cleaning

dancho
26th October 2005, 20:33
@Sagittaire

I did some test encode with Jawor1CD and Notch matrix ,
mencoder didn't complain about it...

TheCreamCrackerBoy
26th October 2005, 21:04
Don't use these matrix ... it's not compliant with Mencoder (coef must be always > 16 )

IŽm encoding with the Notch matrix in this very moment and Mencoder didnŽt complain... besides, AVAMAT6 got a coef under 16:

Avamat6 Matrix

8,16,19,22,26,27,29,34
16,16,22,24,27,29,34,35
19,22,26,27,29,34,35,38
22,22,26,27,29,34,35,40
22,26,27,29,32,35,40,48
26,27,29,32,35,40,48,50
26,27,29,35,40,48,50,60
27,29,35,40,48,50,60,62

16,20,24,28,32,36,40,44
20,24,28,32,36,40,44,48
24,28,32,36,40,44,48,52
28,32,36,40,44,48,52,56
32,36,40,44,48,52,56,58
36,40,44,48,52,56,58,60
40,44,48,52,56,58,60,62
44,48,52,56,58,60,62,62
Tks,

TheCreamCrackerBoy.

Sagittaire
26th October 2005, 21:31
This 8 coef for intra is an exception because all the CM use always 8 for this coef (MPEG compliance). All the other coef must be >16 ...

TheCreamCrackerBoy
28th October 2005, 04:44
So Notch matrix is MPEG2 compliant... so Sagittaire says, and so kvcd.net does.

Dancho, could you please include Notch matrix in your next release?

Thank you,

TheCreamCrackerBoy.

dancho
28th October 2005, 09:07
@TheCreamCrackerBoy && users of MCbatch

-->How to use CM in MCbatch ??
// I reckon CM you want is .xcm,.qmatrix
or .cqm 128 bytes long hex file...
1.Download CQME 1.0c
http://forum.doom9.org/showthread.php?t=73666&highlight=CQME
2.Start CQME 1.0c
3.File-Open--find and open CM you want to use with MCbatch...
4.File-Export--check Text(Comma Separated Values)-change name or
leave it same-press OK button--press Save button
//export options
--check Comma(,)--Check One Line Only--Press OK
5.Find saved ****.csv matrix and change ****.csv into ****.txt
6.Load your ****.txt into MCbatch
// if you press get default you
// will have to load it again beause
// default CM in MCbatch is AVAMAT6 -->excellent CM from Amnon82 ...
7.Happy encoding :)

So this is one way to load Jawor1cd,Notch,HVSbest,AVAMAT7 or any other
matrix of your choise...

greetings from dancho ...

Sagittaire
28th October 2005, 11:38
So Notch matrix is MPEG2 compliant... so Sagittaire says, and so kvcd.net does.

Dancho, could you please include Notch matrix in your next release?

Thank you,

TheCreamCrackerBoy.

KVCD.net say too "Mencoder make not compliant MPEG2 MP@ML stream" (perhabs because Notch matrix don't work with mencoder ... lol)

You want technical explain ... ???

with all matrix with coef < 16 Mencoder say in CLI
Warning, QMatch_shift is larger then 21, overflow possible

and will make block artefact with low quantizer and best setting (it's my experience with mencoder and I was test all the mencoder options)

Notch matrix is MPEG2 compliant but Notch matrix is not compliant with mencoder ... :devil:

Try if you want ... ;)

dancho
28th October 2005, 13:02
E:\_dvd\test_1>mencoder.exe pp1.avs -o pp1_1.m2v -ovc lavc -lavcopts vcodec=mpeg
2video:vpass=1:turbo:keyint=15:vrc_maxrate=9000:vrc_buf_size=1835:aspect=16/9:dc
=9:vqmin=2:vqmax=31:lmin=2.0:lmax=31.0:vqdiff=3:vmax_b_frames=2:vqscale=2:vb_str
ategy=0:vb_qfactor=1.25:vb_qoffset=1.25:vi_qfactor=0.8:vi_qoffset=0.0:vqcomp=0.5
:mbd=0:mbcmp=256:precmp=256:cmp=256:subcmp=256:me_range=128:preme=2:vme=4:dia=-6
:predia=-6:subq=8:trell:cbp:psnr:naq:lumi_mask=0.0:dark_mask=0.0:tcplx_mask=0.0:
scplx_mask=0.0:p_mask=0.0:border_mask=0.0:inter_matrix=16,18,20,22,24,26,28,30,1
8,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,
32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40
,42,44:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,
34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58
,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 -of rawvideo -ffourcc MPG2
MEncoder dev-CVS-050907-11:52-3.4.4 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x27
AVS file format detected.
VIDEO: [YV12] 720x576 12bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:38 fourcc:0x32315659 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
Using constant qscale = 2.000000 (VBR)
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
Forcing output fourcc to 3247504d [MPG2]
Writing AVI header...
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Pos: 8.4s 211f ( 0%) 43fps Trem: 0min 0mb A-V:0.000 [2849:0]
Flushing video frames

Writing AVI index...
Fixing AVI header...

Video stream: 2835.763 kbit/s (354470 B/s) size: 2991730 bytes 8.440 secs 21
1 frames
PSNR: Y:46.92, Cb:51.79, Cr:50.98, All:47.96

-->small test clip mencoder+notch matrix
no warnings,file is clean , sharp and without any blockings
MuxMan except m2v file and process it without problems<--

Sagittaire
28th October 2005, 13:12
with notch matrix

D:\Mes dossiers\Nouveau\Pack MP4\ISO 14496-10 (Video)>mencoder.exe HDTV.avs -o M
PEG2-HQ1.m2v -ovc lavc -lavcopts vcodec=mpeg2video:vpass=1:vqmin=1:lmin=0.01:vqb
lur=0:vqscale=2:vrc_maxrate=9800:vrc_buf_size=1835:keyint=15:vqcomp=0.75:vmax_b_
frames=2:vb_qfactor=1.25:vb_qoffset=0.0:vi_qfactor=1.0:vi_qoffset=0.0:me_range=1
28:preme=2:dia=6:predia=6:mbd=2:mbcmp=262:precmp=262:cmp=256:subcmp=262:mv0:trel
l:cbp:dc=8:qprd:psnr:aspect=16/9:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,2
7,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,
48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter
_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,
22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32
,34,36,38,42,42,30,32,34,36,38,40,42,44 -of rawvideo -ffourcc MPG2
MEncoder dev-CVS-050813-01:18-3.4.4 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x102f
AVS file format detected.
VIDEO: [YV12] 720x576 12bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:38 fourcc:0x32315659 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
High quality encoding selected (non real time)!
Using constant qscale = 2.000000 (VBR)
Warning, QMAT_SHIFT is larger then 21, overflows possible
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
Forcing output fourcc to 3247504d [MPG2]
Writing AVI header...
Pos: 2.8s 73f ( 0%) 1fps Trem: 0min 0mb A-V:0.000 [759:0]]


with exactly the same setting with Sagittaire Matrix ...


D:\Mes dossiers\Nouveau\Pack MP4\ISO 14496-10 (Video)>mencoder.exe HDTV.avs -o M
PEG2-HQ1.m2v -ovc lavc -lavcopts vcodec=mpeg2video:vpass=1:vqmin=1:lmin=0.01:vqb
lur=0:vqscale=2:vrc_maxrate=9800:vrc_buf_size=1835:keyint=15:vqcomp=0.75:vmax_b_
frames=2:vb_qfactor=1.25:vb_qoffset=0.0:vi_qfactor=1.0:vi_qoffset=0.0:me_range=1
28:preme=2:dia=6:predia=6:mbd=2:mbcmp=262:precmp=262:cmp=256:subcmp=262:mv0:trel
l:cbp:dc=8:qprd:psnr:aspect=16/9:inter_matrix=20,20,20,20,21,22,23,24,20,20,20,2
0,21,22,24,25,20,20,20,21,22,24,26,28,20,20,21,22,24,27,29,32,21,21,22,24,28,31,
34,39,22,22,24,27,31,37,42,49,23,24,26,29,34,42,52,60,24,25,28,32,39,49,60,80:in
tra_matrix=8,16,16,16,17,17,18,19,16,16,16,16,17,18,19,20,16,16,16,17,18,19,20,2
2,16,16,17,18,19,21,23,26,17,17,18,19,21,24,27,31,17,18,19,21,24,28,33,40,18,19,
20,23,27,33,42,51,19,20,22,26,31,40,51,64 -of rawvideo -ffourcc MPG2
MEncoder dev-CVS-050813-01:18-3.4.4 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x102f
AVS file format detected.
VIDEO: [YV12] 720x576 12bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:38 fourcc:0x32315659 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
High quality encoding selected (non real time)!
Using constant qscale = 2.000000 (VBR)
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
Forcing output fourcc to 3247504d [MPG2]
Writing AVI header...
Pos: 6.5s 165f ( 0%) 5fps Trem: 0min 0mb A-V:0.000 [1666:0]

dancho
28th October 2005, 14:00
@Sagittaire

I didn't get any warnings with notch matrix ,
but you did.
I posted my proof , you posted yours...

So,let users to choose what CM and how will use... ;)

TheCreamCrackerBoy
28th October 2005, 16:00
EDIT:

Dancho uses
MEncoder dev-CVS-050907-11:52-3.4.4 (C) 2000-2005 MPlayer Team
No warnings

Sagittaire uses
MEncoder dev-CVS-050813-01:18-3.4.4 (C) 2000-2005 MPlayer Team
"Warning, QMAT_SHIFT is larger then 21, overflows possible"

I believe that both versions were developed by Celtic_Druid, but Dancho's version is newer... so we can't compare them...

I got 2 different versions of mencoder, that can be downloaded at:

http://oss.netfarm.it/mplayer-win32.php
http://www.aziendeassociate.it/cd.asp?dir=/mplayer - this one by Celtic Druid.

Unfortunately, I can't remember getting the message "Warning, QMatch_shift is larger then 21, overflow possible" with Notch matrix... I'll try with the mencoder's versions above listed.

The newer version that I've got from Celtic_Druid at http://www.aziendeassociate.it/cd.asp?dir=/mplayer was compiled on 2005-10-09 and posted at the url on 2005-10-12. As soon as I try it I'll post the results here.

Thanks/merci

TheCreamCrackerBoy.

hank315
28th October 2005, 22:12
Libavcodec assumes the quantization matrices are all between 16 and 255.

libavcodec source:
/* We can safely suppose that 16 <= quant_matrix[i] <= 255
It does some kind of matrix conversion on the original quantization matrices to do fdct etc.
If the range 16-255 is not respected it can overflow, some versions have a warning for that, other versions don't.

Sagittaire
29th October 2005, 10:30
If you want comparable CM to Notch for Mencoder use this

8,16,16,16,17,17,18,19
16,16,16,16,17,18,19,20
16,16,16,17,18,19,20,22
16,16,17,18,19,21,23,26
17,17,18,19,21,24,27,31
17,18,19,21,24,28,33,40
18,19,20,23,27,33,42,51
19,20,22,26,31,40,51,64

20,21,22,23,24,25,26,27
21,21,22,23,24,25,26,28
22,22,23,24,25,26,28,30
23,23,24,25,26,28,29,32
24,24,25,26,28,31,33,35
25,25,26,28,31,34,36,39
26,26,28,29,33,36,41,43
27,28,30,32,35,39,43,48

Same structure that Notch for mencoder

-> HVS structure for intra
low and constant degradation for low/medium frequencies
exponential degradation for high frequencies

-> HVS strucure for inter
linear degradation for frequencies in low/medium
light exponential degradation for high frequencies
if you want exactly Notch Structure choose only linear degradation for inter

dancho
29th October 2005, 10:46
@Sagittaire

:thanks:

just to make little easier to load into MCbatch this is c/p // Same structure of Notch matrix for Mencoder //


intra_matrix=8,16,16,16,17,17,18,19,16,16,16,16,17,18,19,20,16,16,16,17,18,19,20,22,16,16,17,18,19,21,23,26,17,17,18,19,21,24,27,31,17,18,19,21,24,28,33,40,18,19,20,23,27,33,42,51,19,20,22,26,31,40,51,64
inter_matrix=20,21,22,23,24,25,26,27,21,21,22,23,24,25,26,28,22,22,23,24,25,26,28,30,23,23,24,25,26,28,29,32,24,24,25,26,28,31,33,35,25,25,26,28,31,34,36,39,26,26,28,29,33,36,41,43,27,28,30,32,35,39,43,48

TheCreamCrackerBoy
29th October 2005, 11:22
Merci, Sagittaire! Thanks, Dancho! IŽll try it as soon as I can!

[]s

TheCreamCrackerBoy.

dancho
2nd November 2005, 14:19
@Sagittaire || @TheCreamCrackerBoy || anyone...

I was planning to add v4mv command to the next version
of MCbatch , but for me v4mv only works in first pass... :confused:
Can anyone confirm that ??
Did anyone ever used v4mv in multipass encoding ??

***v4mv****
allow 4 motion vectors per macroblock (slightly better quality)...
works better if used with mbd>0...

Thx...

***to test it just add v4mv in your settings***

Sagittaire
2nd November 2005, 18:13
v4mv: 4 motion vector is not compliant with MPEG2 Codec but with MPEG4 ASP for example ...

subq = 8 : Qpel too is not compliant with MPEG2

for best quality use these I, P and B offset ratio
IFrame with 1.00 / 0.00 because Iframe are big frame with generaly better quality than P,B with the same quant -> vi_qfactor=1.0 :vi_qoffset=0.0
BFrame with 1.25 / 0.00 because BFrame are generaly better than Pframe with same quant. I don't like high ratio with Bframe for MPEG2 because Bframe for MP@ML DVD stream are not adaptative and bframe in high motion could be very bad with high ratio/offset -> vi_qfactor=1.20:vi_qoffset=0.0
vqcomp in [0.75 - 1.00] range because default setting (0.50) is too low for MPEG2 : with 0.50 the quant variability is high and high motion could be very bad with to high average quant in high motion part

In fact if you want best quality/speed use this setting:

mencoder.exe HDTV.avs -o MPEG2-HQ1.m2v -ovc lavc -lavcopts vcodec=mpeg2video:vpass=1:vqmin=1:lmin=0.01:vqblur=0:vqscale=3:vrc_maxrate=9800:vrc_buf_size=1835:keyint=15:vqcomp=0.75:vmax_b_frames=2:vb_qfactor=1.25:vb_qoffset=0.0:vi_qfactor=1.0:vi_qoffset=0.0:me_range=128:preme=2:dia=3:predia=3:mbd=2:mbcmp=256:precmp=256:cmp=256:subcmp=256:mv0:trell:cbp:dc=8:qprd:psnr:aspect=16/9:inter_matrix=20,21,22,23,24,25,26,27,21,21,22,23,24,25,26,28,22,22,23,24,25,26,28,30,23,23,24,25,26,28,29,32,24,24,25,26,28,31,33,35,25,25,26,28,31,34,36,39,26,26,28,29,33,36,41,43,27,28,30,32,35,39,43,48:intra_matrix=8,16,16,16,17,17,18,19,16,16,16,16,17,18,19,20,16,16,16,17,18,19,20,22,16,16,17,18,19,21,23,26,17,17,18,19,21,24,27,31,17,18,19,21,24,28,33,40,18,19,20,23,27,33,42,51,19,20,22,26,31,40,51,64 -of rawvideo -ffourcc MPG2

mencoder.exe HDTV.avs -o MPEG2-HQ2.m2v -ovc lavc -lavcopts vcodec=mpeg2video:vpass=3:vqmin=1:lmin=0.01:vqblur=0:vbitrate=3000:vrc_maxrate=9800:vrc_buf_size=1835:keyint=15:vqcomp=0.75:vmax_b_frames=2:vb_qfactor=1.25:vb_qoffset=0.0:vi_qfactor=1.0:vi_qoffset=0.0:me_range=128:preme=2:dia=3:predia=3:mbd=2:mbcmp=256:precmp=256:cmp=256:subcmp=256:mv0:trell:cbp:dc=8:psnr:aspect=16/9:inter_matrix=20,21,22,23,24,25,26,27,21,21,22,23,24,25,26,28,22,22,23,24,25,26,28,30,23,23,24,25,26,28,29,32,24,24,25,26,28,31,33,35,25,25,26,28,31,34,36,39,26,26,28,29,33,36,41,43,27,28,30,32,35,39,43,48:intra_matrix=8,16,16,16,17,17,18,19,16,16,16,16,17,18,19,20,16,16,16,17,18,19,20,22,16,16,17,18,19,21,23,26,17,17,18,19,21,24,27,31,17,18,19,21,24,28,33,40,18,19,20,23,27,33,42,51,19,20,22,26,31,40,51,64 -of rawvideo -ffourcc MPG2

mencoder.exe HDTV.avs -o MPEG2-HQ3.m2v -ovc lavc -lavcopts vcodec=mpeg2video:vpass=3:vqmin=1:lmin=0.01:vqblur=0:vbitrate=3000:vrc_maxrate=9800:vrc_buf_size=1835:keyint=15:vqcomp=0.75:vmax_b_frames=2:vb_qfactor=1.25:vb_qoffset=0.0:vi_qfactor=1.0:vi_qoffset=0.0:me_range=128:preme=2:dia=3:predia=3:mbd=2:mbcmp=256:precmp=256:cmp=256:subcmp=256:mv0:trell:cbp:dc=8:psnr:aspect=16/9:inter_matrix=20,21,22,23,24,25,26,27,21,21,22,23,24,25,26,28,22,22,23,24,25,26,28,30,23,23,24,25,26,28,29,32,24,24,25,26,28,31,33,35,25,25,26,28,31,34,36,39,26,26,28,29,33,36,41,43,27,28,30,32,35,39,43,48:intra_matrix=8,16,16,16,17,17,18,19,16,16,16,16,17,18,19,20,16,16,16,17,18,19,20,22,16,16,17,18,19,21,23,26,17,17,18,19,21,24,27,31,17,18,19,21,24,28,33,40,18,19,20,23,27,33,42,51,19,20,22,26,31,40,51,64 -of rawvideo -ffourcc MPG2

dancho
2nd November 2005, 18:36
@Sagittaire

I trust your experience in work with mencoder but
I found v4mv and subq with others mpeg2 commands
and options...
--> lavc part of general encoding options for mencoder <--
so I assumed that they are compliant with MPEG2

your best quality/speed settings will be add to default MCbatch settings

thx

*** I will add vqblur to MCbatch ***

Sagittaire
2nd November 2005, 19:04
You can use all this codec with lavc and not only MPEG2

mjpeg
Motion JPEG
ljpeg
Lossless JPEG
h261
H.261
h263
H.263
h263p
H.263+
mpeg4
MPEG-4 (DivX 4/5)
msmpeg4
DivX 3
msmpeg4v2
MS MPEG4v2
wmv1
Windows Media Video, version 1 (AKA WMV7)
wmv2
Windows Media Video, version 2 (AKA WMV8)
rv10
an old RealVideo codec
mpeg1video
MPEG-1 video
mpeg2video
MPEG-2 video
huffyuv
HuffYUV
ffvhuff
nonstandard 20% smaller HuffYUV using YV12
asv1
ASUS Video v1
asv2
ASUS Video v2
ffv1
FFmpeg's lossless video codec
flv
Sorenson H.263 used in Flash Video
dvvideo
Sony Digital Video
svq1
Apple Sorenson Video 1
snow
FFmpeg's experimental wavelet-based codec

dancho
2nd November 2005, 19:49
@Sagittaire

Except for subq ,
Are others MCbatch options compliant with MPEG2 ??

MuxMan except all my MCbatch ***.m2v files without problems...

Sagittaire
2nd November 2005, 20:25
Just QPel in your gui I think but ... but for MPEG2 MP@ML DVD compliance you must always use:

- me_range=128 : max range for motion vector
- keyint=15 or less for PAL keyint=18 or less for NTSC ... IMO use always 15 for PAL and NTSC
- vb_strategy=0 : bframe must be not adaptative
- vrc_maxrate=9800 : max bitrate 9800 but less like 9000 could be better
- vrc_buf_size=1835 : VBV spec for DVD decoder compliance

adaptative quantisation is compliant (qprd and masking) and better for quality but seem to be a problem for some standalone player ...

dancho
2nd November 2005, 20:38
@Sagittaire

:thanks:

Next version of MCbatch will be without subq and with vqblur...
And you will be able to save paths ( to mencoder.exe and to
output folder ) to MCbatch.ini ...

@Sagittaire

If there is some command or option you find that I missing
in MCbatch plz post it !!

dancho
3rd November 2005, 20:12
:D :rolleyes:

This si something really strange,
for mencoder this line:

D:\Mp4 tools\mplayer\mplayer2005.10.09.Athlon-XP\mencoder.exe

is unacceptable *** see space between Mp4 and tools

but this line

D:\Mp4tools\mplayer\mplayer2005.10.09.Athlon-XP\mencoder.exe

is OK *** no space between Mp4 and tools

-->point is no space in folders and files names... :rolleyes:

Thx TheCreamCrackerBoy

TheCreamCrackerBoy
4th November 2005, 02:29
Hi, Dancho!

I've realized before that it happens everytime you get space(s) between folder names and/or file names. For using mencoder, I rename all files and folder to single names.

[]s

TheCreamCrackerBoy.

dancho
4th November 2005, 10:51
New version of MCbatch is out:

MCbatch 0.0.4h:
*added set paths meni
*if MCbatch.ini isn't present MCbatch will assume that mencoder.exe is in same folder with MCbatch.exe,same goes for output folder
*names of your paths must be without spaces...
*only yours ***.m2v files will be in output folder , 2pass.log and psnr logs will be with MCbatch's folder
*removed subq
*added vqblur
*gui redesign

dancho
4th November 2005, 14:25
New version of MCbatch is out:

MCbatch 0.0.4k:
*correct spelling for pass 1,2,3

dancho
9th November 2005, 23:49
New version of MCbatch is out:

MCbatch 0.0.4m:
*default mencoder values aren't any longer writting into starttoencode.bat
*some code issue solved

Revgen
16th May 2006, 00:28
Would you be willing to update this GUI so that new settings like RDO are accessable?:thanks: