Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th July 2011, 23:07   #341  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
LameXP v4.03 Alpha-5:

Quote:
Changes between v4.02 and v4.03:
* Added "built-in" WMA decoder (see this thread for details) and removed all remnants of "old" decoder
* Updated MediaInfo to v0.7.47 (2011-07-27), compiled with MSVC 10.0
* Updated language files (big thank-you to all contributors !!!)
* Fixed Cue Sheet import for tracks with certain characters in the title
* Workaround for malicious "anti-virus" programs that prevent innocent applications from functioning
* Enabled "Aero Glass" theme in installer and web-update program (Vista and Windows 7 only)
Also I further increased the timeout delay, until I have time to debug FAAD
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 5th August 2011 at 22:25.
LoRd_MuldeR is offline   Reply With Quote
Old 27th July 2011, 00:30   #342  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by LoRd_MuldeR View Post
Also I further increased the timeout delay, until I have time to debug FAAD
Cool, it works...
Thanks very much...


Cheers
manolito
manolito is offline   Reply With Quote
Old 4th August 2011, 23:45   #343  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
LameXP v4.03 Alpha-7:

Quote:
Changes between v4.02 and v4.03:
* Added an option to rename the output files (based on an user-defined pattern)
* Added "built-in" WMA decoder (see this thread for details) and removed all remnants of "old" decoder
* Updated Qt runtime libraries to v4.8.0 Beta-1 (2011-07-19), compiled with MSVC 10.0
* Updated MediaInfo to v0.7.47 (2011-07-27), compiled with MSVC 10.0
* Updated language files (big thank-you to all contributors !!!)
* Fixed Cue Sheet import for tracks with certain characters in the title
* Workaround for malicious "anti-virus" programs that prevent innocent applications from functioning
* Enabled "Aero Glass" theme in installer and web-update program (Vista and Windows 7 only)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 5th August 2011 at 22:25.
LoRd_MuldeR is offline   Reply With Quote
Old 5th August 2011, 02:36   #344  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks for the new build, everything is working fine here...

Meanwhile I found a workaround for the issue concerning the wav files created by Valdec (junk chunk causing problems when trying to open these files with older apps). I now use Valdec v. 0.2a which does not support wav files > 2GB and also does not use the WAVE_FORMAT_EXTENSIBLE format for multichannel wav files.

This older version is no longer available on the AC3Filter website, but the current version of Quick AVI Creator has it. Interesting find in the changelog:
Quote:
- Reverted: Valdec from version 0.31b to version 0.2a
due to compatibility issues with faac.
For my needs this older version of Valdec works perfectly. Small issue with LameXP is that during decoding the progress indicator stays at 0% all the time. But the decoding goes well nevertheless (probably due to the longer timeout value).


Anyways, my wish list for LameXP has become quite short. Add the ability to downmix multichannel sources to stereo, and I will be absolutely happy...


Cheers
Manolito
manolito is offline   Reply With Quote
Old 5th August 2011, 22:25   #345  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
LameXP v4.03 Alpha-8:

Quote:
Changes between v4.02 and v4.03:
* Added an option to rename the output files (based on an user-defined pattern)
* Added an option to enforce Stereo Downmix for Multi-Channel sources
* Added "built-in" WMA decoder (see this thread for details) and removed all remnants of "old" decoder
* Updated Qt runtime libraries to v4.8.0 Beta-1 (2011-07-19), compiled with MSVC 10.0
* Updated MediaInfo to v0.7.47 (2011-07-27), compiled with MSVC 10.0
* Updated language files (big thank-you to all contributors !!!)
* Fixed Cue Sheet import for tracks with certain characters in the title
* Workaround for malicious "anti-virus" programs that prevent innocent applications from functioning
* Enabled "Aero Glass" theme in installer and web-update program (Vista and Windows 7 only)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th August 2011 at 14:17.
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2011, 19:15   #346  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
* Added an option to enforce Stereo Downmix for Multi-Channel sources
This must be about the fastest response to a feature request I have ever seen, thank you very much...

I already spent some time testing the downmix feature, and everything works fine from the LameXP side, but sox is doing some weird things to the output. The right channel always comes out at a significantly lower volume than the left channel. It depends on the source how big this level reduction is, but it is always there.

