Quantcast Newbie Guide for Mencoder with Avisynth Support - digitalFAQ.com Forums [Archives]
  #1  
02-28-2004, 10:17 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Newbie guide for use of Mencoder for Win32 with support of Avisynth scripts.

NOTE: See the change log on the bottom of the post to know the news on it!

LAST EDIT: 15/04/2004

Mencoder is a new libavcodec based encoder that uses OS command line.
So get your dos-box or command prompt ready for some typing.
Also you may want to read some information on how mencoder works 1st.
Then please take a look at it's documentation here.
And to it's man_page here.
This is my first time creating a guide so please forgive me for some lack of information.
Post your sugestions so I can improve it further for others.
All the above recomended tools have been developed by others without my intervenience.
I take no credits for them.
The instructions here are based on mine and others experiences at the KVCD forum.
For now, and since I have some imprecise feedback from Window98 users, these instructions
are only prooven to work under Win2000 and WinXP.
If you're running Windows98 and would like to try it maybe you could help me and follow
the steps below and give me more feedback on your experiences.

Tools Downloads

First of all you have to grab the right tools.
Download Donald Graft's DVD2AVI 1.77.3
Read more about Donald Graft's DVD2AVI 1.77.3 and why I always recomend it.
Download Avisynth v2.54 here.
Download almost all Avisynth v2.5x filters here.
Optionally you can download a package of Avisynth v2.5x filters here.
Download this cut-down version of FFvfw that only delivers makeAVIS build 20031113 here.
Find latest Avisynth Optimal script here.
Some of these (and other) tools you may need in the process are probably here.

MEncoder Downloads

Download latest CVS snapshot MEncoder builds here.
Download MC_PAL.bat here
Download MC_NTSC.bat here
Download MC.ini here
Also consider downloading Mencode-me a newbie oriented GUI - 0.23 by VMesquita here.
Also consider downloading PackShot a Mencoder GUI incl. AC3 Audio Multichannel by Incredible here.

Tools Setup

First you have to install the already mentioned tools.
Please make sure you have Avisynth, DVD2AVI and FFvfw or FFdshow properly installed.
That is, choose a small path like "C:\VIDEO" and install your tools in that path.
Bottom line you will need to do "Next > Next > ... > Finish" on most of them.
I'm assuming you already used Avisynth with other encoders such as TMPGEnc and CCE
so I won't take much time explaining it.
I'm also assuming you already used DVD2AVI before, so same as Avisynth here.
If you would like more info on these tools read other guides here
Now the file you downloaded "mencoder-XXXX.zip" will have to be unpacked with
winzip/winrar or something.
Copy the files to a folder named mplayer like "C:\VIDEO\MPLAYER".

Tools Usage

First you have to rip your movie, to a folder in a short path, with your favorite DVD ripper.
Use Smartripper or DVDDecrypt or your favorite.
Then you use DVD2AVI to create a D2V file (fake VOB) from your movie's ripped VOBs.
Now edit the Optimal MA script (or your favorite script) and load your movie in the
mpeg2source line, such as:
Mpeg2Source("d:\movie\mymovie.d2v")
Most important! Try to open your Avisynth script in Windows Media Player 6.4.
You have to be able to open it in WMP 6.4 otherwise the process will fail.
If it doesn't either you have a problem with your script or you didn't load the proper
plugins for Avisynth.
Now open makeAVIS that comes with FFvfw and FFdshow.
Click on the Avisynth script ... button and browse for your just made script.
Now click on the Fake AVI ... button and choose a path and a file name for your fake
AVI (e.g. c:\video\mplayer\video.avi).
Don't worry much about the space it will take on your disk since it's only a "proxy" to
your real VOB files.
Click on Store script in AVI radio button and hit the Create button.
Wait a few seconds while it works.
In the end a message in a small window should appear saying that the Fake AVI
creation succeeded.
You may now click the OK button to close the window and click the Close button to
exit makeAVIS.

