Anomaly? I played a .Mov with a 5.1 AC3 sountrack in QT

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Anomaly? I played a .Mov with a 5.1 AC3 sountrack in QT

Post by sasha »

Just experienced the weirdest thing, AC3 5.1 surround from a .mov!

The file(s) are originally created with Handbrake (AVI (anamorphic) with AC3. Since anamorphic doesn’t work in a AVI I saved it as a QuickTime file to display it in the correct proportions.

This did not use to work, see my previous post:
http://handbrake.m0k.org/forum/viewtopi ... highlight=

This week I updated my Mac to 10.4.10, Quicktime 7.2 and Perian 1.0 and tried to open one of my “useless” AC3 .mov files and I heard the “static” sound. Remembering the Audio Mini thing that you have to match the exact frequency to that of the original source (48.000Hz) and tried it again…..it worked. My receiver plays and confirms it is an AC3 full 5.1 soundtrack and plays it really well in QuickTime and Frontrow! After a restart it still worked.

From the Handbrake and Perian forums I always learned that to pass-through AC3 through QuickTime was always a hack (probably still is) and only possible in a .AVI/.MKV container

Can anyone confirm if they have had the same luck or if I just have a strange anomaly on my Mac?
golias
Enlightened
Posts: 105
Joined: Wed Jan 03, 2007 7:29 pm

Re: Anomaly? I played a .Mov with a 5.1 AC3 sountrack in QT

Post by golias »

sasha wrote:Just experienced the weirdest thing, AC3 5.1 surround from a .mov!

The file(s) are originally created with Handbrake (AVI (anamorphic) with AC3. Since anamorphic doesn’t work in a AVI I saved it as a QuickTime file to display it in the correct proportions.

This did not use to work, see my previous post:
http://handbrake.m0k.org/forum/viewtopi ... highlight=

This week I updated my Mac to 10.4.10, Quicktime 7.2 and Perian 1.0 and tried to open one of my “useless” AC3 .mov files and I heard the “static” sound. Remembering the Audio Mini thing that you have to match the exact frequency to that of the original source (48.000Hz) and tried it again…..it worked. My receiver plays and confirms it is an AC3 full 5.1 soundtrack and plays it really well in QuickTime and Frontrow! After a restart it still worked.

From the Handbrake and Perian forums I always learned that to pass-through AC3 through QuickTime was always a hack (probably still is) and only possible in a .AVI/.MKV container

Can anyone confirm if they have had the same luck or if I just have a strange anomaly on my Mac?
Wow. If this is for real I'm *stunned* that neither Apple nor Perian has been crowing about it. I can't wait to give it a shot!
golias
Enlightened
Posts: 105
Joined: Wed Jan 03, 2007 7:29 pm

Re: Anomaly? I played a .Mov with a 5.1 AC3 sountrack in QT

Post by golias »

sasha wrote:Just experienced the weirdest thing, AC3 5.1 surround from a .mov!

The file(s) are originally created with Handbrake (AVI (anamorphic) with AC3. Since anamorphic doesn’t work in a AVI I saved it as a QuickTime file to display it in the correct proportions.

This did not use to work, see my previous post:
http://handbrake.m0k.org/forum/viewtopi ... highlight=

This week I updated my Mac to 10.4.10, Quicktime 7.2 and Perian 1.0 and tried to open one of my “useless” AC3 .mov files and I heard the “static” sound. Remembering the Audio Mini thing that you have to match the exact frequency to that of the original source (48.000Hz) and tried it again…..it worked. My receiver plays and confirms it is an AC3 full 5.1 soundtrack and plays it really well in QuickTime and Frontrow! After a restart it still worked.

From the Handbrake and Perian forums I always learned that to pass-through AC3 through QuickTime was always a hack (probably still is) and only possible in a .AVI/.MKV container

Can anyone confirm if they have had the same luck or if I just have a strange anomaly on my Mac?
I just tried your suggestion, and I got neither the "static" nor a 5.1 signal. Just plain ol' PCM stereo, like Perian always makes Quicktime spit out when given an AC-3 signal.

Am I missing something? Is there something you failed to mention?
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

Hi Golias,
I'm just as stunned and still can’t believe it. As you say it is not mentioned anywhere but it is still able to output 5.1 sound.

At first I though that my receiver was fooling around but I’m pretty sure it is not. When I do not play anything it mentions PCM as soon as start a MOV or AVI AC3 track I get the “static” click and the receiver switches to AC3.

I have been away for couple of days and shut down the Mini. When I get back later this week I will boot it up again and hope it still works.

As far as I know I have mentioned everything that I have done. I was hoping that anyone else got the same result.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Post by Ritsuka »

If you open an avi or mkv in QuickTime and you have the a52codec passthrough hack (that show the audio as a pcm stereo track), and then save it as mov, the hack will remain.

Naturally, if you don't have a receiver and play the audio through your mac speaker, you probabily will hear only noise.
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

Hi Ritsuka,
If you open an avi or mkv in QuickTime and you have the a52codec passthrough hack (that show the audio as a pcm stereo track), and then save it as mov, the hack will remain.
This is actually what suprised me since I remember reading on either the Handbrake forum or the Perian Forum that Perian or QuickTime was not capable to access a AC3 track from within a .MOV container. I think the remark was made by Gbooker I think he is one of the Perian developers.

Anyway, I returned today home today and the booted up the mini in the livingrrom the files stillplay perfectly in full 5.1 sound and in Frontrow.
Since my movies are stored on a network drive I can access the same files with my G5 upstairs.

Although Perian is installed on the G5 as well and plays the AC3 soundtrack I cannot check the output since it is hooked up to a receiver via the analog output.
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Post by gbooker »

There is a lot of wrong information here, like this:
sasha wrote: This is actually what suprised me since I remember reading on either the Handbrake forum or the Perian Forum that Perian or QuickTime was not capable to access a AC3 track from within a .MOV container. I think the remark was made by Gbooker I think he is one of the Perian developers.
I never said such a thing because it is wrong! .MOV can pretty much handle everything. When you open any other filetype in any Quicktime app, it essentially creates a .MOV in memory and QT just handles that. I have been creating .MOV files with AC3 audio long before I ever released the A52Codec. In fact, I have even sent one such file to the developers of Handbrake in the hopes that it would enable them to allow passthrough with a .MOV container.

It is .MP4 that can't handle AC3 because it is not part of the standard for the file format. In reality, it likely can, but QT refuses to deal with anything non standard in this file format. The issue with Handbrake is it creates .MP4 files, not .MOV files. Yes, I know the formats are nearly identical, but the subtle differences kill AC3 in .MP4

Of everything stated here, only Ritsuka and the original poster are factually correct.
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

Hi gbooker!

Thank you for your reaction and my apologies for any mistaken information in my posts. I must have mistakenly confused MP4 and MOV when it comes to AC3. Sorry for that.
I was still under the impression QuickTime was not able output 5.1 AC3 tracks correctly with the latest Perian plugin installed and all other settings/hacks applied.

Anyway I guess I'm getting off topic for the Handbrake forum and should move over to the Perian forums to learn more about AC3 output.

Anyway without the hard work from the developers of Handbrake and Perian all of this would not be possible!!
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Post by gbooker »

sasha wrote: I was still under the impression QuickTime was not able output 5.1 AC3 tracks correctly with the latest Perian plugin installed and all other settings/hacks applied.
You need to be more explicit here. If you are talking about decoding the AC3 audio and playing it, there was never an issue in any format that prevented playback. If you are talking about passthrough, then you were correct until about 3 minutes ago (and only in .MOV containers, no other)

Also, in re-reading Ritsuka's post, I missed a detail he mentioned which makes him wrong as well. The audio is never shows as a pcm track. Purely stuffing AC3 data to a decoder does not work, it needs to have a special header attached and padding between frames. The hack only involved claiming it was 2 channel instead of its true channel count.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Post by Ritsuka »

/me runs for his life.
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

GBooker, you are correct. I was talking about the passthrough of AC3 in QuickTime in a .mov container with the Perian plug-in installed.

I'm able to play/passthrough .mov files that inlcude AC3 (5.1) tracks.

My AV-receiver switches to Dolby Digital 5.1 as soon as the signal kicks in (just like with AVI files that contain passthrough AC3 tracks) and the sound is exactly the same as on the original DVD's.
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Post by gbooker »

For the moment, this only works reliably if QT thinks the audio is 2 channels, not 6 (QT treats the .1 channel as a full channel). This has been fixed for the next version of the A52Codec though.
golias
Enlightened
Posts: 105
Joined: Wed Jan 03, 2007 7:29 pm

Post by golias »

sasha wrote:GBooker, you are correct. I was talking about the passthrough of AC3 in QuickTime in a .mov container with the Perian plug-in installed.

I'm able to play/passthrough .mov files that inlcude AC3 (5.1) tracks.

My AV-receiver switches to Dolby Digital 5.1 as soon as the signal kicks in (just like with AVI files that contain passthrough AC3 tracks) and the sound is exactly the same as on the original DVD's.
I'm not sure I follow how, exactly, you are going about creating these MOV files. Your original post was kind of vague on the details. ("quick rip"... wha?)

When I open them in QuickTime and do a "Save" as an MOV file, I just end up with the same problem I have playing back the AVI files that handbrake created: Perian and Quicktime decode them and convert them into a PCM stereo file.

How are you creating MOV files that don't do that?

AC3 passthrough during playback is 90 percent of the reason I even keep VLC around. If this hack of yours works, it would make my life a lot simpler.
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

I actually create 2 files. The first as mentioned in my original post is an .AVI file that contains a passthrough AC3 track.

Since the AVI file is not able to contain any chapter information and anamorphic I create a “quick rip” MP4 anamorphic file with chapter information. I called it a “quick rip” since I use the default handbrake settings for MP$ and not x.264.

Using both files I copy the x.264, AC3 tracks (from the AVI) and the Chapter information (from the MP4) to a new QuickTime file. I use the anamorphic information of the MP4 only to check/confirm the aspect ration and manually set the new file to the same proportions.

The result is a QuickTime file that has x.264, AC3, chapters and “anamorphic”.

For me it works
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Post by gbooker »

I would suggest that you do the x264 within the MP4 track rather than the AVI track (just use AVI to give you the AC3 data). AVI was not designed to handle frames which display in a different order than decode, and so there are several hacks in place to make this work (such as multiple frames of data in a single frame, etc). Making a .mov from an AVI does not remove these hacks.

These hacks would not be present within a .MP4.
sasha
Posts: 38
Joined: Mon Jan 29, 2007 3:16 pm

Post by sasha »

I would suggest that you do the x264 within the MP4 track rather than the AVI track (just use AVI to give you the AC3 data).
This was my initial idea as well, but I kept having problems that the image and sound were out of sync. I have not yet worked out on how to solve this.

Perhaps future Matroska developments in both Handbrake and Perian will make this method obsolete in the future by selecting all the appropriate settings once needs/wants.
arfarrr
Posts: 1
Joined: Sun Aug 05, 2007 11:24 am

mkv container with h.264

Post by arfarrr »

gbooker wrote:I would suggest that you do the x264 within the MP4 track rather than the AVI track (just use AVI to give you the AC3 data). AVI was not designed to handle frames which display in a different order than decode, and so there are several hacks in place to make this work (such as multiple frames of data in a single frame, etc). Making a .mov from an AVI does not remove these hacks.

These hacks would not be present within a .MP4.
I am using the SVN build rev785 that has mkv container support to output H.264 + AC3 passthrough.

My question is when using MKV with H.264, would there be any hacks in place such as those for the AVI container mentioned above by gbooker, or would the h.264 video stream output to mkv be as clean and proper like the mp4 container.

Thank you.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

MKV will do x264 clean and proper.
Post Reply