AC3 issues in H264 encoded .m4v

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
ERICSPEEd
Blank Cone
Blank Cone
Posts: 15
Joined: 01 Feb 2009 07:58
VLC version: 0.9.8a
Operating System: XP Pro SP3
Location: Head of the Lakes
Contact:

AC3 issues in H264 encoded .m4v

Postby ERICSPEEd » 01 Feb 2009 08:33

Hello,

I have recently been encoding my DVDrips with Handbrake 0.9.3 using the x264 encoder with AC3 audio into .m4v files.

I have my computers audio set to "desktop stereo speakers" (going to get a 5.1 speaker system when cash allows) within "Advanced Audio Properties" and VLC (0.9.8a) plays the video beautifully but there is something amiss with the audio when playing the above mentioned video files.

The right speaker seems to have the "front" channels audio and the left speaker seems to have the "rear" channels audio. VLC "notices" that I have set my audio properties to "stereo" and selects "stereo" from the get go. But as I stated the audio is messed up. Even when I select "5.1" or "2 front 2 rear" from the audio device drop down menu within audio it sounds basically the same. The "mono" setting balances it out of course but I don't want it mono.

It plays stereo encoded files I've created perfectly (mp3 audio). It seems to be directing the "center channel mix" to my right speaker.

It might be a handbrake issue but I haven't found any reported problems within the handbrake forum as of yet.

Anyone have any thoughts as to why?

I'm using my motherboard's audio (C-Media 6501) with a Microsoft "generic" USB driver (5.1.2535.0) since the drivers from C-Media crash after about 30min of playback. I've tried as many C-Media 6501 driver releases as I could find and they all crashed. Even with the C-Media driver installed I had the same weird AC3 issue - front channels sound in the right speaker and rear channels sound in the left speaker.


Help.

Thanks

Windows XP Professional SP3, AMD Athlon X2 64 4000+, ASUS M2N-SLI using on board audio (C-Media 6501 chip), MSI 8500GT running a LCD main and CRT TV, VLC 0.9.8a Grishenko.
Google master.

Arite
Big Cone-huna
Big Cone-huna
Posts: 2478
Joined: 26 Jun 2007 20:40
VLC version: 3.0.20
Operating System: Debian Testing|Win10

Re: AC3 issues in H264 encoded .m4v

Postby Arite » 01 Feb 2009 14:24

Sounds like the AC3 channel mapping is incorrect - have you tried the file with another player?

Are you re-encoding the audio? If you want 5.1 AC3 audio in the output file then, assuming the DVD-Video has 5.1 AC3 audio, is copying the original not possible?

Arite.
Don't use PMs for support questions.

ERICSPEEd
Blank Cone
Blank Cone
Posts: 15
Joined: 01 Feb 2009 07:58
VLC version: 0.9.8a
Operating System: XP Pro SP3
Location: Head of the Lakes
Contact:

Re: AC3 issues in H264 encoded .m4v

Postby ERICSPEEd » 02 Feb 2009 00:19

There must be a bug in Handbrake when using the x264 encoder and AC3 "pass through" because I did some test encodes using XviD encoded video with AC3 audio and x264 encoded video with AAC "6 channel discrete" audio. Both worked perfectly when played in stereo.
So there is a "mapping" issue.
I haven't any other player that can handle .m4v files with AC3 at this time. Quicktime doesn't handle AC3 without a plugin (I haven't downloaded yet, mainly because I don't use Quicktime). I don't have Classic Media Player but I will download it and see if it can playback the problem files without the audio mapping issues.
I'll have to see if anyone in the Handbrake forum answers my query.

Thanks.

FYI the AC3 file within both the working and non-working files is a bit for bit copy of the original DVD AC3 5.1 audio.
Google master.

Arite
Big Cone-huna
Big Cone-huna
Posts: 2478
Joined: 26 Jun 2007 20:40
VLC version: 3.0.20
Operating System: Debian Testing|Win10

Re: AC3 issues in H264 encoded .m4v

Postby Arite » 02 Feb 2009 01:56

FYI the AC3 file within both the working and non-working files is a bit for bit copy of the original DVD AC3 5.1 audio.
Interesting. Might be a container issue then.

Arite.
Don't use PMs for support questions.