MEncoder usage

There is no really yet defined way of using mencoder arguments.
We have knowledge of some GUIs to it that are being prepared right now, but since we're
not pretty sure of all mencoder's capabilities, those GUIs won't be finished so soon.
Anyway, we can always play with a few arguments really known so far.
The batch files you downloaded have minimum arguments on it.
On the other hand the MC.ini file you downloaded have all the arguments found to be
the most appropriate so far.
Use MC_PAL.bat for PAL sources or MC_NTSC.bat for NTSC sources.
You just double click it, a dos-box opens and you wait a couple of hours.
Framerate goes from 4fps on my PIII-550 to >20fps on later CPUs.
But before doing that, you have to open either MC_PAL.bat or MC_NTSC.bat in
windows notepad and change four variables I've added to it.
These are so that MEncoder knows what's the complete source path for your fake avi,
the filename of your fake avi, the complete destination path for your M2V file and the
filename of the M2V file.
So if your source is
Code:
d:\dvd\matrix\matrix_iii.avi
and you want to encode it to
Code:
d:\kdvd\matrix\matrix_iii.m2v
change the variables as this:
Code:
set in_path=d:\dvd\matrix
set in_avi=matrix_iii.avi
set out_path=d:\kdvd\matrix
set out_m2v=matrix_iii.m2v
Now you double click it, seat back and relax

A brief explanation of some arguments

There are some key arguments in the MC.ini file that you could change.
Here are some and their explanantion.
vcodec= either mpeg1video or mpeg2video (for KVCD or SKVCD/KDVD)
vrc_minrate= the minimum bitrate you whish to have in your final movie
vrc_maxrate= the maximum bitrate you whish to have in your final movie
vbitrate= the average bitrate you whish to have in your final movie
vrc_buf_size= the vbv buffer size (VCD=327, SVCD=917, DVD=1835).
Please note that KDVD uses 1835 and that KVCD depends on wether it will be muxed
later as VCD or SVCD)
keyint= the GOP size (15 or 18 for PAL/NTSC KDVD or 24 for KVCD)
aspect= 4/3 or 16/9 (this needs to be according the avisynth script too!)

Hope I helped you entering mencoder usage.
I'll try to update this guide as regularly as possible, if needed.
Cheers

Rui Correia - 28/02/2004

Change Log

15/05/2004
- Minor updating to the download links.
- Now I point to the Latest CVS snapshot o MEncoder here in the forum.
- Also I pointed out both Mencode-Me and PackShot GUIs as these will now make this guide completely useless

12/04/2004
- Readded some explaining on how to edit the batch files.
I had this in the guide previously but erased it by mistake
- Small change in the batch files.
Now these have variables so you can specify path and filename
for both source and destination.
It's just easier this way for rookies in command line

10/04/2004
- Removed old obsolete compilation builds by bilu and VMesquita.
- Added new compilation build by VMesquita from 09/04/2004.
- Removed codecs.conf file from downloads since with VMequita's
new build it's not needed anymore.
- Updated the batch/ini files to latest bilu's recomendations.
- Major changes to the guide reflecting the above issues.
- Phew! That's about it...

10/03/2004
- Added a link to an unofficial compilation of mencoder by bilu.
It now supports "-of rawvideo" so we don't need bbdmux anymore .
I still need to update the scripts, though ...

03/03/2004
- Updated the mc.bat and mc_ntsc.bat: had path problems
- Thus updated the downloadable files too
- Added optional download of mc.bat and mc_ntsc.bat from my new free webspace .

02/03/2004
- Added a link to an unofficial compilation of mencoder by VMesquita.
- Added instructions for interlaced or NTSC Telecined encodes with mencoder internal
arguments by bilu.

29/02/2004
- Updated the mc.bat batch file. It had problems like encoding without outputting a
video file anywhere at all .

