I've looked a lot around the internet the last few days, but because I am not really sure of the problem, I think it's making it difficult to find the solution. I hope I didn't miss something obvious, but I am new to encoding and not very experienced. So, I have a bunch of tv shows I recorded a while back (using .dvr-ms, not sure WHY), and I want them to be 700MB-1GB in size (they are currently running much larger, such as some Lost recordings at around 5 1/2 gigs). Right now I am working on one such Lost file, and want to convert it into a 1GB xvid mkv file. I'm using AutoMKV .97 beta 4. Here are some of the things I've done so far: Original File (taken from mediainfo, some specs removed for space (language etc)): Code: Duration : 57mn 56s Overall bit rate mode : Variable Overall bit rate : 13.9 Mbps Maximum Overall bit rate : 160 Mbps Video Format : MPEG Video Format version : Version 2 Format profile : Main@High Format settings, Matrix : Standard Codec ID : DVR Codec ID/Hint : ASF Duration : 1mn 22s Bit rate mode : Constant Bit rate : 13.4 Mbps Nominal bit rate : 15.0 Mbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16/9 Frame rate : 59.940 fps Colorimetry : 4:2:0 Scan type : Progressive Bits/(Pixel*Frame) : 0.242 I then used DVRMStoMPEG to make the file an mpg file. Specs seem about the same, except I don't know what video delay on the audio is. Code: Format : MPEG-PS File size : 5.65 GiB Duration : 57mn 56s Overall bit rate : 14.0 Mbps Video Format : MPEG Video Format version : Version 2 Format profile : Main@High Format settings, Matrix : Standard Duration : 57mn 56s Bit rate mode : Constant Bit rate : 12.6 Mbps Nominal bit rate : 15.0 Mbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16/9 Frame rate : 59.940 fps Colorimetry : 4:2:0 Scan type : Progressive Bits/(Pixel*Frame) : 0.272 Audio Format : AC-3 Format/Info : Audio Coding 3 Duration : 57mn 56s Bit rate mode : Constant Bit rate : 384 Kbps Channel(s) : 2 channels Channel positions : L R Sampling rate : 48.0 KHz Video delay : -134ms So then I put the file into AutoMKV, select NeroAAC with 1.0 quality, no resize, 1000 size, mkv as the container, xvid as the codec, 2_pass_balanced as the profile, RemoveGrain(mode=2)as the filter. It's all pretty much what it came loaded as, and since I'm sorta just testing, I don't really need to change much. Here's the mediainfo on the produced MKV, notice the runtimes on the video/audio: Code: Format : Matroska File size : 996 MiB Duration : 57mn 55s Overall bit rate : 2 405 Kbps Movie name : Done with AutoMKV 0.97 public beta4 [url]http://forum.doom9.org/showthread.php?t=140178[/url] Encoded date : UTC 2008-09-17 12:43:41 Writing application : mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26 Writing library : libebml v0.7.7 + libmatroska v0.8.1 Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Custom Codec ID : V_MPEG4/ISO/ASP Codec ID/Info : Advanced Simple Profile Duration : 57mn 52s Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16/9 Frame rate : 59.940 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Title : Lost_20080515_22022300 Writing library : XviD 1.2.0SMP (UTC 2006-01-08) Language : English Audio Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Format settings, SBR : No Codec ID : A_AAC Duration : 57mn 55s Channel(s) : 2 channels Channel positions : L R Sampling rate : 48.0 KHz Resolution : 16 bits The encode looks GREAT, but the audio gradually goes out of sync; at around 20 mins in, it starts to lose it. I think it has something to do with commercials, but I'm not sure. The show was capped from an HD source, but I'm guessing commercials are not HD, and probably mess it up. And maybe I capped it wrong; I am very new to all of this. Finally here is the AutoMKV log. Code: 23:21:38 0.97 public beta4 - - - - - - - - - - - - - START JOBS - - - - - - - - - - - - - - 23:21:38 OS Version: Windows XP 23:21:38 Selected Input file: F:\Lost_20080515_22022300.mpg 23:21:38 Selected Output dir: F:\temp\ 23:21:38 Selected Final Name: Lost_20080515_22022300 23:21:38 Selected Container type: MKV 23:21:38 Selected Encoder: XviD 23:21:38 Selected Size: 1000 / 1 23:21:38 Selected Profile: 2_Pass_Balanced.xml 23:21:38 Selected Resizer: NONE / Original 23:21:38 Selected Filters: RemoveGrain(mode=2) 23:21:38 Selected Deinterlacer: AUTO 23:21:38 Selected Field Order: AUTO 23:21:38 Using Matrix: Sharktooth's EQM v3LR.cqm 23:21:38 Track Language 1: 80: AC3 2/0 384 23:21:38 Audio Codec 1: Nero AAC 23:21:38 Audio Quality 1: 1.00 23:21:38 Audio Channel 1: Stereo 23:21:38 Track Language 2: NONE 23:21:38 Audio Codec 2: Lame 23:21:38 Advanced Audio Settings DUMP Track 1 23:21:38 Nero Option Profiles: AUTO --- Encoding Mode: Quality 23:21:38 CCT Option Profiles: AUTO --- Channel Options: AUTO 23:21:38 Lame Settings: ABR 23:21:38 Audio Normalization: 1 23:21:38 Frequency: AUTO --- Tempo: NONE --- Pitch: NONE --- Other Add: 23:21:38 23:21:38 Dgindex CMD: C:\Program Files\AutoMKV\exe\dgindex \dgindex.exe -FO=0 -OM=1 -TN=80 -YR=2 -AIF=[F:\Lost_20080515_22022300.mpg] -OF=[F:\temp\movie] -exit -minimize 23:24:25 D2V file size: 804541 bytes 23:24:25 Audio 1: movie t80 2_0ch 384kbps delay -36ms.ac3 23:24:25 Pre Audio 1' Size: 166760448 bytes 23:24:27 Applying DelayAudio of -36 to audio file: movie t80 2_0ch 384kbps delay -36ms.ac3 23:24:27 Encoding F:\temp\movie t80 2_0ch 384kbps delay -36ms.ac3 to NeroAAC with 1.00 quality 23:29:07 Encoded 1' Audio Track: movie t80 2_0ch 384kbps delay -36ms.mp4 142375376 bytes 23:29:16 Number of Frames: 208325 23:29:16 Framerate: 59.940060 23:29:16 Movie length in Seconds: 3476 23:29:16 Movie Width/Height: 1280/720 23:29:16 DgIndex AR: 16:9 23:45:31 Source is declared tff by a margin of 43/27. 23:45:31 Advanced Deinterlace Routines Log 23:45:31 Analyzed 121 sections of five frames 23:45:31 Found Interlace Sections: 0 0.00% 23:45:31 Found Progressive Sections:121 100.00% 23:45:31 Found Telecined Sections: 0 0.00% 23:45:31 Found Zero Mov: 100.00% 121 23:45:31 Found One Mov: 0.00% 0 23:45:31 Found Two Mov: 0.00% 0 23:45:31 Found Three Mov: 0.00% 0 23:45:31 Found Four Mov: 0.00% 0 23:45:31 Found Five Mov: 0.00% 0 23:45:31 The Movie is declared to progressive 23:45:31 FIRST pass XviD: "C:\Program Files\AutoMKV\exe\encoder\xvid_encraw.exe" -pass1 -bitrate 2072 -turbo -progress -max_bframes 2 -imin 3 -imax 16 -quality 6 -vhqmode 1 -pmax 16 -bmax 16 -bquant_offset 0 -kboost 20 -odegrade 9 -nopacked -nochromame -bvhq -threads 0 -lumimasking -qmatrix "C:\Program Files\AutoMKV\profiles\XviD-profiles\matrix\Sharktooth's EQM v3LR.cqm" -i "F:\temp\movie.avs" -type 2 -mkv "F:\temp\movie.mkv" 23:45:31 SECOND pass XviD: "C:\Program Files\AutoMKV \exe\encoder\xvid_encraw.exe" -pass2 -bitrate 2072 -progress -max_bframes 2 -imin 3 -imax 16 -quality 6 -vhqmode 1 -pmax 16 -bmax 16 -bquant_offset 0 -kboost 20 -odegrade 9 -nopacked -nochromame -bvhq -threads 0 -lumimasking -qmatrix "C:\Program Files\AutoMKV \profiles\XviD-profiles\matrix\Sharktooth's EQM v3LR.cqm" -i "F:\temp \movie.avs" -type 2 -mkv "F:\temp\movie.mkv" 02:15:35 Starting Second Pass 05:43:31 Only Movie Size: 902879619 bytes 05:43:31 C:\Program Files\AutoMKV\exe\matroska\mkvmerge.exe" -o "F:\temp\Lost_20080515_22022300.mkv_pre" --track-name -1:"Lost_20080515_22022300" --aspect-ratio -1:1.777778 "F:\temp \movie.mkv" --language -1:und --default-track -1:yes "F:\temp\movie t80 2_0ch 384kbps delay -36ms.mp4" --title "Done with AutoMKV 0.97 public beta4 [url]http://forum.doom9.org/showthread.php?t=140178[/url] " 05:45:42 Final Muxed size: 1044645248 bytes 05:45:42 Encoding finished: 03:30:07 elapsed time 05:45:42 ----------------------------------------------------------------------- 05:45:42 Script AutoCrop.log 05:45:42 05:45:42 Crop(0,0,1276,720) 05:45:42 ----------------------------------------------------------------------- 05:45:43 Script movie.avs 05:45:43 05:45:43 #loadpluginstart 05:45:43 05:45:43 #test1 05:45:43 05:45:43 #importstart 05:45:43 05:45:43 #test2 05:45:43 05:45:43 movie = mpeg2source("F:\temp\movie.d2v") 05:45:43 function getOrder(clip c) { 05:45:43 order = GetParity(c) ? 1 : 0 05:45:43 Return order } 05:45:43 #filter1start 05:45:43 05:45:43 #test3 05:45:43 05:45:43 last = movie 05:45:43 fixed_aspect = 1.772222 05:45:43 out_width = 1280 05:45:43 #Aspect_Error = -0.312% 05:45:43 out_height = 720 05:45:43 #resizestart 05:45:43 05:45:43 #test4 05:45:43 05:45:43 #filter2start 05:45:43 05:45:43 #test5 05:45:43 05:45:43 RemoveGrain(mode=2) 05:45:43 ColorMatrix(mode="Rec.709->Rec.601") 05:45:43 ----------------------------------------------------------------------- 05:45:43 Script mkvmaudio.avs 05:45:43 05:45:43 LoadPlugin("C:\Program Files\AutoMKV\exe\filter\NicAudio.dll") 05:45:43 LoadPlugin("C:\Program Files\AutoMKV\exe\filter\SoundOut.dll") 05:45:43 LoadPlugin("C:\Program Files\AutoMKV\exe\BeSweet\BassAudio.dll") 05:45:43 LoadPlugin("C:\Program Files\AutoMKV\exe\filter\FFmpegSource.dll") 05:45:43 NicAC3Source("F:\temp\movie t80 2_0ch 384kbps delay -36ms.ac3") 05:45:43 DelayAudio(-0.0360) 05:45:43 #Applying STEREO downmixing routines 05:45:43 function stereo(clip a) 05:45:43 { 05:45:43 flr = GetChannel(a, 1, 2) 05:45:43 fcc = GetChannel(a, 3) 05:45:43 lfe = GetChannel(a, 4) 05:45:43 lfc = MixAudio(fcc, lfe, 0.2071, 0.2071) 05:45:43 mix = MergeChannels(lfc, lfc) 05:45:43 lrc = MixAudio(flr, mix, 0.2929, 1.0) 05:45:43 blr = GetChannel(a, 5, 6) 05:45:43 Return MixAudio(lrc, blr, 1.0, 0.2929) 05:45:43 } 05:45:43 # 05:45:43 6==Audiochannels() ? stereo() : last 05:45:43 function addvideo(clip c) { 05:45:43 blankclip(length = Int(100 * AudioLengthF(c) / float(audiorate(c))), fps=100) 05:45:43 Return audiodub(last,c) 05:45:43 } 05:45:43 Normalize() 05:45:43 05:45:43 Soundout(output="cmd",type=1,format=3,autoclose=true,executable="C:\Program Files\AutoMKV\exe\besweet\neroaacenc.exe",prefilename=" -ignorelength -q 1.00 -if - -of audio.mp4",postfilename="",nofilename=true,showoutput=false) 05:45:43 05:45:43 - - - - - - - - - - - - FINISHED JOBS - - - - - - - - - - - - - - - - - I know this is a long post, but I want to provide as much info as possible as I don't know what is entirely relevant. Wish I could do a spoiler tag, would shorten this up considerably! BTW I've tried this on two computers; my better of the two is a 2gig Athlon X2, with 2gigs ram, WinXP Pro SP3. Both computers produce this problem with two different files. Any help would be appreciated!
Seems your source has good ac3 audio. Why not just go to regular Xvid with ac3? There is nothing to be gained by converting to AAC.
Thanks for the advice, but I ran into the same problem - audio out of sync, and video duration shorter than audio (57:52 vs 57:55) Code: File size : 997 MiB Duration : 57mn 55s Overall bit rate : 2 406 Kbps Movie name : Done with AutoMKV 0.97 public beta4 [url]http://forum.doom9.org/showthread.php?t=140178[/url] Encoded date : UTC 2008-09-18 15:15:22 Writing application : mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26 Writing library : libebml v0.7.7 + libmatroska v0.8.1 Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Custom Codec ID : V_MPEG4/ISO/ASP Codec ID/Info : Advanced Simple Profile Duration : 57mn 52s Bit rate : 1 982 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16/9 Frame rate : 59.940 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Title : Lost_20080515_22022300 Writing library : XviD 1.2.0SMP (UTC 2006-01-08) Language : English Audio Format : AC-3 Format/Info : Audio Coding 3 Codec ID : A_AC3 Duration : 57mn 55s Bit rate mode : Constant Bit rate : 320 Kbps Channel(s) : 2 channels Channel positions : L R Sampling rate : 48.0 KHz I will next try doing an avi instead of mkv, cause I don't think mkv gives any benefit here, and I'm not sure if that's what you meant by 'regular xvid'. Other than that, no idea what I'm doing wrong or how to fix it (and I'm guessing encoding to avi won't matter much).
I meant what you just said, no need for MKV, go for a normal Xvid AVI. Use this: With this: http://www.autogk.me.uk/
Alright I converted to xvid avi using AutoGK. Same thing, audio gets out of sync around 17 minutes. MediaInfo Code: Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Custom Codec ID : XVID Codec ID/Hint : XviD Duration : 57mn 55s Bit rate : 2 979 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16/9 Frame rate : 59.940 fps Original frame rate : 59.959 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Bits/(Pixel*Frame) : 0.054 Stream size : 1.21 GiB (88%) Writing library : XviD 1.2.0.dev47 (UTC 2006-11-01) Audio Format : AC-3 Format/Info : Audio Coding 3 Codec ID : 2000 Duration : 57mn 54s Bit rate mode : Constant Bit rate : 384 Kbps Channel(s) : 2 channels Channel positions : L R Sampling rate : 48.0 KHz Video delay : 28ms Stream size : 159 MiB (11%) Alignment : Split accross interleaves Interleave, duration : 96 ms (5.76 video frames) Interleave, preload duration : 96 ms AutoGK Log Code: [9/21/2008 10:31:14 PM] AutoGK 2.45 [9/21/2008 10:31:14 PM] OS: WinXP (5.1.2600).2 [9/21/2008 10:31:14 PM] Job started. [9/21/2008 10:31:14 PM] Input file: F:\Lost_20080515_22022300.mpg [9/21/2008 10:31:14 PM] Output file: F:\Lost_20080515_22022300.avi [9/21/2008 10:31:14 PM] Output codec: XviD [9/21/2008 10:31:14 PM] Audio 1: Audio Stream 0 AC3 [9/21/2008 10:31:14 PM] Subtitles: none [9/21/2008 10:31:14 PM] Format: AVI [9/21/2008 10:31:14 PM] Target size: 1400Mb [9/21/2008 10:31:14 PM] Custom resolution settings: fixed width of 1280 pixels [9/21/2008 10:31:14 PM] Audio 1 settings: Auto [9/21/2008 10:31:14 PM] Started encoding. [9/21/2008 10:31:14 PM] Demuxing and indexing. [9/21/2008 10:34:12 PM] Processing file: F:\Lost_20080515_22022300.mpg [9/21/2008 10:34:12 PM] Source resolution: 1280x720 [9/21/2008 10:34:12 PM] Found NTSC source. [9/21/2008 10:34:12 PM] Source aspect ratio: 16:9 [9/21/2008 10:34:12 PM] Color correction enabled. [9/21/2008 10:34:12 PM] Analyzing 60fps HDTV source. [9/21/2008 10:40:13 PM] Percentage of 3:2 dupe patterns: 87.40 [9/21/2008 10:40:13 PM] Dupes are not found. [9/21/2008 10:40:13 PM] Output will contain 208325 frames [9/21/2008 10:40:13 PM] Audio1 size: 166,760,448 bytes (159.04 Mb) [9/21/2008 10:40:13 PM] Overhead: 579,328 bytes (0.55 Mb) [9/21/2008 10:40:13 PM] Video size: 1,300,666,624 bytes (1240.41 Mb) [9/21/2008 10:40:13 PM] Running compressibility test. [9/21/2008 10:40:13 PM] Writing the following script to F:\agk_tmp\Lost_20080515_22022300_comptest.avs =========================================================== LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll") movie = mpeg2source("F:\agk_tmp\Lost_20080515_22022300.d2v") 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) fixed_aspect = 1 c_width = width(cropclip) c_height = round(height(cropclip) / fixed_aspect) input_par = float(c_width)/float(c_height) input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0) out_width = 1280 out_height = round(float(out_width) / input_par) hmod = out_height - (floor(out_height / 16 ) * 16) out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod) new_aspect = (float(out_width) / float(out_height)) / fixed_aspect 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) LanczosResize(out_width,out_height) RemoveGrain(mode=2) ColorMatrix("Rec.709->Rec.601",opt=0,hints=false,threads=0) SelectRangeEvery(300,15) =========================================================== [9/21/2008 10:54:26 PM] Duration was: 14 minutes 12 seconds [9/21/2008 10:54:26 PM] Speed was: 12.21 fps. [9/21/2008 10:54:26 PM] Compressibility percentage is: 22.65 [9/21/2008 10:54:26 PM] Using softer resizer. [9/21/2008 10:54:26 PM] Chosen resolution is: 1280x720 ( AR: 1.78 ) [9/21/2008 10:54:26 PM] Predicted comptest value is: 23.50% [9/21/2008 10:54:26 PM] Running first pass. [9/21/2008 10:54:26 PM] Writing the following script to F:\agk_tmp\Lost_20080515_22022300_movie.avs =========================================================== LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll") LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll") movie = mpeg2source("F:\agk_tmp\Lost_20080515_22022300.d2v") 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) fixed_aspect = 1 c_width = width(cropclip) c_height = round(height(cropclip) / fixed_aspect) input_par = float(c_width)/float(c_height) input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0) out_width = 1280 out_height = round(float(out_width) / input_par) hmod = out_height - (floor(out_height / 16 ) * 16) out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod) new_aspect = (float(out_width) / float(out_height)) / fixed_aspect 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) BicubicResize(out_width,out_height,0,0.5) RemoveGrain(mode=2) ColorMatrix("Rec.709->Rec.601",opt=0,hints=false,threads=0) =========================================================== [9/22/2008 1:33:15 AM] Duration was: 2 hours 38 minutes 48 seconds [9/22/2008 1:33:15 AM] Speed was: 21.86 fps. [9/22/2008 1:33:16 AM] Expected quality of first pass size: 22.82% [9/22/2008 1:33:16 AM] Running second pass. [9/22/2008 5:09:13 AM] Duration was: 3 hours 35 minutes 56 seconds [9/22/2008 5:09:13 AM] Speed was: 16.08 fps. [9/22/2008 5:09:14 AM] Splitting video into: F:\Lost_20080515_22022300.cd1.avi [9/22/2008 5:10:23 AM] Splitting video into: F:\Lost_20080515_22022300.cd2.avi [9/22/2008 5:11:33 AM] Job finished. Total time: 6 hours 40 minutes 18 seconds I did accidentally have it split the file into 2 cds, but it seemed to also make 1 large avi file as well (probably just splits that file after encoding?) I don't think this was the problem. Anything else I can try?