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


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:

dancho
16th May 2006, 08:58
* bump *
* so much dust in this thread *
;)

@Revgen

I will see what I can do about updating MCbatch ( heh I didnt programming in a while now and I'm pretty busy this month ) but I think that adding few new settings wont be a big problem ...

And I see examples from Sagittaires post here :

http://forum.doom9.org/showthread.php?t=98633&page=5

Revgen
16th May 2006, 17:21
Thanks a lot.:thanks:

dancho
17th May 2006, 13:50
New version of MCbatch is out:

MCbatch 0.0.5:
*added brd_scale
*added bidir_refine

ricardo.santos
19th May 2006, 00:10
got the following error message when trying Mcbatch

http://img155.imageshack.us/img155/4089/mcbatch4qj.th.jpg (http://img155.imageshack.us/my.php?image=mcbatch4qj.jpg)

dancho
19th May 2006, 19:01
@ricardo.santos

follow this link and download proper mencoder version ( and newest ) for your CPU...

http://esby.free.fr/CelticDruid/mirror/mplayer/

Revgen
20th May 2006, 21:32
@Dancho

Would you be willing to add some Interlacing options. Like Interlacing ON and TFF ON.

Thanks

dancho
22nd May 2006, 08:44
@Revgen

Could you write exactly what interlacing options ( mecoder encoding commands ) you have on your mind...

Thx

Revgen
22nd May 2006, 21:16
Well. there are many different interlacing commands that do different things.

Here are some examples quoted from the Mplayer/Mencoder guide at www.mplayerhq.com .

1)ildct

Uses the interlaced DCT.

2) ilme

Uses interlaced motion estimation (don't use with qpel).

2) alt

This uses the alternative scantable. Quenc and HCEnc use it when encoding interlaced content. I use it too.

3) top=?

The ? can either be:

-1: this allows Mencoder to choose either TFF or BFF

0 This specifies BFF

1 This specifies TFF

For example if I wanted to encode TFF content I'd do (Interlaced settings highlighted in bold to the right-->) this:

H:\mplayer2006.04.19.Athlon\mencoder.exe H:\KOBE\tntfirst.avs -o H:\\tntfirst_2.m2v -fps 30000/1001 -ofps 30000/1001 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=8000:keyint=18:vrc_maxrate=9500:vrc_buf_size=1835:aspect=4/3:dc=10:vqmin=1:lmin=0.01:vmax_b_frames=2:vb_qoffset=0.0:vi_qfactor=1.0:vqcomp=0.75:vqblur=0:mbd=2:qprd:mv0:precmp=256:cmp=256:subcmp=256:me_range=128:preme=2:dia=3:predia=3:bidir_refine=2:trell:cbp:psnr:ilme:ildct:alt:top=1: -of rawvideo -ffourcc MPG2

I hope this helps.

dancho
24th May 2006, 17:26
New version of MCbatch is out:

MCbatch 0.0.6:
added ildct
added ilme
added alt
added top
save custom/load custom file settings are programmed from start and now is working like always should
many many ( did I say many ) bug fixes

Download link:
http://rapidshare.de/files/21275966/MCbatch_0.0.6.7z.html

btw

thx Revgen :p
you are forcing me to programming again...

Revgen
25th May 2006, 02:37
btw

thx Revgen :p
you are forcing me to programming again...

Yer Welcome.;)

The interlacing options work fine. :thanks:

I'll let you know if there is anything else worth adding.

dancho
28th May 2006, 17:18
things to come - new look of GUI

http://img83.imageshack.us/img83/3886/newgui9ax.jpg (http://imageshack.us)

and I'm planing to add some DVD profiles ( like fast,normal and quality ) and I need some help for that ( over 50 options to tweak )...

plz post your suggestions/settings for each profile...

:thanks:

Revgen
28th May 2006, 22:07
Well we'd have to establish what is Fast, Normal, or Quality.

Could it possibly be:

Fast - Realtime Speed

Normal - Half-Realtime Speed

Quality- Quarter of Realtime speed.

High Quality - Speed is no concern.


After that we'd have to define what processor people will most likely be using for realtime speed. I'd venture to say that it might be somewhere like 2-3 Ghz. My CPU is about 4000 Ghz as far as Single-Core performance goes so I can't exactly be a good model.

dancho
29th May 2006, 09:48
@Revgen
Primary I'm talking about tweaking encoding options for achieving certain quality levels.Let me explain...
If I want to encode some movie and I want quality ( no matter what encoding speed will be ) I will use mbd=2 and
bidir_refine=4.
But if I want to encode some sport clip captured by my TV card and quality isnt that much important to me I will use
mbd=0 and bidir_refine=1.
So for now :

Quality profile :mbd=2,bidir_refine=4........

Fast profile :mbd=0,bidir_refine=1........

:cool:

