Log in

View Full Version : Which Audio Codec Does Wmenc Support for Multichannel?


JayBird
29th December 2008, 02:27
I am backing up BR to wmv9 for streaming to xbox 360. (This is the only way to get 5.1 sound.) I've struggled all weekend and finally got a method that works for the video, but every form of multichannel audio is rejected by Windows Media Encoder. "The input media format is invalid.(0xC00D0BB8)"

I have converted the original DTS track to AC3 and to a multichannel wav. Neither works unless I allow it to downsample to simple stereo. I have multichannel sound on my computer and have configured WinXP in the Control Panel for 5.1 sound.

Any advice is appreciated.

Greif
29th December 2008, 05:18
You can use multiple wav files in Wmenc. (not a multi-channel wav though)

JackSnap
29th December 2008, 17:48
This is more likely to do with the AC3 format and decoder,

do you have ac3 filter to decode the audio?

as a test you can try the CBR for audio and see if the problem goes away. does the error appear once it starts the second pass?

JayBird
30th December 2008, 01:33
I got the error when using CBR, and I have an AC3 filter I'm pretty sure, which is how I made the multichannel wav from the AC3 that I made from the DTS that swallowed the fly. (I don't know why)

But there's more than one way to skin a cat...

I just bought a Philips DVP5992 standalone divx player. So I think my route is .m2ts demuxed to h.264, avisynthed with dgavcdecode.dll into virtualdub (with a direct stream copied AC3), then out through xvid. Phew. I hope the audio will be compliant.

Xbox 360 streaming seemed promising, but Windows Media Encoder's refusal of a frameserved file means I was looking at two separate EIGHT HOUR encodings. And that NicWMenc version of WME that does allow frameserving would never begin encoding for me. I think it's because I didn't setup Graphedit or something. But now that I see I would have to use Tranzcode to split up the audio (even if an English AC3 source is available) - well, forget it.

JackSnap
30th December 2008, 12:13
I see what you say.

I had so much trouble converting mine to WMV format, so I could play on my xbox 360, but as you say its the best way to preserve the 5.1 sound.

In the end, I use an avisynth script to cut off the credits and play the m2ts file, and then the makeavis option to create an AVI file (I actually call it xxx.avi1) to stop explorer crashing.

Then I use that AVI1 file in WMencoder, which seems to work, although its a bit flaky sometimes. (timeout issues) but if you keep trying it works. Plus if its AC3 sound you need to use CBR or VBR crashes on the second pass.

A 2 pass encoding can take about 4 days! with the options ive set. but the result is top notch.

JayBird
30th December 2008, 23:24
Why is it so slow? I've not yet used WME for anything substantial, but four days for a movie sounds outrageous. Unless it's the makeavi. Or it could be that making WME slower on purpose helps boost sales of Expression Encoder.

larkin
2nd January 2009, 13:48
Hello Jay Bird,

Greif was correct when he stated that
"You can use multiple wav files in Wmenc. (not a multi-channel wav though)".

This is true if you are trying to encode both the multichannel wav and the video simultaneously in WMENC. You do have a couple of options using WMENC.

-Encode the video and use discrete mono wav files as your audio source. This is a simple as exporting each channel as a new mono wav. --See picture below for importing.

-Alternately you could use WMENC to encode the video without audio, then encode the multichannel wav file to .wma in a separate encode. Then mux them together using Windows Media Stream Editor that is included in the utility section of programs that accompanied WMENC. You simply add the video source and check the video box, select the audio source and select the box. Choose the add> button in the middle of the two columns and you are ready to mux the 5.1 with the wmv and stream to the Xbox.


http://i41.photobucket.com/albums/e252/thesamer/Multichannel_WAV.jpg

JayBird
2nd January 2009, 21:35
Thanks for that advice. It looks like audio sync becomes an issue for me. I am backing up Hitman blu ray, and I have found it needs about 200ms of audio delay to be in sync. I guess I would have to doctor the audio file up with some introductory silence? I can't see Windows stream editor allowing for any adjustment. And I definitely want to mux last so I don't waste so much time on asynchronous failures.

This may be the wrong place to ask about audio sync, but I used tsmuxer to demux the h.264 video file and the DTS track, downsampled from DTS-HD and with the "Bind to video FPS" box checked. In virtualdub the movie length and the audio stream length are within approx 20 ms of each other. In fact I installed a filter and can import the DTS directly into virtdub. How can I need 200ms of audio delay to achieve near sync? I remember some DVD rippers would pull the audio track and the file name would indicate how much, if any delay was needed. Maybe there's a utility that will give me a number by examining the original m2ts?

