I've had this problem before with an H264/AAC, and was able to fix it after demuxing the files and converting the AAC file into a wav using foobar
Now with this series of anime I'm working on, I'm unable to get the video and audio to sync at all. Unsure what the problem is.
What I usually do is demux with MKCleaver and convert the H264 file to AVI during the demux. I then take the AAC file, convert it to wav in foobar, then using AVISYNTH to mux them together into TMPGencAW or MW to and hardsub the ASS subs at the same time.
Not working on this new batch at ALL
Mediainfo
My Usual script I use for AVS won't sync them at all. I've tried using DirectShowSource as well, same problem, and AVISource just won't parse the h264 AVI. One thing I also notice when I bring it into TMPGenc is the video become 24 minutes long instead of the 23mins 6 secondsVideo
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 6s
Nominal bit rate : 923 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.685 fps
Original frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.117
Title : FILENAME
Writing library : x264 core 58 r785M 192768d
Encoding settings : cabac=1 / ref=2 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=hex / subme=6 / me-prepass=0 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=0 / mbaff=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=923 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:0.5:13.0
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 23mn 6s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Language : Japanese
Default : Yes
Forced : No
Text
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Title : Ryuu-Rogue Fansubs - http://ryuu-rogue.livejournal.com/
Language : English
Default : Yes
Forced : No
Script:
LoadPlugin("C:\Program Files\AVStoDVD\VobSub\VSFilter.dll")
Import("C:\Program Files\AVStoDVD\Lib\A2DSource.avsi")
Video = A2DVideoSource("D:\Anime\FILENAME.avi", CacheFolder="C:\DOCUME~1\XXX\LOCALS~1\Temp")
video = video.TextSub("D:\Anime\FILENAME.ass")
Audio = A2DAudioSource("D:\Anime\FILENAME.wav", CacheFolder="C:\DOCUME~1\XXX\LOCALS~1\Temp")
Video = Video.ConvertToYV12
Video = Video.Lanczos4Resize(704,480)
AudioDub(Video, Audio)
+ Reply to Thread
Results 1 to 19 of 19
-
-
I tried changing it to this, and I thought it would work; but got the same results. Is there a command I'm missing? Or something else I should have put in, added, changed?
Video = A2DVideoSource("D:\Anime\FILENAME.avi", CacheFolder="C:\DOCUME~1\XXX\LOCALS~1\Temp", FrameRate=29.970, VFR=false) -
That was the info you provided:
Frame rate : 25.685 fps
Original frame rate : 29.970 fps
the video stream in the container has a frame rate of 25.685, but the raw video stream has originally a frame rate of 29.97.
since it is played synch normally means the audio is synched against 25.685.
-> using FrameRate=29.970 is wrong and keeping the audio as it is will result in an asynch output,...
If you want the output should be synch at 29.970 you need to either adjust the video or the audio stream accordingly.
Can't help with A2DVideoSource much since I never use it. -
I changed it to vfr=25.685 and absolutely no change either
So since you never use a2dvideosource, what would you suggest? Do you have another AVS script/format to try? Do you use AVS at all? Anything??? -
All in all I'm a bit confused, since you first mention that you have a source which is H.264 and AAC (so the container should either be mp4, mkv or mov) and later you use an avi file as source.
Assuming you have an avi file as source:
Have you ever tried simply loading the source through AviSource?
This requires that you have vfw decoders installed that can handle your source, see: http://avisynth.org/mediawiki/AVISource .
Code:AviSource("D:\Anime\FILENAME.avi") TextSub("D:\Anime\FILENAME.ass") ConvertToYV12() Lanczos4Resize(704,480)
Ps.: I sincerely hope that your source is not an avi file with H.264 and AAC in it because at the the later is a know combination for trouble. -
If you look up at my original post and see 'demux with MKcleaver' ......
and yes, I've tried using avisource on the video file and directshowsource on the audio.
One other thing, the subs are in sync with the audio, and not the video either. -
and yes, I've tried using avisource on the video file and directshowsource on the audio.
.................................................. .....
By the way, it's still unclear what container your source file is.
in post #1 it's an mkv
later you only speak of avi
-> without a sample file which I can look at, I give up -
It's an MKV otherwise MCCleaver wouldn't be able to demux them. MKCleaver also has this ability to convert an h264 file to AVI (have no idea HOW because I can't find any other program that will do it).
I TRIED AVI source as I stated above, and STILL have the problem that the video is OUT OF SYNC with the AUDIO.
I tried FFMS2 on the h264 file and the avi file and the MKV container, no dice. I'm pretty sure I can't upload a 172MB file up here for you to look at.
You are throwing things at me that I stated I've already tried. I even tried DGavcindex, and you even stated that the video was not a correct FPS. SO how can I get the video part to the correct FPS as the audio and subs?????? -
Sorry, can't help without a sample or the source file.
But here comes my last side note:
Why do you extract the streams before feeding them to ffms2, if you use ffmpegsource2 and haalis media splitter is installed, this is normally the best way to feed mkv source material to Avisynth.
Also if your source does not have a fixed frame rate you need to extract the timecodes and give them to TextSub,...
Cu Selur -
How am I supposed to get you a source file?
Something else I noticed, I just did DirectShowSource on the MKV and it won't do the textsub (yes I pointed it to the ASS file), the audio feed goes into 6 channels and is completely MUTE.
I don't know WHY Ryo uses AAC files on a simple 90s stereo based audio. He's an idiot if you ask me. I've been encoding Anime to DVD I can't find in the states from fansubs since 2001 and I have NEVER had this much trouble, even when I was a frakking newbie at it! -
How am I supposed to get you a source file?
In example:
1. use mkvmerge to split the file into 10MB chunks
2. try if you still have the problem with this chunk
3. if you do upload the chunks here, if you don't use another chunk
I have NEVER had this much trouble, even when I was a frakking newbie at it!
-> to me it looks like
a. the video is vfr
and/or
b. the audio and/or video stream is stretched (it's kind of tricky to get the stretch factor of a stream since it requires parsing the mkvinfo output and do a bunch of calculations)
I don't know WHY Ryo uses AAC files on a simple 90s stereo based audio. -
I think it's a part of it, because when I used DSS to parse just the MKV file, it brought the Audio in as 6 channel instead of 2 channel. I also couldn't hear any audio even thought TMPGENCMW showed that it was playing so I couldn't tell if it was syncing.
As I also stated, DSS also wouldn't parse the textsub command either, which is WHY I am demuxing. Converting Karaoke style ASS to SRT just does not WORK.
As for FFmpegsource2 where can I download it from? Been searching. Hopefuly this reply will parse it into a link for me LOL
I don't have the time any more today to be splitting and playing with chunks, I have a 45 hr/wk job so I don't just sit here encoding 24/7. -
As for FFmpegsource2 where can I download it from? Been searching. Hopefuly this reply will parse it into a link for me
I don't have the time any more today to be splitting and playing with chunks, I have a 45 hr/wk job so I don't just sit here encoding 24/7. -
Had to do LoadCPlugin instead of LoadPlugin
And here's the deal, the size of the audio is now much closer to the size of the video; but it's still not syncing! And it's progressive, not a certain MS apart. I can get one part of the video to sync, but others are out of sync.
Note this is parsing the MKV file and the only demuxed file used is the ASS file.
I'm getting ready to just hit DELETE on the whole damned thing and never encode my anime again. This is just frakking ridiculous! Hoping someone out there knows how I can get the FPS to match the audio!Last edited by JPIShadow; 25th Mar 2013 at 09:36.
Similar Threads
-
Demux MKV/h.264/AC3-5.1 to MP4/h.264/AC3-5.1 (using MP4tools / mkvextract)
By xnu in forum Video ConversionReplies: 2Last Post: 17th Jun 2012, 06:42 -
MKV (H.264 and AAC) to mpeg2 (for DVD)
By Anonymous1 in forum Video ConversionReplies: 11Last Post: 2nd Sep 2011, 14:57 -
[HELP][ANIME] MKV (H.264 + AAC) to AVI (PS3 - Compatible) with soft-subs.
By mooshimuushi in forum Newbie / General discussionsReplies: 4Last Post: 21st Aug 2010, 01:42 -
Want to beta test DivX 7 with h.264, AAC and MKV?
By kosmonautbruce in forum Software PlayingReplies: 3Last Post: 7th Nov 2008, 20:24 -
Playing a h.264 aac MKV file with PowerDVD 7.3 nvidia purevideo installed
By maxpower2078 in forum Media Center PC / MediaCentersReplies: 6Last Post: 28th Jul 2008, 07:48