Abond
29th May 2006, 10:19
@dancho
To avoid the problem with the file names that has spaces in it, you can save them in the batch file in quotes. Using your example:
D:\Mp4 tools\mplayer\mplayer2005.10.09.Athlon-XP\mencoder.exe would not work, but
"D:\Mp4 tools\mplayer\mplayer2005.10.09.Athlon-XP\mencoder.exe " works:)

dancho
30th May 2006, 09:56
@Abond

:thanks:

dancho
22nd June 2006, 20:01
new version is out : MCbatch-0.0.8public beta...
test it plz...

smok3
22nd June 2006, 23:09
cant manually type vrc-maxrate, will stop at 3rd digit.

dancho
22nd June 2006, 23:59
@smok3
hm,strange...works here fine...

if you dont want to use spin control for entering data just
double click data in edit box ( to select it ) and enter value you want,
min and max values will be check automaticly...

maybe that is the problem,
max value for vrc_maxrate is set to 9800 and
and if you entering something like this
990 and 0 as last MCbatch will be delete that and enter default value again ( 9000 )...

smok3
23rd June 2006, 08:06
i bet you are not on xp?

tested on another xp machine, same problem, if i want to enter 8000, then 800 is all i get (& iam NOT using spin box), there is not a place for a 4th digit.

snapshots:
http://somestuff.org/vrc_maxrate.png

http://somestuff.org/cli.png

---------------

another thing: isnt it possible to use a command line like 'mencoder -settings mympeg2encodingpreset.txt -input film.avs' ?

dancho
23rd June 2006, 08:54
i bet you are not on xp?
you won the bet...

but I did test it on my friend XP comp and looked fine to me...but it is not problem to fix that...


another thing: isnt it possible to use a command line like 'mencoder -settings mympeg2encodingpreset.txt -input film.avs' ?

dont know,Im doing through bat file ....

smok3
23rd June 2006, 09:04
dont know,Im doing through bat file ....

i know, i meant as a providing additional save button on your app, you know like: save as bat, and now: save as mencoder setting. :)

dancho
23rd June 2006, 09:06
new version...

smok3
23rd June 2006, 09:12
dancho, tnx, the input box works now as expected.

dancho
23rd June 2006, 09:15
i know, i meant as a providing additional save button on your app, you know like: save as bat, and now: save as mencoder setting.

I am thinking to add save settings button or maybe as menu choise,but I like your idea too...

but one thing just cross my mind...
When user select 3 pass encoding what is right line up for mencoder ?

pass1.line
pass2.line
pass3.line
or
pass1.line
pass3.line
pass2.line

hm,didnt think about that before... :o

dancho
23rd June 2006, 09:19
dancho, tnx, the input box works now as expected.

np m8...

thx for testing it...

smok3
23rd June 2006, 11:00
I am thinking to add save settings button or maybe as menu choise,but I like your idea too...
yes, but why not make your settings file mencoder compatible in the 1st place (if it is not too hard)?

dancho
23rd June 2006, 13:04
yes, but why not make your settings file mencoder compatible in the 1st place (if it is not too hard)?

it is not hard at all , I only need to rewrite about 1/6 of entire program ... :D

I am thinking about options for user to save/load his custom setting in some kind of file (txt or some bin form) ...

and maybe option(s) that user can change something in pass3 line because line pass2 and line pass3 now are the same...(why do we need pass3 in the first place :confused: )

Pookie
25th June 2006, 08:18
dancho - Awesome app, much appreciated :)

dancho
25th June 2006, 09:36
@Pookie
:thanks:

btw...
right line up when user select 3 pass encoding is this :

pass1 line
pass3 line
pass3 line

and I must think some simple way for user to editing pass3 line...

Abond
25th June 2006, 11:49
Hmm, I would like to see scene change detection threshold :D
The default of mencoder (if it exist at all) doesn't detect the changes very good (if at all).

dancho
25th June 2006, 19:26
@Abond
Hmm, I would like to see scene change detection threshold
The default of mencoder (if it exist at all) doesn't detect the changes very good (if at all).

you have this encoding option on your mind , right...?

sc_threshold=<-1000000000−1000000000>

Threshold for scene change detection. A keyframe is inserted by libavcodec when it detects a scene change. You can specify the sensitivity of the detection with this option. -1000000000 means there is a scene change detected at every frame, 1000000000 means no scene changes are detected (default: 0).

Abond
26th June 2006, 09:26
Well, yes, this one.

dancho
26th June 2006, 12:30
sc_factor=<any positive integer>

Causes frames with higher quantizers to be more likely to trigger a scene change detection and make libavcodec use an I-frame (default: 1). 1−16 is a sane range. Values between 2 and 6 may yield increasing PSNR (up to approximately 0.04 dB) and better placement of I-frames in high-motion scenes. Higher values than 6 may give very slightly better PSNR (approximately 0.01 dB more than sc_factor=6), but noticably worse visual quality.

I will add this one too,
just to be on the safe side...
:helpful:

dancho
27th June 2006, 12:50
New version of MCbatch is out:

MCbatch-0.0.8.0.2pb:

*added <sc_threshold>
*added <sc_factor>
*option for setting up 3.pass line

