digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   MEncoder under Windows 98 / 98SE / ME ? (http://www.digitalfaq.com/archives/encode/8165-mencoder-under-windows.html)

vhelp 02-14-2004 08:14 PM

MEncoder under W98 / SE / ME - (work in progress) ..
 
Hi all :)

EDIT .. update .. 03.06.2004 @ 9:52 am

Note, I posted this late week or so, but it never made it to date. I must have
clicked on the close button too quickly and went to sleep or something :(

@ all..

This was an UPDATE to my MEn research for MEncoder's "option config file" (OCF)
param string syntax so that those of us that are under w98/se/me systems,
could benefit yet another encoder. The problem, as was noted to me, was
that my instructions here, had never got posted, though I thought I had
swaped the bad stuff with the newly good stuff :(
Sorry guys for the confusion.

* OCF = "Option Config File"

Yes, I am (was) pleased to annouce the abilitiy to use "option config file"
param string settings under MEn, through the mechanism of .BAT scripts.
The simplest way to get a working OCF is to start first with a batch script.
Below is an example of a tipicle .BAT script:

Quote:

h:\mencoder\mencoder.exe -include h:\mencoder\men.ocf H:\mencoder\1.avi
As you can see, I follow all my files w/ an actual folder name, just to
be safe. Use a method that works for you. In the GUI that I'm developing,
I'll incorporate this automatically (if I ever get the GUI completed for sharing
with you all here)
Notice the param "-include". This function imports any param strings from
your OCF script. Also, any param inside an OCF script is last in the change,
however, prioritywise, MEn uses whatever param strings found in the command-line,
last!

One more thing, after careful search, I found that MEn does not have an
"import" feature, for importing your .AVI sources 8O how very strange.
And, that's why you see it stuck at the end of the .BAT script, instead
of the OCF script.

Then, you follow it w/ a OCF script, another example below:
This one I use with good results. Some lines are REM'ed out,
but this gives you an idea of how an OCF script is laid out and must always
be called from inside a .BAT script file (ie, -include men.ocf)
Please note, I gave the file extension name ".ocf" its name, as it refers
to "option config file" (hence, the acrynum, OCF) But, do use whatever
you feel is easier for you to use in your manual scripting pleasure, since
these are really just plane ASCII TEXT files !

EDIT .. update .. 03.06.2004 @ 9:31 am
The Option Confi File layout ...

Quote:

## Source Range ##
##################
ss=0 ### our starting postion, in seconds
endpos=60 ### length I'm encoding up to, in seconds.
# vf=swapuv=yes ### only use if divX source give you color problems.

## MPEG switches ##
###################
of:mpeg=yes
ovc:lavc=yes
nosound=yes

## Filters here ##
###################
vf=crop=720:480:00:56
vf=expand=56:56:00:00
vf=noise=05:02:h:u
vf=denoise3d=04:03:06

## 02.23.2004 - snip below, very good quality, and 16:9 AR w/ PDVD.
## MPEG encoding snips here ##
##############################
lavcopts=vcodec=mpeg2video:mbd=2:vrc_minrate=1200: vrc_maxrate=8000:_
vrc_buf_size=1835:vbitrate=2800:keyint=18:vlelim=-4:vcelim=9:vfdct=6:_
lumi_mask=0.05:dark_mask=0.01:vb_qfactor=20.0:mbqm in=1:vqdiff=1:_
vi_qfactor=0.8:vb_qoffset=0.75:aspect=1.78:vrateto l=8000:vqcomp=0.50:_
vrc_eq=tex:vqblur=0:scplx_mask=0.5:naq=yes:vqmin=2 :vqmax=24:vqscale=2

## other param settings ##
##########################
pp=6 ### I found this param gives best quality
ofps=23.976
o=5_enc.m2v ### our output filename
Note 1, when you see the "_", just remove it, and bring line up, so that
everything is on one line.

Note 2, I took out the "matrix" numbers because they were too long.
Also, you can replace those values with "yes" / "no" to "1" / "0" if it's
easier for to understand this. I prefer to input "yes" because this way, I
won't get confused w/ a numbered value. But use what works for you.

Note 3, the OCF scripts also serve as a "template" feature. You can have one
for SVCD; KDVD's; DVD's etc etc. So, think of this in your script endeavors.


EDIT .. update .. 02.28.2004 @ 8:43pm
I changed the old SUBJ line from the old:
** "MENCODE for DUMMIES (work in progress) .."
to new:
** "MEncoder under W98 / SE / ME - (work in progress) .."
.
.
Now, I'm happy :mrgreen:

I am hoping that this will serve as a dumping ground for those just getting
started with MENCORDER. A place to share your installation issues or
whatever.

As some of you may know, I have had nothing but problems with getting
mencoder to work properly under my Windows 98 system.

What I have done, is compile my latest issues (from previous threads) and
incorporate them here, in this thread, with some minor alterations etc.

As it stands, I am not able to get mencoder to works. Therefore, below is
an itenerary of items such as, installations outputs, mencoder output results
and a few other things I guess. Other things may be added here as well.

I will try and update this thread as time allows.

The following files need to be D/L'ed, (which I have done) in order to get
mencoder to work:
* ftp://ftp.mplayerhq.hu/MPlayer/relea...32-1.0pre3.zip
* http://www.jltoca.uaivip.com.br/files/mencoder_avs.zip
...codecs.conf and makeavs.reg is needed for w2k/xp (though i read that
...makeavs.reg may not be needed after all) but codecs.config must be
...extracted and copied to your ..\mplayer\ folder (see below for snapshot)


So far, you need to use a real .avi source file. No frameserved files can
work (added: vmes has found a way to do this w/ Dialhots research) In my example,
I used a an encode to huffy format, which I named "5.avi", and used that as my real .AVI source file.

Below, is a tipicle Folder layout for proper install of mencoder and related
files:

Code:

[*] H:\mencoder
      |_____ [ ] codecs  -- no files in this folder[*] mplayer
                  |_____ codecs.conf
                  |_____ config
                  |_____ input.conf
      encode.bat
      men.ocf - - - add these in later.. see above
      men.ini - - - add these in later.. see above
      mencoder.exe
      mplayer.exe
      man_page.html

The MENCODER.BAT script file (DOS batch file) ...

EDIT .. update .. 03.06.2004 @ 9:52 am

Filename: mencoder.bat
Note, inside this BAT file is the following script lines:
Quote:

@echo off
cls
h:
cd h:\mencoder
mencoder -include h:\mencoder\men.ocf H:\mencoder\1.avi
rem EXIT
@echo ready to deMUX ...
pause

h:\mencoder\bbdmux.exe h:\mencoder\5_enc.m2v 0xe0 _5_enc.m2v
@echo ready to do PULLDOWN ...
pause

h:\mencoder\pulldown.exe h:\mencoder\_5_enc.m2v p_5_enc.m2v
pause
After creating your .BAT file, you then run it (ie, MENCODER.BAT) file by
doubld-clicking it from your mencoder folder.

Remember, that those of you's who are running under Windows 98, there
may be a slight difference in your outputs.

Cheers,
-vhelp

vmesquita 02-14-2004 09:12 PM

vhelp,

I reuploaded the mencoder package, including my batch. please re-download: http://www.jltoca.uaivip.com.br/files/mencoder_avs.zip and use the encode2.bat provided.
I hope it solves the problem... :wink:

vhelp 02-14-2004 09:27 PM

:lol: ha ha.. oh my goodness. I'm soo pooped!!

Thanks for looking out for me vmes. D/L'ing now ..
-vhelp

vhelp 02-14-2004 09:38 PM

Latest error message from DOS box:

Quote:

H:\mencoder>mencoder -oac lavc -of mpeg -ovc lavc -nosound -lavcopts vcodec=mpeg
2video: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:i nter_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,3 0,32,34,36,38,42,42,30,32,34,3
6,38,40,42,44:mbd=1:vqscale=3:vrc_minrate=300:vrc_ maxrate=5000:vrc_buf_size=1865
:keyint=18:vlelim=-4:vcelim=7:lumi_mask=0.05:dark_mask=0.01:aspect=4/3 "H:\menco
der\7.avi" -o encoded.mpg
Bad command or file name
http://www.digitalfaq.com/archives/error.gif
:roll:

kwag 02-14-2004 09:40 PM

vhelp,

Edit all of that in notepad, so it's a single string.

-kwag

vhelp 02-14-2004 09:45 PM

@ all,

I revised the above to show a pic of my dos box.

@ kvcd,

vmes included an new .BAT script for me. It was all in one line of text :confused:

I only changed the video part to show my folder name and filename ie,
** "H:\mencoder\7.avi" -o encoded.mpg

-vhelp

vhelp 02-14-2004 10:06 PM

Question..

I'm thinking about MPEG encoder .DLL here. Where is the lavc mpeg .DLL ??

I don't remember ever installing a lavc mpeg2video file anywheres.
Could that be my problem ??

The reason I'm concluding with this is because I was able to get mencoder
to work w/ the following (though it created a divX file) snip:

*** mencoder.exe -vfm huffyuv -ovc lavc 7.avi -o 7_encoded.avi

This is what the DOS window looks like, as mencoder encodes my 7.avi
file into 7_encoded.avi

http://www.digitalfaq.com/archives/error.gif

To use this snip, just change the 7.avi filename to match yours,
and it should encode, as it does in mine.

-vhelp

rds_correia 02-15-2004 06:54 AM

Hi vhelp,
Glad to see that you're still around with the guys.
Say you edited VMesquita's batch file to change the source name.
Did you leave the comas like "c:\blabla.avi" ?
If so try removing them to see what happens.
No old buddy, I didn't install any mpeg.dll.
And I just did a fresh install of WinXP Pro.
Hope I helped.
Cheers

vmesquita 02-15-2004 07:01 AM

I am not sure about this, but I think Windows 98 does not allow command-line bigger than 255 characters. That would explain why the small divx line works and the big mpeg line doesn't. If that's the case, I can see a way out:use a DOS variable for the matrix values. Not sure if this will work. If it doesn't, then you can: try to create a mencoder configuration file (no idea about the syntax, I have to do a search) or use a custom shell, like bash (ported from unix).
But of course. it's just a guess.

rds_correia 02-15-2004 08:33 AM

Yes, maybe that's it!
vhelp try the following bat:
Code:

@echo off
set matrix="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: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"
rem
mencoder -of mpeg -nosound -ovc lavc -lavcopts aspect=1.3333:vmax_b_frames=2:vcodec=mpeg2video:
%matrix%:mbd=1:vrc_minrate=600:vqscale=4:vrc_maxrate=3500:vrc_buf_size=1835:keyint=15 c:\video\mencoder\bttf.avi -o c:\video\mencoder\encoded.mpg
pause

But of course that you know how to do it. It's just that if it works others can already copy and paste this material.
Cheers

rds_correia 02-15-2004 08:53 AM

Hi vhelp,
Also download and try this ReactOS that is a substitute for the command.com that is brought on Win98/ME.
ReactOS shell
Here is the site hosting the file with some explanation ReactOS site
Hope it helps 8)
C ya

