SCO vs. IBM					 Tech Insider's Review

From art at infinitybox.net  Mon Jun 23 10:49:14 2003
From: art at infinitybox.net (Arthur Moore)
Date: Mon Jun 23 10:03:56 2003
Subject: [uug] mplayer encoding mpeg4 to avi(divx)
Message-ID: <3EF7217A.3000204@infinitybox.net>

I have this mcbride interview that I'm try to get ready for the web.I've 
been able to dump it to my computer using kino, then imported those DV 
files into cinelerra. I've then exported that to a MPEG4 format, and now 
I'm trying to encode it to a divx format with mencoder. The problem I'm 
getting is that the audio and video aren't syncing up. this is the 
command i'm using.

mencoder mcbrideinterview001.mpeg -ovc lavc -lavcopts vcodec=mpeg4 -vop 
scale=320:240 -oac copy -o output.avi

any ideas on how to get the audio and video to sync up better?

Art

From mhalcrow at cs.byu.edu  Mon Jun 23 13:45:52 2003
From: mhalcrow at cs.byu.edu (Michael Halcrow)
Date: Mon Jun 23 12:03:24 2003
Subject: [uug] mplayer encoding mpeg4 to avi(divx)
In-Reply-To: <3EF7217A.3000204@infinitybox.net>
References: <3EF7217A.3000204@infinitybox.net>
Message-ID: <20030623194552.GA24825@cs.byu.edu>

On Mon, Jun 23, 2003 at 09:49:14AM -0600, Arthur Moore wrote:
> I have this mcbride interview that I'm try to get ready for the web.I've 
> been able to dump it to my computer using kino, then imported those DV 
> files into cinelerra. I've then exported that to a MPEG4 format, and now 
> I'm trying to encode it to a divx format with mencoder. The problem I'm 
> getting is that the audio and video aren't syncing up. this is the 
> command i'm using.
> 
> mencoder mcbrideinterview001.mpeg -ovc lavc -lavcopts vcodec=mpeg4 -vop 
> scale=320:240 -oac copy -o output.avi
> 
> any ideas on how to get the audio and video to sync up better?

Uh.... MPEG4 is (kind of) the same thing as DivX.... are you sure you
didn't export to MPEG2?

A/V sync is fun!  Is the audio off from the video for a fixed amount
the entire time?  Then you must tell mencoder to do a fixed offset for
the audio.  Is the audio drifting?  Then you have to pay attention to
your framerate.  -srate changes the video speed to keep A/V sync
(i.e., w/ 44.1 and 48kHz signals).  Do you need to apply a 3:2
telecine process to the video?  Then that can mess with your sync too.
There are lots of options here, depending on the exact nature of the
A/V sync problem.

Mike

-- 
------------------------------------------- | ---------------------
Michael Halcrow                             | mhalcrow@cs.byu.edu 
Developer, IBM Linux Technology Center      |                      
                                            |
"Free markets select for winning            |
solutions."                                 |
  - Eric S. Raymond                         |
------------------------------------------- | ---------------------
GnuPG Keyprint:  05B5 08A8 713A 64C1 D35D  2371 2D3C FDDA 3EB6 601D

From art at infinitybox.net  Mon Jun 23 16:15:11 2003
From: art at infinitybox.net (Arthur Moore)
Date: Mon Jun 23 15:34:36 2003
Subject: [uug] mplayer encoding mpeg4 to avi(divx)
In-Reply-To: <20030623194552.GA24825@cs.byu.edu>
References: <3EF7217A.3000204@infinitybox.net>
	<20030623194552.GA24825@cs.byu.edu>
Message-ID: <3EF77BEF.3030802@infinitybox.net>

>
>
>Uh.... MPEG4 is (kind of) the same thing as DivX.... are you sure you
>didn't export to MPEG2?
>
>A/V sync is fun!  Is the audio off from the video for a fixed amount
>the entire time?  Then you must tell mencoder to do a fixed offset for
>the audio.  Is the audio drifting?  Then you have to pay attention to
>your framerate.  -srate changes the video speed to keep A/V sync
>(i.e., w/ 44.1 and 48kHz signals).  Do you need to apply a 3:2
>telecine process to the video?  Then that can mess with your sync too.
>There are lots of options here, depending on the exact nature of the
>A/V sync problem.
>
>  
>
ok well maybe it's MPEG4/divx I'm not sure, I'm having a hard time with 
all of this stuff. Is there a site that describes all of this stuff. I 
get confused real fast. Anyway, the audio is drifting, it's pretty good 
for the first few seconds, and then it gets off. There's a few minutes 
of video left, where the audio is long finished.

I've tried the srate thing. I've done srate=44100, and srate=48000, and 
then even srate=256000, which is what it was set to in cinelerra. I'm 
still having a hard time getting it to sync right.

Art

From mhalcrow at cs.byu.edu  Mon Jun 23 17:35:10 2003
From: mhalcrow at cs.byu.edu (Michael Halcrow)
Date: Mon Jun 23 15:52:31 2003
Subject: [uug] mplayer encoding mpeg4 to avi(divx)
In-Reply-To: <3EF77BEF.3030802@infinitybox.net>
References: <3EF7217A.3000204@infinitybox.net>
	<20030623194552.GA24825@cs.byu.edu>
	<3EF77BEF.3030802@infinitybox.net>
Message-ID: <20030623233510.GA28777@cs.byu.edu>

On Mon, Jun 23, 2003 at 03:15:11PM -0700, Arthur Moore wrote:
> ok well maybe it's MPEG4/divx I'm not sure, I'm having a hard time with 
> all of this stuff. Is there a site that describes all of this stuff. I 
> get confused real fast. Anyway, the audio is drifting, it's pretty good 
> for the first few seconds, and then it gets off. There's a few minutes 
> of video left, where the audio is long finished.
> 
> I've tried the srate thing. I've done srate=44100, and srate=48000, and 
> then even srate=256000, which is what it was set to in cinelerra. I'm 
> still having a hard time getting it to sync right.

256kHz??  Do you actually have an audio card capable of playing this?
44.1kHz is fine for what you're doing.  First, make sure your audio is
at a sane frequency.

Try forcing the frames per second with -ofps=29.97.  Or try creating
an OGM file instead (my personal recommendation).  You can encode the
video in MPlayer into an AVI file (just use -oac copy), encode the
audio with oggenc, and then use ogmmerge to create an OGM file from
the .avi and the .ogg files.  As long as the lengths of both the audio
and the video tracks are the same, the audio packets should be
interleaved just fine with the video frames.  OGM has double overhead
(headers for the OGM packets and headers for the OGG frames), but it
doesn't have the braindead index-at-the-end-of-the-file problem that
AVI suffers from, and you win back that overhead with the space
savings of the Vorbis codec.

Oh, and consider using XviD instead of DivX.  That way you can truly
be free.  :-)

Mike

-- 
------------------------------------------- | ---------------------
Michael Halcrow                             | mhalcrow@cs.byu.edu 
Developer, IBM Linux Technology Center      |                      
                                            |
"Free markets select for winning            |
solutions."                                 |
  - Eric S. Raymond                         |
------------------------------------------- | ---------------------
GnuPG Keyprint:  05B5 08A8 713A 64C1 D35D  2371 2D3C FDDA 3EB6 601D

The materials and information included in this review are not to be used 
for any other purpose other than private study, research or criticism.
											

Electronic mail:			       WorldWideWeb:
   tech-insider@outlook.com			  http://sco-vs-ibm.org/