ERICSPEEd
Blank Cone
Blank Cone
Posts: 15
Joined: 01 Feb 2009 07:58
VLC version: 0.9.8a
Operating System: XP Pro SP3
Location: Head of the Lakes
Contact:

Re: AC3 issues in H264 encoded .m4v

Postby ERICSPEEd » 02 Feb 2009 02:29

I'll try .mp4 as a container. I could just change the file extension of the preexisting .m4v files but I'll do a new encoding with x264 and AC3 using .mp4 and see if that rectifies the problem.

Thanks
Google master.

Arite
Big Cone-huna
Big Cone-huna
Posts: 2478
Joined: 26 Jun 2007 20:40
VLC version: 3.0.20
Operating System: Debian Testing|Win10

Re: AC3 issues in H264 encoded .m4v

Postby Arite » 02 Feb 2009 13:41

Well *.m4v file are techincally just the video stream. Since VLC doesn't rely on file extentions to determine the format renaming it shouldn't make any difference, however if the output container format can be changed it should.

You could extract the AC3 audio separately and then mux it alongside the separate video into e.g. an MKV file (or an MP4 file using mp4UI).

Arite.
Don't use PMs for support questions.

ERICSPEEd
Blank Cone
Blank Cone
Posts: 15
Joined: 01 Feb 2009 07:58
VLC version: 0.9.8a
Operating System: XP Pro SP3
Location: Head of the Lakes
Contact:

Re: AC3 issues in H264 encoded .m4v

Postby ERICSPEEd » 03 Feb 2009 03:51

I did a "test" encode in Handbrake with H264 video and 5.1 AC3 audio with an .avi extension and it worked perfectly in stereo. I changed the .m4v extension on one of the faulty files to .mp4 but the audio was just as before, outta whack.
So it must be a bug in Handbrake and no fault of VLC.

Thanks for your responses and information Arite.

Have a good one.

P.S. Originally I was using .m4v because it was the default extension for H264 encoded videos within Handbrake.
Google master.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: AC3 issues in H264 encoded .m4v

Postby VLC_help » 03 Feb 2009 12:56

You should try to demux the audio track out from that file using mp4box and try to playback the demuxed audio track. That way you can figure out where the issue is.

woodsse
New Cone
New Cone
Posts: 2
Joined: 27 Mar 2009 02:58

Re: AC3 issues in H264 encoded .m4v

Postby woodsse » 27 Mar 2009 03:33

Hefty bump here.

Does anyone know if the cause of the OP's problem was found. I am having the exact same issue. Handbrake 0.9.3 and VLC 0.9.8a. Any mp4/m4v that contains an ac3 track when played back in stereo ends up with the front channels going to the right and the rear channels going to the left. I can encode the same dvd segment into a mkv and playback is fine in VLC. Further, I can demux the audio from the mp4 that does not play correctly in VLC into an ac3 file and it plays back in VLC perfectly.

When I look at the codec information for the mp4 VLC reports the audio codec as "ac-3" but when I play the original DVD, the mkv, or just the demuxed ac3 file it reports the audio codec as "a52".

Trying to run down if this is a Handbrake issue or a VLC issue. Which ever it appears to be solely related to ac3 being contained in an mp4/m4v.

Thanks

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: AC3 issues in H264 encoded .m4v

Postby VLC_help » 27 Mar 2009 15:45

This should be fixed in VLC 1.0.0, you can try nightlies.
http://nightlies.videolan.org/build/win32/?C=M;O=D (trunks are 1.0.0)

woodsse
New Cone
New Cone
Posts: 2
Joined: 27 Mar 2009 02:58

Re: AC3 issues in H264 encoded .m4v

Postby woodsse » 27 Mar 2009 17:01

I tried nightly vlc-0.9.9-rc2-20090327-0107-win32 and still experienced the issue. Is the fix actually in the nightlies or is it just scheduled for 1.0 but hasn't been committed yet?

EDIT: I apparently got my tard on. You clearly said trunk and I grabbed a branch. The latest trunk fixed the issue. Thanks for the help.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: AC3 issues in H264 encoded .m4v

Postby Jean-Baptiste Kempf » 28 Mar 2009 22:24

EDIT: I apparently got my tard on. You clearly said trunk and I grabbed a branch. The latest trunk fixed the issue. Thanks for the help.
Thanks for the report.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 21 guests