I uploaded a 6ch AC3 where the average RMS loudness of the right channel is -13 dB compared to the left channel:
http://www.sendspace.com/file/9e8gjf

Other audio converters I tried (PX3's AC3 to WAV, BeLight, HeadAC3HE) do not show this behavior. This was my test procedure:

Select Downmix to stereo (options like Dolby Prologic 1 or 2 and Dolby Surround compatible turned off).

Normalizing, sample rate conversion all turned off.

Load the resulting wav into WaveLab and perform a Global Analysis over the whole file. Compare the Loudness Level (RMS) for both channels.


I don't know if sox allows the user to modify the downmix algorithm via command line switches, so I am not sure if you can do something about it...


But again a big thanks...

Cheers
manolito

Last edited by manolito; 6th August 2011 at 19:24.
manolito is offline   Reply With Quote
Old 6th August 2011, 19:31   #347  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Oops, I almost forgot to ask my other question concerning Valdec.

I just noticed that you modified Valdec to support Unicode and to support decoding to STDOUT. By using the older version 2.0a I lose these features.

While I certainly can live without Unicode support, I am not sure what I am losing by not being able to decode to STDOUT. Does LameXP use this?

I tested a conversion from AC3 to AAC using the old Valdec, and everything was fine.


Cheers
manolito
manolito is offline   Reply With Quote
Old 6th August 2011, 19:42   #348  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Hmm, that's probably a result of "wrong" channel mapping

There is a filter in SoX that allows mixing the channels with a custom channel mapping (and custom weights), I think.

But how to figure out the "correct" mapping for the individual source? That's the big question!

(BTW: The STDOUT feature I hacked into Valdec isn't used by LameXP, but the loss of Unicode support will be problematic!)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 6th August 2011 at 20:46.
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2011, 20:28   #349  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Okay, it seems with the "-c" option of SoX the center channel will be mixed completely into the left channel

So I changed the Downmix option to use the "remix" filter of SoX (with explicit channel mapping) instead of the "-c" option.

I used the "Default Channel Ordering" for multiple channel WAVE files, as given on this site:
http://msdn.microsoft.com/en-us/wind...dware/gg463006

Hopefully this will give better downmix results - as long as all decoders output Wave files with default channel ordering
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th August 2011 at 03:20.
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2011, 21:47   #350  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Sorry, the test build does not work here...

The decoding seems to work, but after this sox is not invoked at all. There is no error message, LameXP tells me that everything is fine, but I end up with an empty 2ch wav file which has a length of 44 bytes.


Cheers
manolito
manolito is offline   Reply With Quote
Old 6th August 2011, 22:49   #351  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by manolito View Post
Sorry, the test build does not work here...

The decoding seems to work, but after this sox is not invoked at all. There is no error message, LameXP tells me that everything is fine, but I end up with an empty 2ch wav file which has a length of 44 bytes.


Cheers
manolito
Strange. Works for me with your example AC3 file. What does the log say ???
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 6th August 2011 at 23:34.
LoRd_MuldeR is offline   Reply With Quote
Old 7th August 2011, 01:50   #352  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Here's the log file:

Quote:
LameXP v4.03 (Build #625), compiled on 2011-08-06 at 21:24:07

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

E:/DOKUME~1/Achim/LOKALE~1/Temp/6f584c110cec4c36b708dbaf1de36f90/tool_valdec.exe I:\test.ac3 -w E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\9c6a9d668efc4fe78d1f38463de837f7.wav

Opening audio output PCM16 3/2.1 (5.1) 48000...
---------------------------------------
Frames/errors: 172143/0
System time: 775065ms
Process time: 576308ms
Approx. 10.46% realtime CPU usage

Exited with code: 0x0000

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

E:/DOKUME~1/Achim/LOKALE~1/Temp/6f584c110cec4c36b708dbaf1de36f90/tool_sox.exe -V3 -S --guard --temp . E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\9c6a9d668efc4fe78d1f38463de837f7.wav E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\2b50bdf89a474dfca93de87ea139c569.wav remix 1,3,4,5,7,9 2,3,4,6,8,9

E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\tool_sox.exe: SoX v14.3.2
E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\tool_sox.exe INFO formats: detected file format type `wav'
E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\tool_sox.exe INFO wav: EXTENSIBLE
Input File : 'E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\9c6a9d668efc4fe78d1f38463de837f7.wav'
Channels : 6
Sample Rate : 48000
Precision : 16-bit
Duration : 01:31:48.16 = 264391680 samples ~ 413112 CDDA sectors
File Size : 42949672.08G
Bit Rate : 42949672.542949672.08G
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\tool_sox.exe INFO sox: Overwriting `E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\2b50bdf89a474dfca93de87ea139c569.wav'
Output File : 'E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\2b50bdf89a474dfca93de87ea139c569.wav'
Channels : 2
Sample Rate : 48000
Precision : 16-bit
Duration : 01:31:48.16 = 264391680 samples ~ 413112 CDDA sectors
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
Comment : 'Processed by SoX'
E:\DOKUME~1\Achim\LOKALE~1\Temp\6f584c110cec4c36b708dbaf1de36f90\tool_sox.exe FAIL remix: too few input channels

Exited with code: 0x0002

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

Copy file "E:/DOKUME~1/Achim/LOKALE~1/Temp/6f584c110cec4c36b708dbaf1de36f90/2b50bdf89a474dfca93de87ea139c569.wav" to "I://test.wav"

Exited with code: 0x0000


Cheers
manolito
manolito is offline   Reply With Quote
Old 7th August 2011, 02:51   #353  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Argh, it seems we need different parameters for each number of input channels

SoX doesn't ignore no-existent channels in the remix mapping, as I had assumed. Instead it will error out, if there are too few channels.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th August 2011 at 03:00.
LoRd_MuldeR is offline   Reply With Quote
Old 7th August 2011, 07:17   #354  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Alright, the channel mapping of this latest test build works for me...

I tested it with several 5.1 AC3 files and also with a 6ch DTS file. No problems, the resulting 2ch files sounded real good, the default sox downmix algorithms seem to work well.

I could not even break it by using a 2ch AC3 source file and still have the downmix option ticked. LameXP seemed to intercept it and did not invoke sox at all.

For a while I thought that it might be a good idea to avoid sox for downmixing and use the decoder downmix capabilities instead. Valdec and Faad both have a command line switch for downmixing which would already cover AC3, DTS and AAC. No idea about the other decoders. Could be faster in many cases. But then again using sox certainly is more "universal".


Anyways, it works for me as it is right now..

Thanks again

Cheers
manolito
manolito is offline   Reply With Quote
Old 7th August 2011, 11:35   #355  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Out of interest...

Does SoX offer the ability to generate discrete multi-channel encodes from 2-channel "pro logic" encoded sources?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 7th August 2011, 12:29   #356  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by manolito View Post
Alright, the channel mapping of this latest test build works for me...
Thanks for confirming. At last a working solution.

Quote:
Originally Posted by manolito View Post
I tested it with several 5.1 AC3 files and also with a 6ch DTS file. No problems, the resulting 2ch files sounded real good, the default sox downmix algorithms seem to work well.
If with "default sox downmix algorithm" you mean the "channels" filter (or "-c" option), then it does not work very well!

It gives an unexpected downmix result. For example, the center would be mixed into left, but not into right.

Here is a good sample to test:
http://www.mediafire.com/file/1c3oob...ltichannel.wma

With the "remix" filter we can get the desired result, but only if we manually define a channel mapping for each number of input channels.

And it will only work correctly as long as the input uses "Default Channel Ordering" for multiple channel WAVE files...

Quote:
Originally Posted by manolito View Post
I could not even break it by using a 2ch AC3 source file and still have the downmix option ticked. LameXP seemed to intercept it and did not invoke sox at all.
Yup, the Downmixing filter isn't invoked for Stereo and Mono sources.

Quote:
Originally Posted by manolito View Post
For a while I thought that it might be a good idea to avoid sox for downmixing and use the decoder downmix capabilities instead. Valdec and Faad both have a command line switch for downmixing which would already cover AC3, DTS and AAC. No idea about the other decoders. Could be faster in many cases. But then again using sox certainly is more "universal".
Indeed I need a solution that works will arbitrary decoders. However a shortcut for decoders with "native" downmix support could be implemented.

...as it currently is done with the "resample" filter for encoders that provide "native" re-sampling support.

Quote:
Does SoX offer the ability to generate discrete multi-channel encodes from 2-channel "pro logic" encoded sources?
Not that I am aware of. But shouldn't we leave "pro logic" decoding to the playback device anyway?

Doesn't make much sense to store 5.1 discrete channels with "pseudo" surround, if we can generate the same "effect" from only 2 discrete channels at playback time.

Amplifiers with more than two discrete speakers generally provide "pro logic" support. And on your computer you can use ffdshow audio decoder, for example.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th August 2011 at 13:38.
LoRd_MuldeR is offline   Reply With Quote
Old 7th August 2011, 14:17   #357  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
LameXP v4.03 Alpha-9:

Quote:
Changes between v4.02 and v4.03:
* Added an option to rename the output files (based on an user-defined pattern)
* Added an option to enforce Stereo Downmix for Multi-Channel sources
* Added "built-in" WMA decoder (see this thread for details) and removed all remnants of "old" decoder
* Updated Qt runtime libraries to v4.8.0 Beta-1 (2011-07-19), compiled with MSVC 10.0
* Updated MediaInfo to v0.7.47 (2011-07-27), compiled with MSVC 10.0
* Updated language files (big thank-you to all contributors !!!)
* Improved "downmix" filter by using explicit channel mappings for each number of input channels
* Fixed Cue Sheet import for tracks with certain characters in the title
* Workaround for malicious "anti-virus" programs that prevent innocent applications from functioning
* Enabled "Aero Glass" theme in installer and web-update program (Vista and Windows 7 only)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 8th August 2011 at 21:14.
LoRd_MuldeR is offline   Reply With Quote
Old 7th August 2011, 15:42   #358  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Bummer...

I recently re-encoded my old 1997 DVD version of Blade Runner The Directors Cut to a cropped and re-sized high bit-rate AVC video stream.

Unfortunately all the DVD releases of this movie were encoded with a 2-channel Dolby Digital Pro logic audio track.

I was hoping I could convert this 2-channel Dolby Digital Pro logic audio track to a 5.1 channel Dolby Digital discrete track at 640Kbps.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 7th August 2011, 16:11   #359  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by SeeMoreDigital View Post
Bummer...

I recently re-encoded my old 1997 DVD version of Blade Runner The Directors Cut to a cropped and re-sized high bit-rate AVC video stream.

Unfortunately all the DVD releases of this movie were encoded with a 2-channel Dolby Digital Pro logic audio track.

I was hoping I could convert this 2-channel Dolby Digital Pro logic audio track to a 5.1 channel Dolby Digital discrete track at 640Kbps.
Why not decode the Digital Pro at playback time?

If you play your DVD's on a PC, you can use your favorite DShow-based player (e.g. MPC-HC) with ffdshow as audio decoder.
Ffdshow has a Dolby Pro Logic (even version "II") decoder "built-in", so you can output discrete 5.1 channels.

And, if you use a "stand alone" player, it probably is connected to a multi-channel amplifier with Pro Logic support. Isn't it?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th August 2011 at 16:14.
LoRd_MuldeR is offline   Reply With Quote
Old 7th August 2011, 16:37   #360  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by LoRd_MuldeR View Post
Why not decode the Digital Pro at playback time?

And, if you use a "stand alone" player, it probably is connected to a multi-channel amplifier with Pro Logic support. Isn't it?
I pump the bit-stream audio from my XtreamerPro hardware media player to my Onkyo surround sound amplifier via HDMI.

Although the Onkyo amplifier has many DSP modes including some THX surround sound modes, it's a case of more buttons to press... And I hate having to go through the ritual of pressing loads of buttons at the start of a movie
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Reply

Tags
aac, aotuv, flac, lame, lamexp, mp3, mp4, ogg, oggenc, opus, vorbis

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 +1. The time now is 08:03.


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