Quantcast Automating Mencoder ? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
06-10-2004, 10:26 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Just finished the encode.bat for semi-automation and my only opinion is
this is a very sloooooooow method. With the simulated MA parms, this
process is averaging 20+ hours for a 120+ min movie. WOW
Oh well, here my batch file:


:VDDecrypter /MODE FILE /DEST "F:\Temp\" /START /CLOSE
:: | DVD2AVI (Force Film) |
DVD2avi -IA=1 -FO=1 -CS=2 -YR=1 -TN=1 -AIF=[F:\Temp\vts_01_1.vob] -CF=4 -DD=1 -DRC=2 -OF=[F:\Temp\movie] -exit
:: | DVA2AVI (Interlaced) |
:VD2AVI -A=1 -FO=0 -CS=2 -YR=1 -TN=1 -AIF=[F:\Temp\vts_01_1.vob] -CF=4 -DD=1 -DRC=2 -OF=[F:\Temp\movie] -exit
:: | Audio BeSweet |
FOR %%A IN (f:\Temp\*.ac3) DO BeSweet.exe -core( -input "%%A" -output "f:\Temp\movie.mp2" ) -ssrc( --rate 44100 ) -boost( /b3=5 /l=0.95 ) -mp2enc( -s 44.1 -b 64 )
:: | MEncoderME (Batch) |
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_1.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_1.VOB" -o "F:\Temp\part1.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_2.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_2.VOB" -o "F:\Temp\part2.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_3.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_3.VOB" -o "F:\Temp\part3.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_4.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_4.VOB" -o "F:\Temp\part4.mpv"
:: | Join Video parts |
SET MOVIEFOLDER=f:\Temp
SET /P MOVIEFOLDER= Input Movie folder path:
COPY /B %MOVIEFOLDER%\*.mpv %MOVIEFOLDER%\KSVCD.mpv
:: | Pulldown (2:3) |
Pulldown.exe "F:\Temp\KSVCD.mpv" "F:\Temp\movie.mpv"
:: | Multiplex Audio + Video |
mplex.exe -f 4 -v 1 -b 230 -V -p 1 -h -S 795 -M -o "F:\Temp\movie.mpg" "f:\Temp\movie.mpv" "f:\Temp\movie.mp2"
:: | Shutdown Computer |
shutdown.exe
:ause


:: = comment line and as you may have figured my work directory is
f:\Temp. Well, it works, but I applied for social (no) security now
before my next encode.

-BP
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  
06-10-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
Hi BP,

Is your "conf" file something like this : vf=yuvcsp,pullup,softskip,crop=704:460:0:6,scale=6 72:320,hqdn3d,sab=.5:.5:1,noise=1th,expand=704:480
Of course, the resizing would be different for you, but the filter values is what counts.

-kwag
Reply With Quote
  #3  
06-10-2004, 03:21 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
Just finished the encode.bat for semi-automation and my only opinion is
this is a very sloooooooow method. With the simulated MA parms, this
process is averaging 20+ hours for a 120+ min movie. WOW
Oh well, here my batch file:


:VDDecrypter /MODE FILE /DEST "F:\Temp\" /START /CLOSE
:: | DVD2AVI (Force Film) |
DVD2avi -IA=1 -FO=1 -CS=2 -YR=1 -TN=1 -AIF=[F:\Temp\vts_01_1.vob] -CF=4 -DD=1 -DRC=2 -OF=[F:\Temp\movie] -exit
:: | DVA2AVI (Interlaced) |
:VD2AVI -A=1 -FO=0 -CS=2 -YR=1 -TN=1 -AIF=[F:\Temp\vts_01_1.vob] -CF=4 -DD=1 -DRC=2 -OF=[F:\Temp\movie] -exit
:: | Audio BeSweet |
FOR %%A IN (f:\Temp\*.ac3) DO BeSweet.exe -core( -input "%%A" -output "f:\Temp\movie.mp2" ) -ssrc( --rate 44100 ) -boost( /b3=5 /l=0.95 ) -mp2enc( -s 44.1 -b 64 )
:: | MEncoderME (Batch) |
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_1.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_1.VOB" -o "F:\Temp\part1.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_2.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_2.VOB" -o "F:\Temp\part2.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_3.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_3.VOB" -o "F:\Temp\part3.mpv"
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=1 "F:\Temp\VTS_01_4.VOB" -o /dev/null
Mencoder.exe -include Kwag.conf -lavcopts vbitrate=842:vpass=2 "F:\Temp\VTS_01_4.VOB" -o "F:\Temp\part4.mpv"
:: | Join Video parts |
SET MOVIEFOLDER=f:\Temp
SET /P MOVIEFOLDER= Input Movie folder path:
COPY /B %MOVIEFOLDER%\*.mpv %MOVIEFOLDER%\KSVCD.mpv
:: | Pulldown (2:3) |
Pulldown.exe "F:\Temp\KSVCD.mpv" "F:\Temp\movie.mpv"
:: | Multiplex Audio + Video |
mplex.exe -f 4 -v 1 -b 230 -V -p 1 -h -S 795 -M -o "F:\Temp\movie.mpg" "f:\Temp\movie.mpv" "f:\Temp\movie.mp2"
:: | Shutdown Computer |
shutdown.exe
:ause


