MPEG-2 Video/Audio out of sync in Compressor

The Perian forums have moved to Google Groups, this forum is read only.
Locked
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

I haven't encountered the problem in any other application. I'm not sure if it's the video being played back at inconsistent speeds, or the audio being decoded incorrectly, but the two very quickly go out of sync.

What's interesting to note is that the video looks like it's being played back too quickly, but the audio actually falls behind the video. So I'm not sure which one it is.

Has anyone else encountered this problem? Are the alternatives to Perian that would work?
gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by gbooker »

Is the MPEG2 Video interlaced?
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

Yes, 29.97 fps. I'm detelecining it in my conversion.
gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by gbooker »

Perian has issues with interlaced content, partially because it's not easy in ffmpeg. Anyway, that's the source of the problem you are experiencing. Can compressor read MPEG2 video without Perian?
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

It can, but it won't decode the audio if I disable Perian. I think it's an issue with Compressor, rather than Perian. There doesn't seem to be a difference in its behavior when decoding MPEG-2 video with Perian disabled though, which leads me to believe that it relies on its own decoder rather than any QuickTime component you may have, and (to my knowledge) can't be forced to do otherwise. Like I said, this only occurs with Compressor. MPEG Streamclip handles it perfectly (other than that it reports the stream to be progressive 23.976 fps rather than interlaced 29.97).

The whole application is a bit of a mess to be honest. I was hoping for a complete re-write with Compressor 4.0, or at least 64-bit capability, but alas I was disappointed...
gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by gbooker »

That may be. None of the developers have access to Compressor, but I remember seeing reports of video being at too high a framerate in Compressor on interlaced content. Not sure what the best course of action would be.
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

I can run the video through HandBrake losslessly crop it, detelecine it, and resize it, so that I can run the video stream by itself through Compressor. But there I run into another problem...

Perian doesn't seem to fully support lossless H.264.

Image

All through the video there are off-color blocks. Is this a known issue? Is there a solution?

--------------------

Why don't you just use HandBrake as your all-purpose encoding tool?

I use Compressor for the ability to convert the frame rate/playback speed from PAL to NTSC. I also prefer to use Apple's H.264 encoder (the mention of which is heresy around here, I know, but I'm not here to argue about that).
gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by gbooker »

Are you sure that Perian's doing the decode? By default, most, if not all, H.264 decoding is being done by Apple's codec. You may want to try setting/unsetting the DecodeAllProfiles preference.

I'm not aware that H.264 can be made lossless. I thought some of the transforms used where inherently lossy. Another option may be to run it through a different tool that allows better choice on codecs and use Pixlet or something like that.
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

When I remove Perian then the video won't decode at all.

x264, the open source H.264 encoder that HandBrake uses, has a lossless mode when RF 0 is selected.

Where is the DecodeAllProfiles preference? I can't seem to find it.
gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by gbooker »

If it doesn't decode without Perian, then Perian's doing the decoding and Apple's refuses to do decoding, so the DecodeAllProfiles means nothing.
AstralBoy
Harmless
Posts: 6
Joined: Mon Feb 13, 2012 4:20 am

Re: MPEG-2 Video/Audio out of sync in Compressor

Post by AstralBoy »

Oh sorry. I forgot to mention that Apple's H.264 decoder does not support the profile level used by lossless H.264. With Perian disabled, regular H.264 decodes fine, but only the lossless video doesn't decode. It's frustrating because Perian works fine for this for so many others.
Locked