28/02/2004
- Lot's of re-post due to text alignment in the guide
- Original post with the guide won Sticky status given by Admin
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
02-28-2004, 10:45 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Just made it a "sticky" Rui

-kwag
Reply With Quote
  #3  
02-28-2004, 11:01 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Great post, congratulations!
Reply With Quote
  #4  
02-28-2004, 11:12 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hya
Thanks guys
I hope everybody can use it when they find ffmpeg thread.
At least when I finish it...
I'm already on my 50iest edit to make it appear win 800x600,ok.
Should I use GripFit on it
Cheers every1
__________________
Rui
Reply With Quote
  #5  
02-28-2004, 11:51 AM
Hydeus Hydeus is offline
Free Member
 
Join Date: Dec 2003
Location: Omicron Persei 8
Posts: 322
Thanks: 0
Thanked 0 Times in 0 Posts
Wow, Rui
Realy great guide for s (and not only )
Keep going
__________________
Go for SECAM =)
Reply With Quote
  #6  
02-28-2004, 12:12 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Rui,
I would not like to lose this opportunity to say, now that I hope that I've caught all your attention, that this is a

VERY, VeRy, vErY, very,

nice guide.
Congratulations

and once you take mencoder the taste, if you want to tweak parameters and add new functions or internal filters, go and read some threads in this same forum, along with man_page (even this last reading is difficult, but you'll find some explanations on mencoder threads). Man-page is in a html doc inside mencoder package that rds pointed in his guide.

Rui, do you think it does worth to put in your guide the address to man_page?

Congratulations again, nice job.
Reply With Quote
  #7  
02-28-2004, 12:18 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi there,
Thank you so much guys .
I hope we hear from w98 users soon.
That way maybe we can understand what's going on with vhelp and others.

@digitall.doc,
About the man_page, consider it done
And thanks for pointing it
Cheers
__________________
Rui
Reply With Quote
  #8  
02-28-2004, 08:50 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
@Rui

Superb guide!

I hope you continue to improve it as we make progress on learning with it
Next step: direct compile of the CVS version of Mencoder - we'll be able to do interlaced encoding!
(if it works of course )


Thanx neighbour
Bruno
Reply With Quote
  #9  
02-29-2004, 03:02 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts

magnific guide Correia

a few days i posted that was needed learn mencoder from zero.
i was "flying"!
i was out (you know),and loose the first posts and threads in mencoder's forum.
when i back, had (and have) tons of posts to read.
in my first lecture in your guide, i got a good
panoramic vision about mencoder!

thank you!

great job!


ps:
i'm using 98se and/or ME for test everything in this systems
...vhelp use 98 too.
right vhelp?
Reply With Quote
  #10  
02-29-2004, 07:07 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
@jorel&bilu,
Thank you so much guys.
I really couldn't have done it without the help of everybody that has been posting here.
I tried to put in my post the best I could find in all the posts here.
So a big thank you for helping me, too

@all,
I'd just like to know if someone has it working with VDubMod too.
That way we could add it to the guide.

@all W98/ME users,
Please post your experiences from using the guide.
It's very important for me to know if you're going ok with it.
Otherwise we'll have to find other ways.

Cheers every1
__________________
Rui
Reply With Quote
  #11  
02-29-2004, 08:17 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts

NEWS: I have updated the guide
There was a problem with the MC.BAT.
Apparently the movie would be encoding for severall hours but you wouldn't find it in your output directory .
This has been fixed among other minor spelling problems
I hope I get some webspace today so I can include some pics in it.
Also I must get some time to go out shoping and get a microphone for my pc
Oh well, hope I can dig a bit more on the final encoded size today/tomorrow...
Cheers
__________________
Rui
Reply With Quote
  #12  
02-29-2004, 08:47 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Rui!

Thats a very good guide we can point to as in the last days that much questions came from newbies which didn't know how to start with mencoder!

Thats what I like in here Testing Experiences- Guides!
Reply With Quote
  #13  
02-29-2004, 09:27 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hya Inc. ,
Nice seeing you around .
I'm so flattered you all liked my guide .
Hope we can all share more experiences so I can add it to the guide so that newbies will don't
find it so difficult with mencoder 4 win32.
Keep up helping us here, Inc.
Cheers
__________________
Rui
Reply With Quote
  #14  
02-29-2004, 10:04 AM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
Is this the new guide man now ??

suzzzzzzzz.

Yes, I'm curious if other w98/se/me users get mencoder working w/out a
hitch.
I'm also curious to see if they can start encoding, using those stange and
long param string (you know.. the ones that I've ben using from you guys)
.
.
I realize that my pc setup is a strange one too, but its from maturing from
all the many different experiences w/ my video endeavors over the last
3 plus years.

Oh yes, good guide, guy
I was really hoping (a few days ago) for a section like, "bare bones" setup
and then an "advance setup" like filters/plugins and other utils and things.
But, w/ the "bare bones" you should be able to get MEn up and running, on
any System/OS. and The next higher level is the "advance setup". But, thats
just me being to needy again
.
.
Good job anyways

Chereo,
-vhelp
Reply With Quote
  #15  
03-02-2004, 02:03 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Update for interlaced or NTSC Telecined encodes:

Use
-lavcopts vcodec=mpeg2video:ildct:ilme
instead of
-lavcopts vcodec=mpeg2video

Need to use VMesquita's CVS build of Mencoder:
http://www.jltoca.uaivip.com.br/file...-29-2-2004.zip

Note: this CVS build doesn't accept fractional framerates, like 23.976 or 29.97 fps, only the official Mencoder port does.

Use -ofps 30 to deal with it, then you'll need to convert back to 29.97 fps somewhere else (someone give me a hand here?)


Bilu
Reply With Quote
  #16  
03-02-2004, 02:13 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ bilu,

the param string: ilme is not in the mencoder/mplayer docs
-vhelp
Reply With Quote
  #17  
03-02-2004, 05:54 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Ok guys,
Made updates on the guide to include bilu's NTSC suggested arguments.
Added download link for VMesquita's new CVS build of mencoder.
Added a change log.
Take a look again and see if it's ok, please.
Thanks every1.
__________________
Rui
Reply With Quote
  #18  
03-02-2004, 07:35 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi guys,
I'm on the move again
Good news: I've found some webspace
I added mc.bat and mc_ntsc.bat download links using it .
Hope everything works.
Cheers
__________________
Rui
Reply With Quote
  #19  
03-02-2004, 07:45 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp
@ bilu,

the param string: ilme is not in the mencoder/mplayer docs
-vhelp
It's on the updated man page from VMesquita's CVS build.

One note about that man page: bad conversion, all parameters show as "s"


Bilu
Reply With Quote
  #20  
03-02-2004, 08:46 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Add vstrict=-1 to the parameters for the VMesquita CVS build to support fractional parameters. Despite default being 0 on the docs to disable strict compliance with MPEG standards (no fractional framerates)


Bilu
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mencoder: KSVCD Express 1.3 and guide maurus Video Encoding and Conversion 0 06-09-2004 07:31 PM
Mencoder: Ffmpeg with Avisynth support milan Video Encoding and Conversion 66 06-03-2004 08:12 AM
Mencoder: New mini-guide for KSVCD maurus Video Encoding and Conversion 0 05-31-2004 04:28 AM
Mencoder: Linux/FreeBSD Guide ench0 Video Encoding and Conversion 7 05-29-2004 10:12 AM
Avisynth: A newbie needs help with script eqlb02 Avisynth Scripting 6 01-29-2004 11:39 AM

Thread Tools



 
All times are GMT -5. The time now is 11:59 AM  —  vBulletin © Jelsoft Enterprises Ltd