digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder: Making a vcd with mencoder on the command line? (http://www.digitalfaq.com/archives/encode/10123-mencoder-making-vcd.html)

sk545 06-06-2004 01:52 PM

Making a vcd with mencoder on the command line?
 
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.

Dialhot 06-06-2004 02:07 PM

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 :-)

Encoder Master 06-06-2004 02:22 PM

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!!!

sk545 06-06-2004 02:34 PM

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?

Peder 06-10-2004 07:21 AM

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.

incredible 06-10-2004 10:29 AM

Quote:

Originally Posted by Peder

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

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

8O
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.

:)

Fluffbutt 06-10-2004 10:57 AM

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.

Peder 06-10-2004 11:12 AM

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


Prodater64 06-10-2004 01:32 PM

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.
--------------------------

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

Dialhot 06-10-2004 03:06 PM

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 !

Peder 06-11-2004 01:28 AM

@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.

Peder 06-11-2004 01:37 AM

@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.

rds_correia 06-11-2004 02:40 AM

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

Dialhot 06-11-2004 04:00 AM

[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 ?

Peder 06-11-2004 09:41 AM

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)

Fluffbutt 06-11-2004 10:43 AM

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 :lol: )

Koekies 06-11-2004 11:20 AM

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?

Fluffbutt 06-11-2004 12:36 PM

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!!!)


All times are GMT -5. The time now is 01:26 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.