On Mon, 13 Sep 2004, Norayr Chilingaryan wrote:

> I am using Miro DC10plus so I capturing video with 768x576, PAL, 25 fps.
> Excuse me, I wrote all data about my sorce in the first post.
> 
        It was unclear if you were making a VCD or a DVD (or both) and was 
        the DC10+ being told to capture at a reduced resolution (the DC10+
        can do 384x288 captures - it just drops one of the fields I believe).
 
> For example, when I create vcd, a make:
> lav2yuv lalala.avi | yuvscaler -o VCD | mpeg2enc -s -r 16 -o video.mpg

        Not quite correct.  For VCD you need to specify "-f 1" to mpeg2enc.
        The default is "-f 0" and that is not exactly VCD compliant.

> So, when I am making high resolution mpegs, I do:
> lav2yuv lalala.avi | yuvdenoise -F | mpeg2enc --no-constraints -f 3 -q 2
> -b 5000 -o video.mpg

        Couple things to point out.  -q 2 or -q 3 are NOT recommended 
        (especially at a low bitrate such as -b 5000).  Artifacting has been
        reported on IA32 (P4/Athlon/...) systems due to arithmetic overflows
        in the DCT/iDCT routines (but I use -q3 with success on a G5/PPC
        system so apparently the Altivec routines do not exhibit the problem
        that the MMX routines do).   -q 4 is the usual high quality setting.

        And as I mentioned earlier if you need to use "--no-constraints" then
        something is wrong with the input stream!  That problem needs to be
        fixed and not worked around.  The only time I've used (and fixed a
        bug or two ;)) --no-constraints was when trying to force mpeg2enc
        to be a [EMAIL PROTECTED] encoder instead of a [EMAIL PROTECTED] encoder.

        It's also recommended that the extension ".m2v" be used instead of
        ".mpg" for MPEG-2 output (and .m1v for MPEG-1).  It is only a 
        convention of course, but eventually you will want to run 'mplex' to 
        multiplex the elementary streams (.mp2 for audio and .m2v/.m1v for 
        the video) and the output of mplex will be a .mpg

        If the plan is to create a DVD then you need to use "-f 8" instead
        of "-f 3".

        Instead of "yuvdenoise -F" you should be able to use y4mscaler thus:

lav2yuv lalala.avi | \
  y4mscaler -I sar=1:1 -O sar=PAL -O size=704x576  -S option=sinc:4  |  \
  mpeg2enc  -f 8 -q 4 -o video.m2v

        OR

lav2yuv lalala.avi | \
  y4mscaler -I sar=1:1 -O sar=PAL -O preset=DVD  -S option=sinc:4  |  \
  mpeg2enc  -f 8 -q 4 -o video.m2v

> But what if I want to write DVD some day?

        Use "-f 8" instead of "-f 3".  Using "-f 8" sets a default bitrate
        of 7500 as well as a couple other parameters needed for DVD video.

> You told me I don't need black strips - that's cool!

        That is true.  Since you have a full frame (768x576) all that is
        needed is a resampling to 704x576 (59:54) pixels.  

        NOTE: 704x576 IS valid for use with DVDs.

> > >  example, try "y4mscaler -O preset=vcd" and follow the suggestions.)
> 
> yes, I have tried y4mscaler -O preset=dvd but then mpeg2enc tells that
> can't handle interlaced video...

        More information is needed.  What would be helpful is the EXACT
        command line used AND the complete output of the commands ('script'
        is a good way to get this information).

        I suspect that the mpeg2enc options were not quite correct

> >     hint:  try adding "-i ilace=TOP_ONLY" to y4mscaler's options.
> 
> I did it... but unsuccessfully...

        Well, there was a small typo in the suggested option.  That should
        have been an uppercase 'i'.  That should have been "-I ilace=TOP_ONLY"

        The complete output of the attempt would make it easier to figure
        out what did not work.

> Because of that I making now:
> lav2yuv lalala.avi | yuvdenoise - F | y4mscaler -I sar=1:1 -O sar=PAL -O
> size=352x288 -S option=sinc:4 | mpeg2enc -s -r 16 -o video.mpg

        You need to have "mpeg2enc -f 1" when creating VCDs.  And "-r 16" is
        the default so no need to specify that.   If you use "-f 1" then 
        you do not need to use "-s" because the VCD format ("-f 1") sets
        that for you.

        IF this:

lav2yuv lalala.avi | \
   y4mscaler -I sar=1:1 -I ilace=TOP_ONLY -O sar=PAL -O size=352x288 -S option=sinc:4 
| \
   mpeg2enc -f 1 -o video.m1v

        (Note the use of "-I ilace=TOP_ONLY" instead of "-i ilace=TOP_ONLY" :))

   does not work then use 'script' to capture the complet session and post
   that to the mailing list so we can see what is not working.

> or
> lav2yuv lalala.avi | yuvdenoise -F | y4mscaler -I sar=1:1 -O size=720x576
> -S option=sinc:4 | mpeg2enc -f 3 -q 2 -b 9000 -o video.mpg


        You forgot to include the "-O sar=PAL" to y4mscaler...

        For DVDs use "-f 8" and "-q 4".  If you are going to produce DVD
        discs that must play in a hardware/standalong DVD player then limit 
        "-b" to 8400 or less - because otherwise the bitrate peaks will be
        higher than the max allowed for DVDs and some players will not be
        able to play the disc.

        Again, if this:

lav2yuv lalala.avi |  \
  y4mscaler -I sar=1:1 -O sar=PAL -O size=704x576 -S option=sinc:4 | \
  mpeg2enc -f 8 -q 4 -o video.m2v

        does not work then capture the output of the session so that we
        can see the commands used and the complete output.

> And this is awfully slow way.
> That's a reason I asked you how deinterlace video with y4mscaler

        You don't want to deinterlace!  And y4mscaler is not a de-interlacing
        program.  What y4mscaler will do is resample/scale the data so that
        the framesize is correct for the selected format (VCD or DVD).  

        If you're creating a VCD which is a MPEG-1 progressive format
        then y4mscaler will drop one field (the "-I ilace=TOP_ONLY") says to
        ignore/drop the bottom field).  For MPEG-2 you WANT interlaced
        data - deinterlacing is a lossy process.

> Or please, write me, how can I convert 768x576 pal video to dvd compliant
> mpeg2 stream without picture deformatons and (if possible pixels loss) the
> same for vcd.

        The commands above, if used _exactly_ should work fine.  If they
        do not then we need more information to find out why things are
        not working as expected.

        Cheers,
        Steven Schultz



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to