:: = comment line and as you may have figured my work directory is
f:\Temp. Well, it works, but I applied for social (no) security now
before my next encode.

-BP
Some questions and something more:
1 - Why you use 64KB for audio? It is enough quality?
2 - Under this line:
Code:
SET /P MOVIEFOLDER= Input Movie folder path (Enter = F:\Temp
I would put (IMHO)
Code:
IF /I '%MOVIEFOLDER%'=='' SET MOVIEFOLDER=F:\Temp
In this way when script prompt you for a movie folder, just pressing enter will give default folder (F:\Temp for your script).
3 - What do you think about these lines:
Code:
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv
With these lines you can encode DVD with more than 4 VOBs (BUT ONLY UNTIL 9). Only need to be sure that correct order is showed in vob file name (as yours).
4 - What is verbose function in Mplex and why you select it in 1 (-v 1).
5 - Why you set buffer in 230.
6 - What mean system header option (-h). Is this option needed?
7 - I think that you don't need -S 795 option. Supose rare case that mencoder.exe give you a 797MB file, you will lost your work and you will need to encode vob again.
8 - Why do you use -M option?


--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #4  
06-10-2004, 09:57 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Kwag,

Quote:
Is your "conf" file something like this Question : vf=yuvcsp,pullup,softskip,crop=704:460:0:6,scale=6 72:320,hqdn3d,sab=.5:.5:1,noise=1th,expand=704:480
Of course, the resizing would be different for you, but the filter values is what counts.
Here's my temp.conf filter line:
vf=yuvcsp,pullup,softskip,scale=720:480::0:9,crop= 704:480:8:0,noise=3th,unsharp=l3x3:0.6,hqdn3d,sab= 0.5:0.5:1,unsharp=l3x3:-0.7:c3x3:-1.5,expand=704:480:0:0
I used MenCalc for scale,crop,expand parms

@Prod,
Quote:
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv
Good idea!! I'll test right now.

Quote:
mplex.exe -f 4 -v 1 -b 230 -V -p 1 -h -S 795 -M -o "F:\Temp\movie.mpg" "f:\Temp\movie.mpv"
-v 1 ---> verbose 1=normal (messages from mplex)
-f 4 ---> 4=SVCD format
-b 230 -> buffer 230
-V ---> multiplex VBR
-p 1 ---> 1=num of packets per pack
-h ---> Create system Header in every pack
-S 795 -> Max size of output file to split on
-M ----> Split a seqence across files


-BP
Reply With Quote
  #5  
06-10-2004, 10:03 PM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Just a quick question:

You output seperate mpv files, then join them, but there's no join for the mp2.

Does besweet automatically join the files in that

FOR %%A IN (f:\Temp\*.ac3) DO BeSweet.exe -core( -input "%%A" -output "f:\Temp\movie.mp2" )<snipped>

line? I see only the one output file, movie.mp2, so I'm guesing that it does add the "for %%A.ac3" all into one, can you confirm?

(If so, it'd save me a lot of mucking around!! LOL )

Secondly, just noticed, dvd2avi's command line has "-CF=4 -DD=1" these don't appear in my version's command line reference, what do they do?
(and which version has them? (I've got the 'fixed' 1.30 version, (I don't like the "new" dgmpgenc program, it outputs unplayable d2v's)).

Thanks mate.
__________________
|
Meeow!
Reply With Quote
  #6  
06-11-2004, 07:20 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Fluffbutt
Quote:
Secondly, just noticed, dvd2avi's command line has "-CF=4 -DD=1" these don't appear in my version's command line reference, what do they do?
(and which version has them? (I've got the 'fixed' 1.30 version, (I don't like the "new" dgmpgenc program, it outputs unplayable d2v's)).
DVD2AVI version 1.76 by LOL.J modified by dvd2svcd 1.05

dvd2avi commandline options:

-iDCT-Algorithm -IA (1=32-bit SSE MMX (default) 2=64-bit Floating Point 3=IEEE-1180 Reference)
-Field-Operation -FO (0=None (default) 1=Force Film 2=Swap Fields)
-Color-Space -CS (1=RGB 24-bit 2=YUV 4:2:2)
-YUV-RGB -YR (1=PC Scale (default) 2=TV Scale)
-Luminance-Filter -LF (Not implemented yet)
-Track-Number -TN (0=None (default) 1-8=Track 1 to 8 )
-Channel-Format -CF (1=Dolby Digital 2=MPEG Audio 3=Linear PCM 4=Auto Select (default))
-Dolby-Digital -DD (1=Demux (default) 2=Demux All Tracks 3=Decode)
-MPEG-Audio -MA (1=Demux (default) 2=Demux All Tracks)
-Dynamic-Range-Control -DRC (0=Off (default) 1=Light 2=Normal 3=Heavy)
-Dolby-Surround-Downmix -DSD (0=Off 1=On (default))
-48-44.1KHz -DM
-Normalization -NO (Not implemented)
-Input-Files -IF ([file1,file2,file3,......])
-Auto-Input-Files -AIF ([file1]) Autoloads VOB files incrementally.
-Output-File -OF ([project file name] No Extension)
-Exit (Exits when Project has been saved)

Example:

dvd2avi -ia=2 -FO=2 -Cs=2 -YR=2 -TN=2 -IF=[D:\vobfiles\vts_02_1.vob,D:\vobfiles\vts_02_2.vob] -CF=3 -DD=2 -DRC=1 -OF= -exit

The above will save a project file named d:\MyProject.d2v

Kind Regards,
dvd2svcd

Quote:
You output seperate mpv files, then join them, but there's no join for the mp2.

Does besweet automatically join the files in that

FOR %%A IN (f:\Temp\*.ac3) DO BeSweet.exe -core( -input "%%A" -output "f:\Temp\movie.mp2" )<snipped>

line? I see only the one output file, movie.mp2, so I'm guesing that it does add the "for %%A.ac3" all into one, can you confirm?
DVD2avi -IA=1 -FO=1 -CS=2 -YR=1 -TN=1 -AIF=[F:\Temp\vts_01_1.vob] -CF=4 -DD=1 -DRC=2 -OF=[F:\Temp\movie] -exit

This creates a full .ac3 file, so BeSweet can process the whole audio
file .mp2 for multiplexing later.

I'm having a problem with:
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv

It's picks of each .vob, but overwrites the previous .mpv. Got to work on
this some more

Comments:

This process with the MEncoder filters is giving 4fps and averaging 20
or more hours per encode. Yes, the quality is better, but is this worth
running my PC a day or more for 1 movie backup. I also realize this
is a test phase and improvements could come. I'll stop testing and wait
for this encoder to mature.

-BP
Reply With Quote
  #7  
06-11-2004, 10:53 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks BP.

I didn't use that version because someone said about the two different output settings (save as 1.74 format, and save as normal (1.76). I didn't see how to select that on the command line.


Sorry, BP, I forgot about dvd2avi and it's auto-add vob files - of course it's adding them all and outputting a big final file. and your using the "for" as a hacky way of not having to name the ac3 file, neat!
Sorry mate, stupid question.

<edited out a possible answer to your "for" loop problem - I realized it wasn't an answer at all>

Just noticed your config file line

noise=3th,unsharp=l3x3:0.6,hqdn3d,sab=0.5:0.5:1,un sharp=l3x3:-0.7:c3x3:-1.5,

Having noise there would have it wiped out by the hqdn3d filter. You'd need to have

unsharp=l3x3:0.6,hqdn3d,sab=0.5:0.5:1,unsharp=l3x3 :-0.7:c3x3:-1.5,noise=3th

Although I don't understand why you use two unsharp's like that - your original was add noise - sharpen lum tiny - denoise - blur lum tiny, blur chrom lots. That seems a strange sequence to me. (forgotten for now what sab does, lol)

I'd suggest

hqdn3d,sab=0.5:0.5:1,unsharp=l3x3:-0.7:c3x3:-1.5,noise=3th, without the initial unsharp.
__________________
|
Meeow!
Reply With Quote
  #8  
06-11-2004, 10:58 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 ,
What would that be?
Two commands, one after the other in the same command line?
Try dir&cls.
Works for me.
Cheers
__________________
Rui
Reply With Quote
  #9  
06-11-2004, 11:05 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
Hya ,
What would that be?
Two commands, one after the other in the same command line?
Try dir&cls.
Works for me.
Cheers
Yeah!! The & !! Damn I'd forgotten that, been so long since I've done dos work.
(was pretty good at it too. My dos mem free was 638, with cd dev driver, and a mouse loaded )

Thanks lots, mate!

Another thing I forgot to say - I've tested the various unsharp +/- levels, and it has strong effects on perceived movie brightness.

unsharp at -1.5 in lum gives a very muddy image, unsharp =1.5 lum gives a bright sparky image (too sharp tho, blocks everywhere).
I think you need to keep to small amounts to just shapen/blur enough without altering the image density.
Unsharp -1.5 is like gamma .6, unsharp +1.5 is like gamma 2.4 (in photoshop, I tested it out there).
__________________
|
Meeow!
Reply With Quote
  #10  
06-11-2004, 11:37 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
I'm having a problem with:
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv

It's picks of each .vob, but overwrites the previous .mpv. Got to work on
-BP
There is no reason for overwrite previous.mpv if your vobs are corectly identified.
As your vobs names are "VTS_01_1.VOB" and so on, script tell us that mpv will named "VTS_01_1.VOB.mpv" an so on. Only I see one thing in your script, you are wrote:
Quote:
-o "%%V.mpv
and maybe would be:
Quote:
-o "%%V.mpv
"

--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #11  
06-11-2004, 11:39 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
@Fluffbutt

I'm having a problem with:
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
For %%V IN (F:\Temp\*.vob) DO Mencoder.exe -include Kwag.conf -passlogfile %%V.log -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv

It's picks of each .vob, but overwrites the previous .mpv. Got to work on
this some more

-BP
Mmm try adding a ()


For %%V IN (F:\Temp\*.vob) DO (Mencoder.exe -include Kwag.conf -passlogfile "%%V.log" -lavcopts vbitrate=842:vpass=1 "%%V" -o /dev/null
Mencoder.exe -include Kwag.conf -passlogfile "%%V.log" -lavcopts vbitrate=842:vpass=2 "%%V" -o "%%V.mpv")

This should do pass1 then pass2 of the same xx.vob file, then move onto the next, and so on. the () makes dos treat all commands inside as parsed from the one "for" loop.
__________________
|
Meeow!
Reply With Quote
  #12  
06-11-2004, 10:19 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Prod,

Quote:
Quote:
-o "%%V.mpv
Your right and thanks Should be -o "%%V.mpv"

The whole process is semi-automated I have to use CalcMatic to
get bitrate and depending on the movie, change the resolution in
Kwag.conf.

@Kwag,
I tried using avisynth script with MA in place of MEncoder's internal
filters and the fps were even worse. I'm ok with DVD Decrypter/
DVD2AVI/ avisynth script with MA/ Tmpgenc/ CQTester/...etc.
It's encodes in reasonable time (6 to 8 hours) from beginning to
burn and the quality is good.

-BP
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mainconcept Encoder (MEncoder) y Mencoder que parecidos! Prodater64 Convertir y Codificar Video (Español) 12 06-13-2004 08:49 AM
Mencoder: Making a vcd with mencoder on the command line? sk545 Video Encoding and Conversion 17 06-11-2004 12:36 PM
Mencoder: Changing/Setting field order in mencoder tuco1979 Video Encoding and Conversion 1 04-17-2004 09:06 AM
Mencoder: Problems compiling Mplayer/Mencoder rds_correia Video Encoding and Conversion 6 03-18-2004 09:11 AM
Automating KVCD encoding? black prince Video Encoding and Conversion 7 10-21-2002 10:18 AM




 
All times are GMT -5. The time now is 03:46 PM  —  vBulletin © Jelsoft Enterprises Ltd