AnimeSuki.com Forum

AnimeSuki Forum (http://forums.animesuki.com/index.php)
-   Fansub Groups (http://forums.animesuki.com/forumdisplay.php?f=17)
-   -   Adobe Premiere Pro - Strange video/audio length problem (http://forums.animesuki.com/showthread.php?t=58813)

comatose 2007-12-02 00:47

Adobe Premiere Pro - Strange video/audio length problem
 
Hi!

I'm a newbie encoder, and I'm having trouble cutting a raw.

The video is encoded in h264, the audio is AAC.

When watching the raw in MPC (all internal filters disabled), the video and audio are in sync (same length). The problem is once I add them both to Premiere (had to extract them with mkvextract, rename the video to .264 and then add them both), it reads the audio as being about 15-20 sec shorter than the video, despite that listening to it makes it seem like the entire thing is there.

I went and asked in TV-Japan's IRC channel about it, and was told to update my codecs, so I went and downloaded the newest versions of CoreAAC and ffdshow, which didn't help.

This makes me think it might have something to do with the FPS - 23.976.

PS, If I mux it myself, this also happens (audio goes out of sync, ends earlier). When muxing, I specified the 23.976 framerate.

Any ideas?

martino 2007-12-02 06:04

Try extracting the timecodes with mkvextract, it could be that it is VFR.

comatose 2007-12-02 10:58

I did look, and even read the thread about VFR. That doesn't seem to be the case.

I tried using assumefps(23.976) in AVS just to make sure that it has the correct FPS, but it's still the same. I'm puzzled.

TheFluff 2007-12-02 11:39

You didn't read the VFR thread close enough. Or maybe you did but didn't understand. AssumeFPS() does nothing on VFR sources (actually it does but the meaning isn't, uh, meaningful; it just goes from one assumed FPS to another without touching the frames). Remember that Avisynth isn't VFR-aware and anything you do in there will not really affect the VFR'ness of the source; it's all just VFRaC.

comatose 2007-12-03 03:17

But it's not VFR - the raw is using the MKV container and there is no timecodes file, yet the original MKV plays it fine, while me remuxing it has this problem.

There's a Chapters file, but that doesn't seem to have anything to do with it.

Skyward 2007-12-03 04:00

MKV is a container that is VFR aware. Also, every mkv uses timecodes regardless of frame rate. Even CFR mkvs have timecodes, they aren't very interesting, but they are there.

jfs 2007-12-03 05:20

Also, the timecodes in Matroska files aren't stored as a separate file, track or whatever, but as an integral part of the video track. When you specify a timecodes file for muxing a video track in a Matroska file, the muxing program stores the appropriate timecode in header for every frame -- the timecodes file becomes part of the video track.

comatose 2007-12-03 05:30

Yes, but opening this mkv with mkvextractgui doesn't show anything like this ;-; The timecodes textarea is empty.
edit: Okay, so the GUI is retarded. I did it manually and it extracted okay. You guys were right, sorry. It is VFR - the frames aren't evenly spaced.
Anyway, is there a way to make Premiere Pro take timecodes into account? If not, do I have to make it CFR? t_t

I want to cut it in Premiere so I don't have to mess around with the audio and the video separately.. it'll suck trying to keep them in sync if I cut them separately.

BTW, how would I go on about concatenating two video streams into one (preferably with AviSynth)?
Say, I downloaded a raw in two parts (RAR) and want to put it together.


Another question that isn't really related, but like the above, I don't want to start another thread just for this:
AviSynth is giving me evul errors. Really, really, evil errors that I can't even read.. any solutions? (it seems to have something to do with the video input, but both ffmpegsource and directshowsource make this happen.)

Code:

ffmpegsource("clannad7-video.mkv")
vmtoon(sharpen=false,thinning=0,strength=48)

Gives me this:
http://img227.imageshack.us/img227/5...3121012ub0.jpg
But if I comment the ffmpegsource line, I get a readable error saying vmtoon doesn't have enough parameters. This doesn't happen with all filters.. DeRainbow(), for example, on its own gives the unreadable error, too.

TheFluff 2007-12-03 11:19

Quote:

Originally Posted by comatose (Post 1281485)
Anyway, is there a way to make Premiere Pro take timecodes into account? If not, do I have to make it CFR?

You have three alternatives:
a) edit with the audio out of sync, don't touch the frame order or amount (unless you want to manually edit the timecodes to compensate), remux with timecodes afterward
b) identify what sections are what framerate, split the MKV into smaller CFR parts and edit those individually, then splice them together afterwards
c) convert to CFR.

Quote:

Originally Posted by comatose (Post 1281485)
I want to cut it in Premiere so I don't have to mess around with the audio and the video separately.. it'll suck trying to keep them in sync if I cut them separately.

If you want to cut a VFR MKV, the simplest way to do it is using either GDSMux (comes with Haali's splitter and/or the CCCP) or with MKVmerge's splitting feature.

Or you can do something really clever in Avisynth (who could have guessed that I would suggest this):
Code:

vfrvideo = ffmpegsource("x:/stuff/test.mkv")
audio = directshowsource("x:/stuff/test.mkv", convertfps=true, fps=23.976) # framerate doesn't matter

vfrvideo.trim(0,1000) # cut on the desired frame here
audio = audio.trim(0,900) # this is the clever part; find the same frame in the convertfps'ed clip and put that number here

audiodub(last,audio)

This abuses the facts that the audio is still in sync when the video is converted to CFR, and that trim() cuts both video and audio. The audio may be off by 1-2 frames but it's not like anyone will notice.
Caveat when using this method: Virtualdub by default cuts off the audio stream when the video stream ends, so to avoid that you may want to assumefps() a very low framerate, or just disable that option (it's under video -> select range).

Quote:

Originally Posted by comatose (Post 1281485)
BTW, how would I go on about concatenating two video streams into one (preferably with AviSynth)?
Say, I downloaded a raw in two parts (RAR) and want to put it together.

You really should just RTFM, but anyway:
Code:

a = avisource("a.avi")
b = avisource("b.avi")

ab = a ++ b #aligned
ba = b ++ a #also aligned
abb = a ++ b ++ b #still aligned
audiotest = b + a #not aligned (note single plus)
longhand = unalignedsplice(b,a) #same as last line
abb2 = alignedsplice(a,b,b) #same as abb

Quote:

Originally Posted by comatose (Post 1281485)
Code:

ffmpegsource("clannad7-video.mkv")
vmtoon(sharpen=false,thinning=0,strength=48)

Gives me this:
http://img227.imageshack.us/img227/5...3121012ub0.jpg
But if I comment the ffmpegsource line, I get a readable error saying vmtoon doesn't have enough parameters.

If you comment out the source filter and try to filter nothing, you will naturally get an error message about your filter not having an input clip (= your "not enough parameters" message).

Other than that it seems you've already gotten help in the other thread.


All times are GMT -5. The time now is 08:47.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.