I've created an all around good/tightly synced mpg file of a favorite foreign (non English) flick. I've found and downloaded a subtitle srt file for my movie. I'm using AutoGordianKnot to create an Xvid avi file. Once created, the avi file shows perfect sync between the audio and the sub-titles (throughout from beginning to end with no apparent drift!), but the video action is ahead. As the time progresses, the difference grows larger. I suspect an issue with proper FPS conversions... I'm in the US with NTSC (29.97fps)... the original "film" version was certainly 24fps... (is there another prospective issue with PAL's 25fps?)...
I'm confused (but impressed) with the off-the-shelf (no customizations here) tight sync between the downloaded srt sub file and my mpg's audio track... but the video drift needs to be worked on, of course.
Is anyone familiar with this issue using AGK, or it's sub-programs? I don't see any options within the various AGK menu's to compensate for this drift. (Also... I'm not conscious of the video image being "sped up" at all... it looks normal, but the drift does grow larger)...
Any help or insights are appreciated!
(Note: my resultant avi had both the original on/off accessible subtitle track, and the always on (burnt in) subtitle track. Both of these subtitle tracks are perfectly aligned to each other and to the audio, but not to the drifting video.)
+ Reply to Thread
Results 1 to 6 of 6
-
-
You're creating an AVI from an MPG you already made? Why not go back to the source DVD or whatever it was? What's the framerate of the MPG? You made this MPG by reencoding, or perhaps by using VOB2MPEG, or somesuch?
Do you have the log that AutoGK created? This is a peculiar issue that was probably caused by you making the intermediate MPG rather than using the true source.
the original "film" version was certainly 24fps
is there another prospective issue with PAL's 25fps?)...
If the synch goes about 7 seconds off at the end of a 2 hour movie, it's a 30fps .vs 29.97fps issue. If the synch is off by roughly 5 minutes for a 2 hour movie, it's a PAL .vs NTSC issue (but I doubt it's that in this case). How long is the video and how much is the synch off by the end? -
Hi manono: Thanks for your attention here...
I created an mpg from a DVD via using the conversion utility available in the VLC media player (choosing the mpeg-2 video codec, 6000kb/s bitrate, MP3 audio codec, 128 kb/s bitrate, MPEG-PS encapsulation) . The resulting movie.mpg plays back fine in VLC (naturally?)... Video, sound, sub-titles are all tightly synced throughout from beginning to end...
I used this as my source file for AutoGordianKnot... As I explained earlier, the video image in this resulting avi file is considerably non-synced with the sound & sub-title tracks (that are tightly synced to each other throughout).
After continuing to play with this issue for a few more hours, I've noticed two significant points:
1.) When VLC starts to play each file, in the lower right hand corner, it displays the movie's total play time, and the (changing) presently elapsed time. When I play the (good) movie.mpg version, VLC informs me that the total play time will be 1:37:45. However, when I play the movie.avi version, VLC informs me that the total play time will instead be 1:18:14;
2.) The audio and subtitle tracks in the movie.avi version are playing back at the identical speed of the audio & subtitles tracks in the movie.mpg version, but the video image in movie.avi is playing back appreciably faster.
Normalizing the two different play times into a common seconds count, movie.mpg is 5865 seconds, and movie.avi is 4694 seconds. 5865 to 4694 down is approximately 20% down. 4694 to 5865 is approximately 25% up.
I appear to be having an issue here with ~30fps & ~24fps.
Here's the AGK log file for this conversion (I've added in the line numbers):
Code:001 [7/11/2009 8:29:52 AM] AutoGK 2.55 002 [7/11/2009 8:29:52 AM] OS: Windows Vista (6.0.6002).2 003 [7/11/2009 8:29:52 AM] Job started. 004 [7/11/2009 8:29:52 AM] Input file: C:\Creations\Creations2009-07\Movie\Movie.mpg 005 [7/11/2009 8:29:52 AM] Output file: C:\Creations\Creations2009-07\Movie\Movie.avi 006 [7/11/2009 8:29:52 AM] Output codec: XviD 007 [7/11/2009 8:29:52 AM] Audio 1: Audio Stream 0 MPEG 008 [7/11/2009 8:29:52 AM] Subtitles: from external file: C:\Creations\Creations2009-07\Movie\Movie.srt 009 [7/11/2009 8:29:52 AM] Format: AVI 010 [7/11/2009 8:29:52 AM] Target size: 700Mb 011 [7/11/2009 8:29:52 AM] Audio 1 settings: CBR MP3 with bitrate: 96Kbps 012 [7/11/2009 8:29:52 AM] Started encoding. 013 [7/11/2009 8:29:52 AM] Demuxing and indexing. 014 [7/11/2009 8:31:05 AM] Processing file: C:\Creations\Creations2009-07\Movie\Movie.mpg 015 [7/11/2009 8:31:05 AM] Source resolution: 720x480 016 [7/11/2009 8:31:05 AM] Found NTSC source. 017 [7/11/2009 8:31:05 AM] Source aspect ratio: 4:3 018 [7/11/2009 8:31:05 AM] Analyzing source. 019 [7/11/2009 8:33:27 AM] Source has percentage of interlacing in motion areas: 0.18 020 [7/11/2009 8:33:27 AM] Source has percentage of telecined patterns: 0.36 021 [7/11/2009 8:33:27 AM] Source has percentage of progressive patterns: 99.64 022 [7/11/2009 8:33:27 AM] Source has percentage of interlaced patterns: 0.00 023 [7/11/2009 8:33:27 AM] Source is considered to be progressive. 024 [7/11/2009 8:33:27 AM] Output will contain 140698 frames 025 [7/11/2009 8:33:27 AM] Preparing subtitles. 026 [7/11/2009 8:33:27 AM] Using VAQ in XviD 027 [7/11/2009 8:33:27 AM] Audio1 size: 93,844,224 bytes (89.50 Mb) 028 [7/11/2009 8:33:28 AM] Overhead: 1,670,784 bytes (1.59 Mb) 029 [7/11/2009 8:33:28 AM] Video size: 638,488,192 bytes (608.91 Mb) 030 [7/11/2009 8:33:28 AM] Running compressibility test. 031 [7/11/2009 8:33:28 AM] Writing the following script to C:\Creations\Creations2009-07\Movie\agk_tmp\Movie_comptest.avs 032 =========================================================== 033 LoadPlugin("C:\PROGRA~2\AutoGK\DGMPGDec\DGDecode.dll") 034 LoadPlugin("C:\PROGRA~2\AutoGK\filters\autocrop.dll") 035 LoadPlugin("C:\PROGRA~2\AutoGK\filters\vsfilter.dll") 036 LoadPlugin("C:\PROGRA~2\AutoGK\filters\RemoveGrainSSE3.dll") 037 038 movie = mpeg2source("C:\Creations\Creations2009-07\Movie\agk_tmp\Movie.d2v") 039 cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0) 040 fixed_aspect = 0.888888888888889 041 c_width = width(cropclip) 042 c_height = round(height(cropclip) / fixed_aspect) 043 input_par = float(c_width)/float(c_height) 044 input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0) 045 out_width = 640 046 out_height = round(float(out_width) / input_par) 047 hmod = out_height - (floor(out_height / 16 ) * 16) 048 out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod) 049 new_aspect = (float(out_width) / float(out_height)) / fixed_aspect 050 autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0) 051 LanczosResize(out_width,out_height) 052 RemoveGrain(mode=2) 053 TextSub("C:\Creations\Creations2009-07\Movie\Movie.srt") 054 SelectRangeEvery(300,15) 055 =========================================================== 056 [7/11/2009 8:36:06 AM] Duration was: 2 minutes 37 seconds 057 [7/11/2009 8:36:06 AM] Speed was: 44.70 fps. 058 [7/11/2009 8:36:06 AM] Compressibility percentage is: 59.23 059 [7/11/2009 8:36:06 AM] Chosen resolution is: 576x432 ( AR: 1.33 ) 060 [7/11/2009 8:36:06 AM] Predicted comptest value is: 73.12% 061 [7/11/2009 8:36:06 AM] Running first pass. 062 [7/11/2009 8:36:06 AM] Writing the following script to C:\Creations\Creations2009-07\Movie\agk_tmp\Movie_movie.avs 063 =========================================================== 064 LoadPlugin("C:\PROGRA~2\AutoGK\DGMPGDec\DGDecode.dll") 065 LoadPlugin("C:\PROGRA~2\AutoGK\filters\autocrop.dll") 066 LoadPlugin("C:\PROGRA~2\AutoGK\filters\vsfilter.dll") 067 LoadPlugin("C:\PROGRA~2\AutoGK\filters\RemoveGrainSSE3.dll") 068 069 movie = mpeg2source("C:\Creations\Creations2009-07\Movie\agk_tmp\Movie.d2v") 070 cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0) 071 fixed_aspect = 0.888888888888889 072 c_width = width(cropclip) 073 c_height = round(height(cropclip) / fixed_aspect) 074 input_par = float(c_width)/float(c_height) 075 input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0) 076 out_width = 576 077 out_height = round(float(out_width) / input_par) 078 hmod = out_height - (floor(out_height / 16 ) * 16) 079 out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod) 080 new_aspect = (float(out_width) / float(out_height)) / fixed_aspect 081 autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0) 082 LanczosResize(out_width,out_height) 083 RemoveGrain(mode=2) 084 TextSub("C:\Creations\Creations2009-07\Movie\Movie.srt") 085 =========================================================== 086 [7/11/2009 9:04:06 AM] Duration was: 28 minutes 0 seconds 087 [7/11/2009 9:04:06 AM] Speed was: 83.73 fps. 088 [7/11/2009 9:04:07 AM] Expected quality of first pass size: 77.38% 089 [7/11/2009 9:04:07 AM] Running second pass. 090 [7/11/2009 9:44:02 AM] Duration was: 39 minutes 53 seconds 091 [7/11/2009 9:44:02 AM] Speed was: 58.79 fps. 092 [7/11/2009 9:44:02 AM] Job finished. Total time: 1 hour, 14 minutes 10 seconds
Thanks,
goodbot. -
The obvious answer is to start with the DVD rather than some reencoded MPG you created. The resulting AVI quality will be better and you won't have synch issues.
However, unlike what I thought, it's not a 29.97fps .vs 30fps issue, but a 23.976fps .vs 29.97fps issue (as you figured out, sort of). You can also load the AVI into VDubMod, set the Video to Direct Stream Copy, go into Video->Frame Rate, and change it back to 23.976fps. Then File->Save As. That should put everything back into synch. But, since you only have 78 minutes worth of audio in the AVI, after you lengthen it, you'll be missing the audio for the final 20% of the movie. You'll also have to get the audio from the MPG and add it in (or mux in the complete and separate MP3 audio file that AutoGK created).
But that's really the wrong thing to do when the mistake was reencoding it as an MPG in the first place. Load the IFO or the VOBs from the DVD into AutoGK, and then the subs. I have no idea what possessed you to think that making that intermediate MPG first was the right thing to do. I think, though, that you uncovered a bug in AutoGK. It seems to expect MPGs to be 29.97fps, just as DVDs are. It assumed your 23.976fps MPG source was really 29.97fps which caused the final video framerate to be incorrect. -
Manono:
Your comment is right on the mark. I'm constantly growing/changing in my use of AutoGordianKnot... your assertion that I should be using AGK directly from the (cleaned up HD resident) VOBs (instead of via an interpreted single mpg file intermediary), is certainly correct/optimal, and maybe I would have been doing this if I had invested the time to RTFM, or read between the lines as necessary... but I didn't... so in my newbee naivete, I thought it essential to create a clean single file to feed AGK... for some created mpegs this works, but on many others it doesn't (hence my post here)...
Your comments further bring to light the seeming curiousity of the VLC-created file being ~24fps... when played back with VLC, everything works fine... When feeding this thru AGK such as above, it bombs... similiarly, my cheapo DVD playback unit can't handle these 24fps mpg's... Now I'm wondering if this "conversion" is actually re-creating a ~24fps movie from the NTSC ~30fps 'original' (on the DVD)? I know several film "purists" that constantly engage people in heated debates about the ultimate desirability of "true 24fps" movies (as opposed to step-up NTSC '24fps video cine' modes)... the usual film-to-NTSC pattern is something like 2-3-3-2 (2 film frames-to-2 video frames, 2 film frames-to-3 video frames, 2 film frames-to-3 video frames, 2 film frames-to-2 video frames)... If the VLC algorithm correctly syncs to this 2-3-3-2 scheme, it can then actually/really reverse engineer out of the NTSC image the original film 24fps image... To my purist 24fps cine mode friends, this might be an exciting prospect... For everyone else, it's probably not a big deal. As the VLC conversion process allows for the manual setting of the video bps, you can set this to identically match the native DVD video bps, thus minimizing (eliminating?) prospective conversion loss...
If the VLC step down to 24fps is less disciplined than rigidly undoing the same precise step-up scheme, the end result may be less enthusiastically received. When I have the time, I'll try to investigate this issue a bit further...
Thanks again for your help with my original challenge here manono... we can consider that issue RESOLVED !!
goodbot -
You're thinking too much. Feed the 29.97fps VOBs or the IFO into AutoGK. It'll analyze the source video, either IVTC it or use Force Film in DGIndex, and spit out a 23.976fps AVI when done. If it's a movie on NTSC DVD then almost certainly the 'base' framerate is 23.976fps.
All NTSC DVD players output 480i at 59.94 fields per second. If Progressive Scan is turned on and you're outputting to a progressive display (an LCD HDTV, for example), that 480i signal is 'intercepted' and converted to 480p, and then maybe upscaled to the native resolution of the display. If the movie on DVD was encoded as progressive with the appropriate pulldown flags to output interlaced 29.97fps, then it'll return to its original progressive 23.976fps and be output in a 3-2-3-2 pattern at 59.94 frames per second. More modern TV sets can convert to 72 or 120 or 240 HZ, with a different output pattern (3-3-3, 5-5-5, or 10-10-10), effectively doing away with the 3-2-3-2 judder. They can also create new frames (with varying effectiveness) to make the output play even more smoothly. This, I'm sure, makes your film "purists" friends very happy.
Similar Threads
-
HD PVR - Audio not synced with video
By lacywest in forum Video ConversionReplies: 5Last Post: 29th May 2010, 09:20 -
Video/audio not synced problem. (Avisynth)
By michcio in forum AudioReplies: 0Last Post: 18th Jan 2010, 12:43 -
weird audio/video wrong-synced problem
By michcio in forum Authoring (DVD)Replies: 9Last Post: 11th May 2009, 13:23 -
video and audio are not synced up
By maniac in forum ffmpegX general discussionReplies: 2Last Post: 27th Apr 2009, 21:53 -
audio and video wrong synced.
By michcio in forum Authoring (DVD)Replies: 0Last Post: 18th Feb 2009, 18:08