xxxyzzzz
10th May 2008, 05:17
Hi,
I am not sure if this is the right place to post; it could be here, in the x264 forum, or in the alternative container forum. I start here.
This is what I am doing:
I am creating mkv/x264/(ogg/ac3) files from some of my favorite cartoon episode DVDs, as well as some movies.
I use the following guide:
http://avisynth.org/mediawiki/VFR
to create variable frame rate matroska. I use tritical's ingenious filter, TIVTC, to create the timecodes necessary to mux the raw x264 video with the audio using mkvmerge-gui from mkvtoolnix 2.2.0.
This is my problem:
The audio is frequently out of sync with the video for different episodes (about -20ms to 120ms), and it doesn't seem to matter what audio codec used.
I understand that it could be very slightly out of sync in different places, especially with cartoons/anime; but, this is with the entire video.
I have been adjusting it for now; but, I would like to know why.
Is this a common problem with VFR video? or is it a TIVTC/MKV/X264 problem? Or maybe it is a problem with the decoder?
Thanks,
Z
Here are my 2-pass avisynth scripts:
Pass 1:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
LoadPlugin("RemoveGrainSSE2.dll")
movie = mpeg2source("movie.d2v")
out_width = 720
out_height = 480
tfm(movie,mode=0,pp=7,mi=40,output="tfm.txt").tdecimate(mode=4,output="stats.txt")
RemoveGrain(mode=2)
Pass 2:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
LoadPlugin("RemoveGrainSSE2.dll")
movie = mpeg2source("movie.d2v")
out_width = 720
out_height = 480
tfm(movie,mode=0,pp=7).tdecimate(mode=5,hybrid=2,dupThresh=1.0,input="stats.txt",tfmin="tfm.txt",mkvout="timecodes.txt")
RemoveGrain(mode=2)
Here are my x264 options:
Pass 1:
wine x264.exe --pass 1 --bitrate 1000 --stats .stats --ref 1 --progress --keyint 250 --bframes 3 --qpmin 10 --qpmax 51 --no-psnr --filter -2,-1 --subme 2 --direct auto --vbv-bufsize 14000 --vbv-maxrate 25000 --me dia --no-ssim --level 4.1 --b-pyramid --partitions none --threads auto --thread-input --sar 1:1 --output NUL movie_pass_1.avs
Pass 2:
wine x264.exe --pass 2 --bitrate 1000 --stats .stats --progress --keyint 250 --bframes 3 --qpmin 10 --qpmax 51 --no-psnr --mixed-refs --trellis 1 --ref 12 --filter -2,-1 --direct auto --vbv-bufsize 14000 --vbv-maxrate 25000 --me umh --no-ssim --level 4.1 --weightb --b-pyramid --b-rdo --bime --partitions p8x8,b8x8,i4x4,i8x8,p4x4 --8x8dct --threads auto --thread-input --sar 1:1 --output movie.264 movie_pass_1.avs
Normal mkvmerge command used:
mkvmerge -o movie.mkv --priority lower --aspect-ratio 0:4/3 --default-duration 0:30000/1001fps --timecodes 0:timecodes.txt -d 0 -A -S movie.264 --sync 0:0 -a 0 -D -S audio.ac3 --track-order 0:0,1:0
P.S. I apologize for the massive amount of information - but I would like to be thorough.
I am not sure if this is the right place to post; it could be here, in the x264 forum, or in the alternative container forum. I start here.
This is what I am doing:
I am creating mkv/x264/(ogg/ac3) files from some of my favorite cartoon episode DVDs, as well as some movies.
I use the following guide:
http://avisynth.org/mediawiki/VFR
to create variable frame rate matroska. I use tritical's ingenious filter, TIVTC, to create the timecodes necessary to mux the raw x264 video with the audio using mkvmerge-gui from mkvtoolnix 2.2.0.
This is my problem:
The audio is frequently out of sync with the video for different episodes (about -20ms to 120ms), and it doesn't seem to matter what audio codec used.
I understand that it could be very slightly out of sync in different places, especially with cartoons/anime; but, this is with the entire video.
I have been adjusting it for now; but, I would like to know why.
Is this a common problem with VFR video? or is it a TIVTC/MKV/X264 problem? Or maybe it is a problem with the decoder?
Thanks,
Z
Here are my 2-pass avisynth scripts:
Pass 1:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
LoadPlugin("RemoveGrainSSE2.dll")
movie = mpeg2source("movie.d2v")
out_width = 720
out_height = 480
tfm(movie,mode=0,pp=7,mi=40,output="tfm.txt").tdecimate(mode=4,output="stats.txt")
RemoveGrain(mode=2)
Pass 2:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
LoadPlugin("RemoveGrainSSE2.dll")
movie = mpeg2source("movie.d2v")
out_width = 720
out_height = 480
tfm(movie,mode=0,pp=7).tdecimate(mode=5,hybrid=2,dupThresh=1.0,input="stats.txt",tfmin="tfm.txt",mkvout="timecodes.txt")
RemoveGrain(mode=2)
Here are my x264 options:
Pass 1:
wine x264.exe --pass 1 --bitrate 1000 --stats .stats --ref 1 --progress --keyint 250 --bframes 3 --qpmin 10 --qpmax 51 --no-psnr --filter -2,-1 --subme 2 --direct auto --vbv-bufsize 14000 --vbv-maxrate 25000 --me dia --no-ssim --level 4.1 --b-pyramid --partitions none --threads auto --thread-input --sar 1:1 --output NUL movie_pass_1.avs
Pass 2:
wine x264.exe --pass 2 --bitrate 1000 --stats .stats --progress --keyint 250 --bframes 3 --qpmin 10 --qpmax 51 --no-psnr --mixed-refs --trellis 1 --ref 12 --filter -2,-1 --direct auto --vbv-bufsize 14000 --vbv-maxrate 25000 --me umh --no-ssim --level 4.1 --weightb --b-pyramid --b-rdo --bime --partitions p8x8,b8x8,i4x4,i8x8,p4x4 --8x8dct --threads auto --thread-input --sar 1:1 --output movie.264 movie_pass_1.avs
Normal mkvmerge command used:
mkvmerge -o movie.mkv --priority lower --aspect-ratio 0:4/3 --default-duration 0:30000/1001fps --timecodes 0:timecodes.txt -d 0 -A -S movie.264 --sync 0:0 -a 0 -D -S audio.ac3 --track-order 0:0,1:0
P.S. I apologize for the massive amount of information - but I would like to be thorough.