Dark Eiri
3rd January 2009, 00:32
I'm doing it like this:

Convert AC3/AAC/DTS -> Multichannel WAV (I'm using foobar2000)

dBpoweramp -> Convert to WMA Pro 10, 5.1, 440kbps.

Until now, flawless. You can fix the audio delay with the trim (negative delay) or insert silence (positive delay) filters on dbpoweramp too, if needed.

Then I mux the audio and previously encoded VC-1 video with Windows Media Stream Editor.

benwaggoner
3rd January 2009, 21:49
If you can make a .avs that's in sync, Expression Encoder can use it.

One challenge with AC-3 is that many decoders, including AC3 Filter, done use a fixed seed for the random number generator used for dithering, and so a second pass won't match the first pass and the encoding will fail due to CRC not matching. That's normally why converting to WAV first works, as that's a 1-pass process.

And no, we didn't make WME slow in order to make EE look better :). We made the VC-1 Encoder SDK faster since faster is better, and that's what EE uses. But that SDK is a free download for use in other products.

Dark Eiri
4th January 2009, 00:25
Hey ben, I was thinking, there's any plans to make Expression Encoder support 5.1 encoding?
I noticed that if you make a Profile with the profile editor containing 5.1 audio, it will encode as 5.1 indeed, but internal controls only allow Stereo.

JayBird
4th January 2009, 01:00
Just in case anyone reads this thread who has problems with WMNicEnc, I need to confess a momentary retardation. I thought the encoder was not starting because the bitrate is entered in actual bits, not kilobits. Putting 5000 in for a test run yields 5 kbps, a file so tiny that it appears frozen while being built.

I got the output to stream to my xbox 360 beautifully.

benwaggoner
6th January 2009, 05:45
Hey ben, I was thinking, there's any plans to make Expression Encoder support 5.1 encoding?
I noticed that if you make a Profile with the profile editor containing 5.1 audio, it will encode as 5.1 indeed, but internal controls only allow Stereo.
It's on the list of potential features, but I'm not sure if it'll make it into the next version. As you point out, it works, but testing all the permuations and GUI can take a while.

Silverlight 2 doesn't support 5.1 output, and non-Silverlight features a are a lower priority for the encoder.

Awax
9th January 2009, 14:15
I have had absolutely no problems converting a raw ac3 or DTS 5.1 (downmixed from True HD versions) audio file to wma with Windows Media Encoder. As long as you have ac3 filter on your computer, and it is set to 5.1 output, Windows Media Encoder will convert it to wma. When you go to select the audio file, you will have to change the drop box to show all files. Conversion takes 15 to 20 minutes for the audio, then you can mux it back with the video using stream editor.

I use CBR for audio and video conversions.

Furiousflea
9th January 2009, 14:57
Hello Jay Bird,

Greif was correct when he stated that
"You can use multiple wav files in Wmenc. (not a multi-channel wav though)".

This is true if you are trying to encode both the multichannel wav and the video simultaneously in WMENC. You do have a couple of options using WMENC.

-Encode the video and use discrete mono wav files as your audio source. This is a simple as exporting each channel as a new mono wav. --See picture below for importing.

-Alternately you could use WMENC to encode the video without audio, then encode the multichannel wav file to .wma in a separate encode. Then mux them together using Windows Media Stream Editor that is included in the utility section of programs that accompanied WMENC. You simply add the video source and check the video box, select the audio source and select the box. Choose the add> button in the middle of the two columns and you are ready to mux the 5.1 with the wmv and stream to the Xbox.


http://i41.photobucket.com/albums/e252/thesamer/Multichannel_WAV.jpg

Do it this way would be my recommendation....

Use eac3to on the source...

eac3to c:\Source.audio c:\output.wavs

(if you put .wav instead of .wavs you will get a 5.1 wav file instead of mono wavs)

Just load the mono wavs into Windows Media Encoder 9 series and encode from there...You don't even need AC3 filter - zero compatibility problems and works for ALL HD audio formats)

Crono141
10th January 2009, 23:05
I had the same problem with regular DVDs. I finally found my solution in Buzzq's AutoMKV program. Created Multichannel WMV for playback in native Windows Media Center Extender and Xbox 360 dashboard.

However, I've personally abandoned WMV encoding, because the file size and quality were far inferior to h264, and none of my WMV with multichannel audio would play when I got my PS3.

I use Transcode360 now for viewing x264 movies on Xbox360, and I can watch x264 with ac3 natively on my PS3.

Just thought I'd share my experience, since you seem to be on the same journey I was until just recently.