P.S.
little comment about setting up 3.pass,basicly it is simple really...
-check enable 3.pass encode
-change options and values of your choise
-press button "set" ,info window will appear with 3.pass line
-press "ok" and your 3.pass line is save to buffer
-then you can change options and values for your 2.pass/1.pass lines
-save bat
-run bat

dancho
1st July 2006, 18:50
New version of MCbatch is out:

MCbatch-0.0.8.0.3pb:

*added File info ( needs xvid or helix decoder to work properly )
*added progress bar

Fluffbutt
2nd July 2006, 15:54
Great tool..

Just a quick request, can you make it add " to the start and end of the input filename and the output filename please?

Like you've already done with the path to mencoder bit.

dancho
2nd July 2006, 17:29
New version of MCbatch is out:

MCbatch-0.0.8.0.4pb:

Great tool..

Just a quick request, can you make it add " to the start and end of the input filename and the output filename please?

Like you've already done with the path to mencoder bit.

*update file info

dancho
24th August 2006, 15:58
New version of MCbatch is out:

MCbatch-0.0.9.0.1pb:
*added Preview tab
it is directshow/windowless mode/VMR9 based

kevin23
25th August 2006, 05:10
New version of MCbatch is out:

MCbatch-0.0.9.0.1pb:
*added Preview tab
it is directshow/windowless mode/VMR9 based

Your Download-Link: http://rapidshare.de/files/30593278/MCbatch_0.0.9.0.1.7z.html

Thanks can you put it up on another file sharing site. Rapidshare lately has not been working for me.

Kevin

dancho
25th August 2006, 07:45
Download link from megaupload:

kevin23
25th August 2006, 19:32
Download link from megaupload:

http://www.megaupload.com/?d=JH1A4L55

Thanks !!

Got it...

dancho
30th August 2006, 18:07
New version of MCbatch is out:

MCbatch-0.0.9.0.3pb:
*added seek bar

Download-Link: http://www.savefile.com/files/427424

Gromozeka
20th January 2007, 05:24
Hello. I am sorry, but this link: http://rapidshare.de/files/31338478/....9.0.3.7z.html does not work. Load please MCbatch versions ¹ 0.0.9.0.3 once again

video_magic
20th January 2007, 10:06
Rapidshare has supposedly been taken down (temporarily?)
http://yro.slashdot.org/yro/07/01/19/2237230.shtml

dancho
20th January 2007, 10:59
MCbatch-0.0.9.0.3pb:

Download-Link: http://www.savefile.com/files/427424

Gromozeka
20th January 2007, 20:18
Thanks! It to me a gift per my happy birthday on January, 20th. Sorry me my bad english, because I from Russia

danpos
21st January 2007, 00:10
@dancho

What about to build your GUI for GNU/Linux OS? It would be great.

Thanks in advance,

dancho
21st January 2007, 09:56
@Gromozeka
Happy Birthday to you ...

@danpos
MCbatch is coded in MASM32(RadAsm IDE),
so I cant compile/build it for Linux,sry...

danpos
21st January 2007, 19:58
@dancho

OK! Anyway thanks for answer to my question.

Regards,

mordorspfc
26th March 2007, 00:27
dancho

Is it supposed to work in windows 98 ?

Its freezing the pc when i execute it, i use windows 98.

I wanted so much to use this, must be an excelent tool.

Thanks a lot

dancho
26th March 2007, 10:33
@mordorspfc

sorry to hear this,
MCbatch use VMR-9 as video rendering filter ( for preview ),
and you probably dont have directx 9.0 install on your comp,
so MCbatch cant initialize vmr and freeze itself...
not really sure if you can install dx9.0 on w98,but MCbatch needs it...

edit:
hmm,
it seems ( from PSDK ) that dx9.0 is available for all platforms including w98,
not sure about this,
then maybe is some funny requirments from windows api or masm macros that MCbatch use...
I'll see what I can do about it...

mordorspfc
26th March 2007, 12:32
Ah so thats it...

I had dx 9.0 in my computer, but i also use it to play some games, old games (from 99, 2000), and dx 9 does not work well with them, so im using dx 8.1.

Is it difficult for you to change change the video rendering (if this is the only conflict), or just take off the preview funcion ?

For now, im trying to use DOS mode itself, as you can see in the PM i sent you. I started after i get some info in this topic, so even if i couldnt use this tool, it already helped me a lot.

Best regards

dancho
26th March 2007, 12:57
Is it difficult for you to change change the video rendering (if this is the only conflict), or just take off the preview funcion ?

sry but MCbatch stay as it is ( for now anyway )...

Gromozeka
21st July 2008, 18:13
I have lost the program :(
Please give MCbatch if somebody has

dancho
21st July 2008, 21:40
@Gromozeka

new link: http://www.savefile.com/files/1680559

Gromozeka
22nd July 2008, 05:27
Dancho, Thank you very much :thanks::thanks::thanks:
I shall store your program :)