On Sun, 24 Apr 2005, Jean Carlos wrote:

> clients request to translate an a avi file to dvd) so i tried to make a
> dvd format compilant but the audio is not synced, and i dont know what
> im doing wrong, here is the method im using

        I do have an idea what the problem _may_ be but I think we need a 
        little more information in addition to the proceedure you are using.   

        What type of avi file is it?  By that I mean is it anime, a DVD
        rip that someone made (and if so how did they make it - did they 
        do a 3;2 pulldown, etc).

> -----------------------------------------------------------------------
> for video:
> mkfifo stream.yuv
> 
> cat stream.yuv | yuvdenoise | yuvscaler -M WIDE2STD -O DVD -n n |
> mpeg2enc -a 2 -n n -F 4 -s -f 8 -o video.m1v&

        I see you are _forcing_ the output frame rate to 30000/1001 (NTSC VIDEO)
        with "-F 4".  Is the input movie REALLY at that rate?  IF the input
        video is already ~29.97... then you do not need -F 4.  If HOWEVER
        the input is really at ~23.976 ("-F 1" or "converted film") then
        "-F 4" is the WRONG thing to do and that is why your video is playing
        too quickly!

        From the looks of it the source video is 16:9 (widescreen) - is there
        a reason you're converting 'wide to standard' with 'WIDE2STD' rather
        than creating a 16:9 DVD flle?

> mixing both:
> mplex -o dvd.mpg sound.mp2 video.m1v
> -----------------------------------------------------------------------
> 
> it seems that somewhere its frame dropping cuz the video goes faster
> than the audio track

        Actually I think the video is going faster because the input was
        at "converted film" speed (24000/1001) frames/sec but you told
        the encoder to set "NTSC VIDEO" (30000/1001).

        What does MPlayer say about the file when you play it?  There will
        be a line something like this when MPlayer first starts playing:

VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  7500.0 kbps (937.5 kbyte/s)

        If you see something like 23.97... then you shouldn't use "-F 4"
        when encoding.  You should replace send to mpeg2enc the 24000/1001
        stream and then use  "-p" to tell mpeg2enc to do a 2:3 pulldown.

        The other item of interest would be the output of this command:

cat stream.yuv | head -n 1

        Basically temporarily replace the denoising, scaling and encoding
        with "head -n 1" so we can see what the YUV4MPEG2 header produced by
        MPlayer looks like.

        Cheers,
        Steven Schultz



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to