Quantcast Mencoder: Making a VCD with Mencoder on the Command Line? - digitalFAQ.com Forums [Archives]
  #1  
06-06-2004, 01:52 PM
sk545 sk545 is offline
Free Member
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Didn't see a tuturial on this, but i want to know how one can make a vcd/svcd with mencoder on the command line? I am not familiar as to what paramaters i should pass it. I tried that gui in the sticky above 'MencodeMe', but it doesn't even load the avi file.

Here is the video that i am trying to convert to vcd standard:

Code:
$ tcprobe -i Amovie.avi

[tcprobe] RIFF data, AVI video
[avilib] V: 23.976 fps, codec=XVID, frames=118804, width=560, height=304
[avilib] A: 48000 Hz, format=0x2000, bits=0, channels=2, bitrate=192 kbps,
[avilib]    51612 chunks, 118921853 bytes, CBR
[tcprobe] summary for Amovie.avi, (*) = not default, 0 = not detected
import frame size: -g 560x304 [720x576] (*)
       frame rate: -f 23.976 [25.000] frc=1 (*)
      audio track: -a 0 [0] -e 48000,0,2 [48000,16,2] -n 0x2000 [0x2000] (*)
                   bitrate=192 kbps
           length: 118804 frames, frame_time=41 msec, duration=1:22:35.121
Oh, i am using Linux with these versions:

MPlayer 1.0pre4-3.3.3
MEncoder 1.0pre4-3.3.3

Thx, and sorry if a guide for this was posted somewhere, i didn't see it. Please give me a link to it if its available.
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-06-2004, 02:07 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
First, MPEG1 in mencoder is so bad that is not even necessary to mention it, so forgot the VCD.

Second its not realy possible to give you such lien because you will need to set the correct values for all the parameters concerning resize/crop. I suggest you to read a little the different sticky post, and more other the one dealing with resizing.

After this you will see if all that is in your area of understanding or not. Because for SVCD mencoder is a pre-alpha encoder and you are reaching there real advanded video editing
Reply With Quote
  #3  
06-06-2004, 02:22 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
If your DVD-Player supports SVCDs (Like the most new players) then you have to choose this option instead of VCD. VCD standart decribes CBR and SVCD can handle with VBR and the Quality is better and it's also a standart.

So like DialHot!!!
Reply With Quote
  #4  
06-06-2004, 02:34 PM
sk545 sk545 is offline
Free Member
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
good to know. Well, i might just ditch mencoder all together for encoding since it requires so much work. Guess its only good if you have a lengthy script.

I did try ffmpeg though to do encoding a vcd with this command:

$ ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg

The resulting vcd.mpg file works and all but it has slight lip-sync problem. Its not bad, but is noticibale. Anything i could pass to ffmpeg to fix the lip-sync issue?
Reply With Quote
  #5  
06-10-2004, 07:21 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
MPEG1 in mencoder is so bad that is not even necessary to mention it, so forget the VCD.
I've made a number of KVCD/MPEG1 CD's with mencode and I don't find it so bad.
Lots of music DVD's are 4/3 and if I try to fit them in one or two CD's using
KSVCD/MPG2 I get lots of blocks, whereas KVCD/MPG1 is fine.

And note that I have to use vcr_minrate=700 to please my DVD player.
Reply With Quote
  #6  
06-10-2004, 10:29 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
Quote:
Originally Posted by Peder

......whereas KVCD/MPG1 is fine....

.....I have to use vcr_minrate=700....

So two options:

a) you did an own great developement which lets us all stay in the corner now or ...

b) you missed that mpeg1 does come out worse compared to a "correct" encoded mpeg2 using mencoder. So maybe you did setup the mpeg2 encoding wrong?
And vrc_minrate does mess up the "whole" bitrate allocation when encoding and thats why mplayerteam will fix that in the future.

Reply With Quote
  #7  
06-10-2004, 10:57 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Inc., How do you guys get the svcd's in under 800mb (with audio)?

