HI,

        Sorry for the confused options. Its the effect of a weekend tweeking. I 
switched to the options I use for encoding my video camera to DVD.

mplayer -vo yuv4mpeg -ao pcm long.mpg
cat audiodump.wav | mp2enc -r 48000 -o mpegsoundfile
cat stream.yuv | yuvdenoise -F -f | yuvfps -r 30:1 | mpeg2enc -f 8 -q 7 -4 1 
-2 1 -P -I 0 -N -o svcd_stream.m2v
mplex -f 8 mpegsoundfile svcd_stream.m2v -o long.conv.mpg

        The audio sync problem is still there, although less pronounced. Its fine up 
to this point and then over about 30 seconds it drifts.

        It all plays fine on mplayer from the original captured using GATOS.

        Its not just this file its anything I capture. The only thing I can think of 
doing is use the -ss and -frames options to chunk the original mpg up and 
convert it in 10 or 1 minute chunks. So that if there is any drift its 
quickly corrected before it becomes noticeable. My only problem with this is 
the -ss option to mplayer:

       -ss <time> (see -sb option too)
              Seek to given time position.

              EXAMPLE:
                 -ss 56              seeks to 56 seconds
                 -ss 01:10:00        seeks to 1 hour 10 min

        Does not seem to quite operate as advertised, the examples above both put me 
a few seconds into the video stream (its about 2 hours), but I have made it 
go further by specifying a number of seconds.

        Any other ideas ?

        Thanks,

                Stuart

On Tuesday 27 May 2003 15:03, Selva Nair wrote:
> > >         I'm trying to convert a mpg file, from GATOS, its mpeg1 video,
> > > mp2 audio in an mpg file.
> > >
> > > I extracted the tracks and reencoded like this:
> > >
> > > mplayer -vo yuv4mpeg -ao pcm long.mpg
> > > cat stream.yuv | mpeg2enc -I 1 -f 1 -q 9  -V 230 -P -F 7 -a 1 -o
> > > svcd_stream.m2v
>
> Unusual options: -f 1 means you are encoding as a vcd. In that case the
> input should be progressive and -I 1 makes no sense. -F 7 means
> 60000.0/1001.0 (ntsc field rate), which, I guess, is not consistent with
> -f 1. -a 1 means square pixels: make sure that your source has square
> pixels and that the you are encoding for computer playback only. Also -V
> 230 will be overridden by the default (46). If you want to tune these
> parameters you will need to use -f 2. Please take a look at the
> mjpeg-tools for recommended settings for vcd and dvd encodings.
>
> > > cat audiodump.wav | mp2enc -r 48000 -o mpegsoundfile
> > > mplex -f 8 mpegsoundfile svcd_stream.m2v -o long.conv.mpg
>
> Guess you are trying to make a dvd compliant mpeg1. Never tried that
> myself... I think you will need to use a frame rate that is valid
> for dvd (-F 3 for PAL, -F 4 for NTSC).
>
> > > Everything is fine for about 10 minutes then the audio starts to drift.
> > >
> > > Is there anything I can do about this ?
>
> What playback software/hardware do you use?
>
> As Bernhard wrote:
> > Is it till that time perfect in sync and starts than to drift ?
> >
> > If you have NTSC it could be that the framerate changes between about
> > 29,97FPS and about 23,97FPS.
>
> That is a possibility. Please try again with a more standard frame rate
> and provide more info on your input stream if you still get A/V sync
> problems.
>
> Selva
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Mjpeg-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/mjpeg-users



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to