View Full Version : Audio/Video out of sync
CheloXL
23rd December 2005, 21:16
Hi!,
I have two nice streams, one for audio and another for video. The audio stream was converted to AAC using beSweet, and the video was created with vdub/xvid. So far, so good.
Now i want to create an mp4 file with the audio and the video, using mp4box. All work without errors, but the video is out of sync. I of course adjusted the frame rate using the fps command, but it seems that mp4box is not taking that into account. The video seems to play faster.
Playing the file in MPC and taking a look at the statistics window i see that the frame rate is, indeed, 23.9x (should be 23.976). But again, the video seems to play faster than the audio...
Ideas?
Thanks in advance!,
bond
24th December 2005, 01:20
-fps is only taken into account when muxing from raw streams...
DigitalDeviant
24th December 2005, 02:04
Is the audio evenly out of synch through the whole video? If so you may need to add a negative delay to the audio stream, though I'm not sure how to do that in mp4box.
CheloXL
25th December 2005, 01:47
For raw streams i understand: Video demuxed from an AVI container (done with YAMP) and audio in AAC (ISO 13818-7) format (not into an mp4 container). Am i right?
And no, the delay gets worse at the end (thatīs why i think is a FPS problem)
bond
25th December 2005, 10:39
For raw streams i understand: Video demuxed from an AVI container (done with YAMP)yep
but if the video in avi already has the correct framerate you dont need to demux to raw, but simply remux from avi to mp4 with yamb (only possible if the video is mpeg-4 asp (divx, xvid...)) and the same framerate as in the avi will be used in the mp4 too
and audio in AAC (ISO 13818-7) format (not into an mp4 container). Am i right?no, audio doesnt have a framerate
And no, the delay gets worse at the end (thatīs why i think is a FPS problem) thats indeed a fps problem
CheloXL
25th December 2005, 16:00
The video was compressed with xvid. I didnīt know that you can mux directly from the avi container. Nice to know!... now the problem is... i deleted the avi files and have only the raw ones! :(
I know that audio doesnīt have framerate, but i did that to make sure that mp4box doesnīt take the framerate from the (audio) mp4 file (i thought that the fps problem could be a bug in mp4box).
This is the command line iīm using:
MP4Box.exe -add "VTS_03_12_video.cmp" -fps 23.976 -add "VTS_03_1 T01 2_0ch 192Kbps DELAY 0ms_track1.aac"
If i try to open the file with osmo, it throws an error (Stream setup failure) and in the object description, the video is correctly identified, but the audio no (Object Descriptor ID 10
- Unknown duration) (in the "general" tab).
On the streams tab, the audio is recognized
(** Stream ID 101 - Clock ID 1 **
Audio Stream - media type: MPEG-4
Buffer Size 935
Average Bitrate 107480 bps
Maximum Bitrate 134600 bps
Stream Clock Resolution 48000
Stream Language: spa)
I already tried all what i could think should change that, without success...
bond
25th December 2005, 17:09
how did you extract the video stream out of the .avi?
did you use packed bitstream?
CheloXL
25th December 2005, 17:29
Using yamb, and yes, i used packed bitstream.
bond
25th December 2005, 17:36
Using yamb, and yes, i used packed bitstream.packed bitstream is evil, you still have the dummy n-vops in your stream
try adding -packed to the cmdl in mp4box
CheloXL
25th December 2005, 18:26
Same result :(
bond
25th December 2005, 18:57
does the file play in other players, like mplayer, videolan or directshow-based solutions (haali, mpc, 3ivx)?
foxyshadis
25th December 2005, 20:55
Try using mkvmerge/mmg with --engage native_mpeg4, which will undo any avi hacks, then use yamb to convert it to mp4. Hopefully it'll load the raw stream.
bond
25th December 2005, 21:19
Try using mkvmerge/mmg with --engage native_mpeg4, which will undo any avi hackshe doesnt have avi files anymore, only raw streams
then use yamb to convert it to mp4yamb doesnt support mkv input
CheloXL
26th December 2005, 01:23
The file plays in MPC (audio/video sync problem) and in Osmo (without audio as noted above).
If anyone want, i can put the files on an FTP (25mb video, 2mb audio)....
bond
26th December 2005, 01:29
The file plays in MPC (audio/video sync problem) and in Osmo (without audio as noted above).
If anyone want, i can put the files on an FTP (25mb video, 2mb audio)....upload the raw streams plz
CheloXL
26th December 2005, 12:31
Here you have:
http://www.extremefx.com.ar/doom9/video.cmp
http://www.extremefx.com.ar/doom9/audio.aac
Hope you can find the problem!
bond
26th December 2005, 13:27
after playing around a little bit it seems the video needs a framerate around 19.2 or so
as i assume the original source didnt have this framerate i assume you did something strange when encoding the video (dropping frames), so how exactly did you encode the video? what was your .avs script? what were all your xvid settings?
CheloXL
26th December 2005, 14:56
The video was originally in 29.97 fps. I then created a d2v file (DGIndex -> Field operation: forced film)(edit: i also added the _A string to the d2v file to get the output in YUY2), created an avi with VFAPI and compressed in vdub with xvid, 2 pass (Motion search 6, VHQ 1, VHQ on bframes, Chroma motion, trellis, target br 1200)... nothing strange (the same settings i always use for avi files).
What is strange is that from that DVD i have the main movie and another short one. The movie has the same problem as the file i uploaded, but the short one works perfect, and i used the same settings for all the movies. Thatīs why i donīt understand whatīs wrong.
bond
26th December 2005, 22:34
are you sure this vfapi avi has 29.97fps? why dont you use .avs?
CheloXL
27th December 2005, 13:27
The vfapi avi was 23.976 (the original file was 29.97, but when i created the d2v file with DGIndex, it was converted to 23.976... i always do that).
I donīt use .avs because.. well.. i never used it :) Maybe itīs time to start using avisynt... (i have it installed, but never got the time to investigate it)...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.