02-14-2004, 12:54 PM
|
Invalid Email / Banned / Spammer
|
|
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Are you tired of the few filters mencoder offer? Would like to use your favorite script with Mencoder? Now all your problems are over! Call 1-800-... Just kiddig.
Well, after some tries, I found out how. You're gonna need ffvfw installed, since we're going to use makeavis to get there. Also download and unpack this package http://www.jltoca.uaivip.com.br/files/mencoder_avs.zip
1) install ffvfw
2) Import this regfile: makeavis.reg This is for Windows 2000/XP only. Windows 98 you have to make some changes in system.ini instead and I didn't test in this SO.
3) Put codecs.conf and put it in a subfolder called mplayer (a subfolder of the folder mencoder is in)
4) Execute makeavis in ffvfw installation folder. select your script, select the name of the fake AVI and click on create.
5) Load the fake avi in mencoder as you we loading any other avi.
Sample command-line:
Quote:
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29, 34,9,10,14,26,27,2
9,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,3 0,32,34,36,38,40,42,44
:mbd=1:vqscale=3:vrc_minrate=300:vrc_maxrate=5000: vrc_buf_size=1
835:keyint=18:vlelim=-4:vcelim=7:lumi_mask=0.05:
dark_mask=0.01:aspect=4/3:vmax_b_frames=1 "D:\Videos\1.avi" -o encoded.mpg
|
That's it!
I hope it helps!
EDIT: Looks like for the script to work, it must output yv12 colorspace. You could change codecs.conf but I think the easiest way is add a converttoyv12(), since there will be a conversion to yv12 anyway, if not in the script, in the encoder.
|
Someday, 12:01 PM
|
|
Site Staff / Ad Manager
|
|
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
02-14-2004, 01:02 PM
|
Free Member
|
|
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Vmesquita could you do me a great favor and post the links to the needed files to get mencoder running on Windows ... does exist a GUI?
I never tried mencoder till now
|
02-14-2004, 01:54 PM
|
Free Member
|
|
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I knew I had to agree with Jorel when he said you were a genious when you were trying to tell everybody the contrary.
Yep in fact you are
Already encoding a script with MA_Just_Soft by Inc, and although the fps dropped like crazy from ~7 to ~4 I gotta tell you that I'm not giving up on avisynth even for the best encoder ever
The quality with the script is a lot better.
Pô, o cara é gênio mesmo!!! > Ptg joke
Cheers
EDIT: though I didn't need to add the regfile at all. Just using the codec file that recognises ffvfw makeAVIS
EDIT2: Seams it doesn't accept GripFit??? Hopefully I don't need it...
__________________
Rui
|
02-14-2004, 01:59 PM
|
Free Member
|
|
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi vmesquita,
I'm still having trouble w/ mencoder. cant' get it to run for anything.
I D/L'ed that same .zip file earlier and installed it. I was also able to finally
D/L the file below, then extract and installed the codecs.conf file.
* ftp://ftp.mplayerhq.hu/MPlayer/relea...32-1.0pre3.zip
My source .AVI file is an encoded to huffy format, which I named "5.avi",
and used that as my real .AVI source file. Now, for the troublesome parts.
Below, is my Folder layout:
Code:
[*] H:\mencoder
|_____ [ ] codecs -- no files in this folder[*] mplayer
|_____ codecs.conf
|_____ config
|_____ input.conf
encode.bat
5.avi
mencoder.exe
mplayer.exe
man_page.html
The MENCODER.BAT script file (DOS batch file) ...
Filename: mencoder.bat
Note, inside this BAT file is the following script lines:
Quote:
echo off
ega43
vga90col
cls
h:
cd h:\mencoder
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29, 34,9,10,14,26,27,2
9,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,3 0,32,34,36,38,40,42,44
:mbd=1:vqscale=3:vrc_minrate=300:vrc_maxrate=5000: vrc_buf_size=1
835:keyint=18:vlelim=-4:vcelim=7:lumi_mask=0.05:
dark_mask=0.01:aspect=4/3:vmax_b_frames=1 "H:\mencoder\5.avi" -o encoded.mpg
pause
|
Then, I run the MENCODER.BAT file by doubld-clicking it in explorer.
And, the DOS box outputs the following:
Quote:
MEncoder 1.0pre3-3.2.3 (C) 2000-2003 MPlayer Team
CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1492 MHz (Family: 6, Stepping:
2)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading H:/MENCODER/mplayer/codecs.conf: 61 audio & 170 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file H:/MENCODER/mplayer/mencoder: No such file or directory
No file given
Exiting... (error parsing cmdline)
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name
Press any key to continue . . .
|
Remember, I'm running Windows 98.
Thanks for any help,
-vhelp
|
02-14-2004, 02:02 PM
|
Free Member
|
|
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In my case a direct avi import works well, but not a avi fake via ffvfw make avis:
##########################################
C:\Programme\MPlayer>cd C:\Programme\MPlayer\
C:\Programme\MPlayer>C:
C:\Programme\MPlayer>mencoder -of mpeg -ovc lavc -nosound -lavcopts vcodec=mpeg2
video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,2 6,27,29,34,37,12,14,18,27,29,3
4,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:in ter_matrix=16,18,20,22,24,26,2
8,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:mbd=1:vqscale=3:vrc_minrate=300:vrc_m axrate=5000:vrc_buf_size=1835:
keyint=15:vlelim=-4:vcelim=7:lumi_mask=0.05:dark_mask=0.01:aspect=4/3:vmax_b_fra
mes=1 "H:\core.avi" -o "H:\core.mpg"
MEncoder 1.0pre3-3.2.3 (C) 2000-2003 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred 2275 MHz (Family: 6, Stepp
ing: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading C:/Programme/MPlayer/mplayer/codecs.conf: Can't open 'C:/Programme/MPlay
er/mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/c
odecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file C:/Programme/MPlayer/mplayer/mencoder: No such file or direc
tory
font: can't open file: C:/Programme/MPlayer/mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
success: format: 0 data: 0x0 - 0xDE00
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO: [AVIS] 704x576 16bpp 25.000 fps 0.8 kbps ( 0.1 kbyte/s)
[V] filefmt:3 fourcc:0x53495641 size:704x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
================================================== ========================
Cannot find codec matching selected -vo and video format 0x53495641.
Read DOCS/HTML/en/codecs.html!
================================================== ========================
Exiting...
C:\Programme\MPlayer>pause
Drücken Sie eine beliebige Taste . . .
###################################
|
02-14-2004, 02:02 PM
|
Free Member
|
|
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi vhelp,
Where is your source pal? i can only see a path there buddy H:\mencoder\5 .
Better tell mencoder what file it is going to have to encode like a avisynth script/fake avi as VMesquita is showing us.
C ya
__________________
Rui
|
02-14-2004, 02:15 PM
|
Free Member
|
|
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I was bit too fast, thats why I got that codec issue.
Problem solved by carefully reading vmesquitas post, to do the registration and codec.confic into mplayers folder
I just did an example encoding via Avisynth on THE CORE Nice!
And a mega linear constant Q curve in Bitrateviewer.
Q = 3.00
Bitrate: 1415 avg and 3087 peak
|
02-14-2004, 02:17 PM
|
Free Member
|
|
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi rds,
Note, to save space w/ posting scripts and things, please re-look at the above
script again. I have revsied it, and re-ran the DOS .BAT file again.
There are also some new changes.
Thanks for your attention to Mine and Inc's matter (others too probably)
-vhelp
|
02-14-2004, 02:18 PM
|
Free Member
|
|
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by incredible
In my case a direct avi import works well, but not a avi fake via ffvfw make avis:
....
MEncoder 1.0pre3-3.2.3 (C) 2000-2003 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred 2275 MHz (Family: 6, Stepp
ing: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading C:/Programme/MPlayer/mplayer/codecs.conf: Can't open 'C:/Programme/MPlay
er/mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/c
odecs.conf': No such file or directory
Using built-in default codecs.conf.File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file C:/Programme/MPlayer/mplayer/mencoder: No such file or direc
tory
font: can't open file: C:/Programme/MPlayer/mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
success: format: 0 data: 0x0 - 0xDE00
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO: [AVIS] 704x576 16bpp 25.000 fps 0.8 kbps ( 0.1 kbyte/s)
[V] filefmt:3 fourcc:0x53495641 size:704x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
================================================== ========================
Cannot find codec matching selected -vo and video format 0x53495641.
Read DOCS/HTML/en/codecs.html!
================================================== ========================
Exiting...
C:\Programme\MPlayer>pause
Drücken Sie eine beliebige Taste . . .
###################################
|
Hi Inc,
You MA_Just_Soft rocks with mencoder.
Looking at your command line output if look at the part I highlited in bold it seams you didn't make a folder called mplayer inside the folder where you have mencoder.exe with the conf file provided by VMesquita.
Like in my case I have mencoder in c:\video\mencoder\mencoder.exe.
Now I have put the codecs.conf file in c:\video\mencoder\mplayer\codecs.conf.
I think that's what VMesquita advised us to do, wasn't VM?
C ya
EDIT: Phew so many work and the guy solved it before I post. Damn
__________________
Rui
|
02-14-2004, 02:20 PM
|
Free Member
|
|
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
YEP!!
That codec is fast!!
Even when using avisynth faking! I got 22 fps encoding rate on 25fps/704x576 source
But the report still says there is something missed and he tells something about avi header! :
##############
....
...
......
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file C:/Programme/MPlayer/mplayer/mencoder: No such file or direc
tory
font: can't open file: C:/Programme/MPlayer/mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Unknown block type, possibly non-MPEG stream!
Writing AVI index...
Fixing AVI header...
#######################
|
02-14-2004, 02:41 PM
|
Free Member
|
|
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ok, I've tried again, and was able to D/L the first file from vmes.
Everything, has ben successfully installed (see my first post above) and I
revised my post (please re-read)
But, I'm still having trouble w/ the mencoder working. You can see the
DOS windows' many warnings/errors above.
Thanks again, for any assistance,
-vhelp
|
02-14-2004, 03:05 PM
|
Free Member
|
|
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Vhelp ...
My installation runs like a charm and the quality is very nice!
Do post your error log of the terminal window.
And I see now you did it already .... well is that all in ONE line???
Seems to me you still got line breaks in your command line!
|
02-14-2004, 03:17 PM
|
Free Member
|
|
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
And I see now you did it already .... well is that all in ONE line???
Seems to me you still got line breaks in your command line!
|
yeah, this is from vmes. I can't see how he would post a defective script
above  but I'll check it out now.
I did notice that
Code:
vrc_buf_size=1
835:keyint=18:vlelim=-4:vcelim=7:lumi_mask=0.05:
probably should be .. =1835
-vhelp
|
02-14-2004, 03:24 PM
|
Invalid Email / Banned / Spammer
|
|
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
@rds_correa
I am not sure if the registry key is really necessary. Makeavis wasn't working even with virtualdub at first, so I thought "I have to fix for VD first". And the registry key did it. Then I went on researching about how mencoder handles codecs...
About gripfit: you can drop it and use mencoder resizing routines. No leaking problems, and it's also much faster. Just add "-vf scale=704:-3,expand=0:480 -sws 9" in your command line and remove the grip filters from your script. I don't know if anamorphic output is working, I haven't tested yet.
@vhelp
As incredible said, the complete mencoder command-line must be in 1 one line, no breaks. The only reason we break the line when posting it to avoid the thread getting to "wide".
@all
Are you able to use b-frames? Because 1 b-frame gives me "Error in stream: PTS to SCR delay XXXX" is too little!, and 2 or 3 gives me so much messages of this kind , that the screen never stops scrolling.
|
02-14-2004, 03:24 PM
|
Free Member
|
|
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Guys, guys, guys,
The problem is that when we copy the script to the notepad it gets line breaked.
So we need to make it a big monolithic command line.
Anyway, seams everybody is working now.
Post your results as soon as you get them
Cheers
__________________
Rui
|
02-14-2004, 03:29 PM
|
Invalid Email / Banned / Spammer
|
|
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just in case anyone just got here and don't know this (I am sure most of you know):
The generated mpg file must be demuxed (via MPEG tools of tmpgenc, for instance). Then you must enable pulldown flag via pulldown.exe and mux again with audio. The same stuff needed for FFVFW.
|
02-14-2004, 03:34 PM
|
Free Member
|
|
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
@VM
Yes old buddy. I am now experiencing the same PTS SCR lines you mentioned. I just didn't wait enough for them to happen.
You see while you do 22fps with your pcs I do only 4/5 with the avisynth support.
Anyway I know this has something to do with constant quality.
You see to do constant quality you can even drop the vrc_minrate & vrc_maxrate because it seams it's not doing anything.
That is the same with ffvfw. Both don't respect min and MAX bitrates when working in constant quality...
So now I dropped qscale and am only working with vrc_minrate & vrc_maxrate. It works. The encoding gets inside the min and MAX figures.
So I'm looking in the docs for an average bitrate command but I only come up with vbitrate and a vratetol but I don't know if this is it...
Anybody know one that works?
C ya
__________________
Rui
|
02-14-2004, 03:45 PM
|
Invalid Email / Banned / Spammer
|
|
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
rds_correia,
vbitrate will do it. But 1-pass VBR doesn't have a very good quality. Looks a lot like those very old DivX 3.11  encoded stuff, where a high motion scene gets bad, then good, then bad... The encoder raise the bitrate, but for a small while so it doesn't deviates from the average too much. And lows the bitrate, but also raises very fast even if it's not needed. You should look about 2-pass VBR... But I guess that will take a lot of time in your machine.
Anyway I am not having big peaks. None above 5000 so far, at 704x480. Maybe because it's a DivX source. Actually, I just had an idea: what about making the motion adaptative script you're using more agressive? This way, the encoder will have less data in his hands, so it will have less information to discard and will have smaller peaks...?
|
02-14-2004, 03:46 PM
|
Free Member
|
|
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, I'm still not getting anywheres. Although while I was trying to get
mencoder working, I was also coding a GUI in the background, though mostly
fussing w/ the errors messages etc. So, I decided to search for a GUI w/
this toy, and found one (D/L'ed it previously) and it too does not work - rAtS !!
I'll stick to my GUI creations
Anyways.. back to the script issues.
I even made it one very long string, as was suggested, and it now says,
"Bad command or file name"
Then, I decided to take out the Matrix string. It seems that it's broken
somewheres. But, I get no more "Bad command or file name" error msg.,
but it's still not doing anything. Error message is now detailing below:
Quote:
now running MENCODER ...
MEncoder 1.0pre3-3.2.3 (C) 2000-2003 MPlayer Team
CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1502 MHz (Family: 6, Stepping:
2)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading H:/MENCODER/mplayer/codecs.conf: 61 audio & 170 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file H:/MENCODER/mplayer/mencoder: No such file or directory
No file given
Exiting... (error parsing cmdline)
h:\mencoder\mencoder.exe -of mpeg -ovc lavc -lavcopts vcodec=mpeg2video:mbd=1:vqscale=3:vr
c_minrate=300:vrc_maxrate=5000:vrc_buf_size=1835:k eyint=18:vlelim=-4:vcelim=7:lumi_mask=0.
05:dark_mask=0.01:aspect=4/3:vmax_b_frames=1 "h:\mencoder\7.avi" -o encoded.mpg
Press any key to continue . . .
|
Sorry guys, I'm bailing out of mencoder. I've spent far too long w/ this guy
no working, when all it boils down to is the script (or length thereof) It's just
not working under Windows 98.
Should I ever get it working, I'll come back 
But, in the mean time, good luck, and all the best 
-vhelp
|
All times are GMT -5. The time now is 03:05 PM — vBulletin © Jelsoft Enterprises Ltd
|