vhelp 02-15-2004 10:44 AM

my friends,

Thanks :mrgreen:

I needed a break from the madness yesterday or so. Anyways, I'm glad
that I've en making headway in my mencoder endeavors. With a little luck,
I'll have something working (w/ my home-brew GUI i'm also developing in
the background, in the mids of all this ca'ass) Yeah, real BETA crap, but its
ben working like a charm for me, specialling for this nonsense - less typing
on my part - - I love it, I love it :mrgreen:

Yes, vmes.. I agree w/ you that w98/se/me may have a cmd-line limit. I
started to realize this .. "bad command or filename" should have ben the
hint/nudge for me :) My first hint was when I removed the Matrix, and I
got a whole different error message. Well, anyways.. this has (and still
continues) to be a haul for me, till I get it working.

rds, thanks for the D/L link. Done!
With a little luck, I'll research what vmes suggested, (unless he found the
answer via mencoder (sounds soo like Austin Powers' "Oh, behave!!" line)
But, whatevr the outcome, rest assured, I'll be incorporating this w98/se/me
bug "remedy" in my GUI :mrgreen:

Listen, I'm in the middle of making Break-Fast.. you know.. coffee, bacon
and eggs.. oh my :mrgreen: Its getting close to 11am here in NY dudes !!

Again, thanks guys,
-vhelp

rds_correia 02-15-2004 10:59 AM

Hehe,
Stick with us and you can't loose 8)
If your command.com doesn't give you a break even with the use of variables for the most common arguments such as the matrices, give reactos substitute cmd.exe a go and maybe you'll end up producing great jobs with mencoder.
BTW reactos will give you a scroll on your shell so you can see what you did since begining. Cool stuff for Win98/ME, or what?
Just a bit off topic :lol:
Man I'dd love being in the US today...In LA I mean.
You guys are on the NBA ALL STAR Weekend :!:
Hopefully I'll be able to see the "retired" game today...~at 02:00AM GMT...
Crapp we should all be on the same time all over the world :!: :lol:
Back on topic.
Give it a shot and tell us how it went vhelp.
Cheers

PS- Of course do finish your breakfast before you try :facelick: :mrgreen:

vhelp 02-15-2004 11:35 AM

ok.

Problems w/ the SET command in dos.

After the counting the chars (using excel :mrgreen: ) in the matrix part, it
resulted in a string length of 420 chars 8O

and I am being hit by an DOS "syntax error" message (thats before mencoder
even gets to it)
.
.
But, mencoder is also still display the error "Bad command or Filename"

still working..

-vhelp

vhelp 02-15-2004 11:53 AM

update ..

ok, here is what I'm getting, w/ a little refinement to the NEW dos script
syntax:

Quote:

Warning: DTS to SCR delay is too small 0min 0mb A-V:0.000 [865:0]
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR!
Error in stream: PTS to SCR delay 0 is too little!
Error in stream: PTS earlier than SCR! 0min 0mb A-V:0.000 [874:0]
Looks like I'm making headway.

-vhelp
ps: @ rds, how to I add that logfile.txt in mencoder script ??

rds_correia 02-15-2004 11:56 AM

Hya,
Check the other thread again :wink:
C ya

vhelp 02-15-2004 12:05 PM

:!: what about my error above !!

oh, but you still didn't tell me how to logfile.txt in mencoder :roll:

Listen, I have an :lightbulb: .. why not just post a .txt file of scripts that go
beyond the dos 255 char limit (in addition to the chars you post) !!

-vhelp

rds_correia 02-15-2004 12:20 PM

Yes I did but it was on the other thread.
Here it is:
Code:

@echo off
set matrix="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: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"
rem
mencoder -of mpeg -nosound -ovc lavc -lavcopts aspect=1.3333:vmax_b_frames=2:vcodec=mpeg2video:%matrix%:mbd=1:vqmin=5:vqmax=3:vrc_buf_size=1835:keyint=15 c:\video\mencoder\bttf.avi -o c:\video\mencoder\encoded.mpg > mencoder_logfile.txt
pause

Look at the end of the mencoder arguments:" > mencoder_logfile.txt"
Hope it helps :wink:
Cheers

vhelp 02-15-2004 05:47 PM

ok, here is my latest update.

Under Windows 98, the SET command does not like to have the "=" char
within the string.

How I tested this out ...

I opended a DOS window, and typed in the following:

Quote:

set mstring="test="
And, dos gave me this error message: "Syntax error"
Next, I take out the "=" sign, and result is no error :)

So, I would like those of you who have w98SE / ME / W2K / XP to please
try the above steps out with the "=" sign, to see if you get the error message
too.

Sorry guys, but small steps for me, Thanks.
-vhelp

rds_correia 02-15-2004 05:56 PM

Hi vhelp,
I'm using command prompt that comes with "WinXP Pro SP1a English" and I tested your mstring and it worked for me.
I even tried
Code:

echo %mstring%
afterwards and it returned me
Code:

"test="
.
So XP is fine with that. Maybe a problem with Win98/ME/2000 but not with XP.
BTW have you tried ReactOS command prompt substitute with Win98.
They say it works wonders...
Oh, and how about the > logfile.txt ? Did it work?
Cheers


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.