AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Anime Related Topics > General Anime > Fansub Groups

Notices

Reply
 
Thread Tools
Old 2007-12-02, 00:47   Link #1
comatose
Senior Member
 
Join Date: Dec 2007
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?

Last edited by xris; 2007-12-02 at 06:40.
comatose is offline   Reply With Quote
Old 2007-12-02, 06:04   Link #2
martino
makes no files now
 
 
Join Date: May 2006
Try extracting the timecodes with mkvextract, it could be that it is VFR.
__________________
"Light and shadow don't battle each other, because they're two sides of the same coin"
martino is offline   Reply With Quote
Old 2007-12-02, 10:58   Link #3
comatose
Senior Member
 
Join Date: Dec 2007
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.
comatose is offline   Reply With Quote
Old 2007-12-02, 11:39   Link #4
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 37
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.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read
TheFluff is offline   Reply With Quote
Old 2007-12-03, 03:17   Link #5
comatose
Senior Member
 
Join Date: Dec 2007
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.
comatose is offline   Reply With Quote
Old 2007-12-03, 04:00   Link #6
Skyward
Oblivious
*Fansubber
 
Join Date: Jul 2007
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.
Skyward is offline   Reply With Quote
Old 2007-12-03, 05:20   Link #7
jfs
Aegisub dev
 
 
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 39
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.
__________________

Aegisub developer [ Forum | Manual | Feature requests | Bug reports | IRC ]
Don't ask for: More VSFilter changes (I won't), karaoke effects, help in PM's
jfs is offline   Reply With Quote
Old 2007-12-03, 05:30   Link #8
comatose
Senior Member
 
Join Date: Dec 2007
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:

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.

Last edited by comatose; 2007-12-03 at 05:56.
comatose is offline   Reply With Quote
Old 2007-12-03, 11:19   Link #9
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 37
Quote:
Originally Posted by comatose View Post
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 View Post
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 View Post
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 View Post
Code:
ffmpegsource("clannad7-video.mkv")
vmtoon(sharpen=false,thinning=0,strength=48)
Gives me this:

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.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read

Last edited by TheFluff; 2007-12-03 at 13:52.
TheFluff is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 22:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
We use Silk.