Whenever I've done svcd, to fit a 98 min movie onto 1 cdr takes so low a bitrate as to be blocky and rubbish.

At least with kvcd, I can set bitrate at 1000, and have max at 1850, and still get it in under 800mb.

Is it worth doing svcd at 352x288, or should I always try for svcd std (umm 480x576? I think)?

(also, I partly agree with Peder - I've used minrate too, minrate 300, rate 1000 (reduced as needed to fit on cdr) max 1850 (also reduced sometimes).

Results are very good.

I've noticed better results on black/dark scenes with Kwags mencoder motion filters, but also seen action scenes go really bad on the same filter settings.
To put it shortly, kwag's = great on darkness, so-so on action, minrate = ok on darkness, good on action.
__________________
|
Meeow!
Reply With Quote
  #8  
06-10-2004, 11:12 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
maybe you did setup the mpeg2 encoding wrong
Well, I've been using scripts and info from these forums mainly. And perhaps I haven't tried so hard with mpeg2 since I'm satisfied with mpeg1.
But shouldn't quality be (theoretically) better in mpeg1 since we're dealing with a smaller image: 352x288 vs 480x576? And encoding should be faster too.

And, yes, I know I'd be better off avoiding vcr_minrate but I have no choice.
Since we're talking so high a bitrate I can't use kwag's noise trick.

This is what I used for one 1.85:1 (IIRC) encoding with good result:
Code:
/opt/MPlayer-1.0_pre4/bin/mencoder vts_01_1.vob -sws 9 -vf yuvcsp,crop=704:432:8:75,scale=352:216,expand=352:288 -of mpeg \
-ovc lavc -oac lavc -lavcopts acodec=mp2:abitrate=224:vcodec=mpeg1video:keyint=25:mbd=2:trell:vrc_minrate=700:vrc_maxrate=2600:vrc_buf_size=376:\
aspect=4/3:vbitrate=2600:mbqmin=1:vqdiff=1:lmin=0.85:intra_matrix:yada_yada:inter_matrix:yada_yada:vstrict=-1 \
-o File.mpg
Reply With Quote
  #9  
06-10-2004, 01:32 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 Peder
-of mpeg \
acodec=mp2
Does all mencoder.exe compilations have mp2 audio codec?


--------------------------
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
  #10  
06-10-2004, 03:06 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Peder
vrc_minrate=700:vrc_maxrate=2600:vbitrate=2600
I don't want to dissapoint you but you can't do a 1CD KVCD with this line.

With a MAX set to 2600 and an AVG set to... 2600 you are encoding something that is near to a CBR=2600 video

For sure the quality can't be bad

Note: the (bad) quality of mppeg1 is not due to theory or resolution. It is due to the bad engine of the prog !
Reply With Quote
  #11  
06-11-2004, 01:28 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
@Prodater64: I think it might, though I'm not sure. I encode under linux with my self-compiled encoder.

@Dialhot: No, I know. This was a ~150min 2CD encoding, and since I have to use minrate=700 I couldn't calculate proper maxrate
so I had to do some trial-and-error to fill the CD's.

But I have done some ~90min 1CD encodings with great result, bad engine or not. I can probably dig up the command lines if anyone's interrested.
They're mostly minor variants of the one I posted, mostly avoiding mbqmin=1:vqdiff=1:lmin=0.85.
Reply With Quote
  #12  
06-11-2004, 01:37 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
@Fluffbutt: If you can, avoid minrate and use kwag's noise trick instead.
This way you can increase maxrate to 2500 and use the bitrate calculators to find out avgerage_rate to (perfectly) fit one or 2 CD's.

I'm not standalone DVD players accept 352x288 MPEG2/SVCD.
Reply With Quote
  #13  
06-11-2004, 02:40 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
Quote:
Originally Posted by Prodater64
Quote:
Originally Posted by Peder
-of mpeg acodec=mp2
Does all mencoder.exe compilations have mp2 audio codec?
I've been checking all my mencoder configure parameters and it seems that both Incs/VMesquita's/my own builds come with MP2 engine compiled.
Give it a try.
Cheers
__________________
Rui
Reply With Quote
  #14  
06-11-2004, 04:00 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
[quote="PederI can probably dig up the command lines if anyone's interrested.[quote]
CD90 mn store 900 MB that is 10% more then CD80. But nevetheless I would try to test your line. Can you post it please ?
Reply With Quote
  #15  
06-11-2004, 09:41 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
CD90 mn store 900 MB
I expressed myself a bit unclear. I'm talking about a ~90min film (and 800MB CD)
I'll see if I can find my scripts during the weekend, but as I said;
I mostly use something like
Code:
mencoder vts_01_1.vob -sws 9 -vf yuvcsp,crop=704:576:8,scale=xxx:yyy,expand=352:288 -of mpeg -ovc lavc -oac lavc -lavcopts acodec=mp2:abitrate=192:vcodec=mpeg1video:keyint=25:mbd=2:trell:vrc_minrate=700:vrc_maxrate=2600:vrc_buf_size=376:aspect=4/3:vbitrate=1200:intra_matrix:yada_yada:inter_matrix:yada_yada:vstrict=-1 -o File.mpg
This gives me about real-time encoding on my AthlonXP 1800 (in linux)
Reply With Quote
  #16  
06-11-2004, 10:43 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 Peder
@Fluffbutt: If you can, avoid minrate and use kwag's noise trick instead.
This way you can increase maxrate to 2500 and use the bitrate calculators to find out avgerage_rate to (perfectly) fit one or 2 CD's.

I'm not standalone DVD players accept 352x288 MPEG2/SVCD.
Thanks Peder, I've killed the minrate, and am using kwags noise (minus the ,sab=.5:.5:1 - it dropped frame rate from 15 to 5, and didn't seem to add anything to the final movie).

I'm still getting terrible results with svcd, even played on a standalone (visually better than pc usually). Bad blocking, quite a lot of aliasing too.

Went back to vcd, and all is beautiful, played on pc, you see minor blocking. Played on standalone it's almost like watching the dvd!! (obviously, the resolution makes it blurrier than the dvd )
__________________
|
Meeow!
Reply With Quote
  #17  
06-11-2004, 11:20 AM
Koekies Koekies is offline
Free Member
 
Join Date: May 2004
Location: Amsterdam
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
I use a higher resolution mpeg2 and calcumatic to calculate the bitrate it gives much better results than mpeg1 does.
And muxed it's exactly 800 mb.
Have you tried raising the resolution?
Reply With Quote
  #18  
06-11-2004, 12:36 PM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Koekies
I use a higher resolution mpeg2 and calcumatic to calculate the bitrate it gives much better results than mpeg1 does.
And muxed it's exactly 800 mb.
Have you tried raising the resolution?
Yah, tried raising res, but then have to drop bitrate so much it's bad quality. It's wierd - it's not hat I can't do svcd, it's just that I can't do more than about 60 mins on svcd. I can get 115 mins onto vcd, and quality is betetr then the 60 min svcd's. (Wellll, about the same. It's certainly better then 80 mins svcd!!!)
__________________
|
Meeow!
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mencoder: Current Command-line? Razorblade2000 Video Encoding and Conversion 3 06-03-2004 06:44 AM
Mencoder: Changing/Setting field order in mencoder tuco1979 Video Encoding and Conversion 1 04-17-2004 09:06 AM
Command-line DVD authoring? bilu Authoring VCD, DVD, Blu-ray 2 03-17-2004 09:38 AM
Translate ffvfw settings to mencoder command-line Razorblade2000 Video Encoding and Conversion 22 02-11-2004 08:24 PM
Using TMPGEnc from command line? girv Video Encoding and Conversion 7 07-01-2003 09:24 AM

Thread Tools



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