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 > (HD) DVD, Blu-ray & (S)VCD > One click suites for DVD backup and DVD creation

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd October 2020, 11:30   #3341  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
Are you sure you used the 32-bit version of MPC-HC? Because I get this error only when using MPC-HC 64.
Yes, both with 32bit and 64bit

Quote:
Originally Posted by manolito View Post
And I also managed to find the reason why my old VDub version could not decompress the audio when using it for the preview.
This old version cannot handle 32-bit float audio...
At some point in the A2D develoment you added the line
global OPT_AllowFloatAudio = True
at the beginning of A2DSource.avsi. This command is not present in the AVS script when a source filter like FFMpegSource or DirectShowSource is explicitly specified under preferences, so the old VDub will work. Only if A2DSource is used VDub will choke.
My memory is fading, but I found this 2015 thread about the topic.

Quote:
Originally Posted by manolito View Post
FWIW I found another method at StackOverflow for determining the number of audio channels. It uses FFProbe, this is the call:

It looks much clearer than the MediaInfo output for several 8-ch formats. No idea if it is as reliable as the AVSMeter method.

The StackOverflow page is here:
https://stackoverflow.com/questions/...ffmpeg-command
Thanks, that could be a good alternative basically for all clip properties. Now I'm trying to improve parsing of MediaInfo "verbose" output. I would come out with a quick fix in the next days.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 3rd October 2020, 11:59   #3342  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
About the preview issue with Win10, another alternative could be to use Graph Studio Next to open and run the AviSynth script within a clear directshow environment (unfortunately GraphStudio 0.3.2.0 does not support the run command thru CLI).



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 3rd October 2020, 18:35   #3343  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
The more I dig into these 8-ch audio formats, the more confusing it gets. I am sure glad that I only have a stereo sound system...

I have tested these formats:
DD+ (aka E-AC3) 7.1
DTS-HD MA 7.1
Dolby ATMOS/TrueHD/EAC3

For the DD+ 7.1 format MediaInfo as well as LAV Audio only see 6 channels. This audio format is handled correctly by A2D.

The DTS-HD MA 7.1 format also contains a 6-ch audio stream, and MediaInfo reports it as 8 / 6 channels which causes A2D to issue invalid downmix commands like "Dmix8 / 66()". LAV Audio sees it as 8-ch, so the MediaInfo parsing must be corrected to 8.

For Dolby ATMOS MediaInfo sees 3 audio streams. The first one is ATMOS which right now cannot be decoded by any free audio decoder. So A2D sees it as having 0 channels which of course results in a crash in DownMix.avsi. LAV Audio sees it as 8-ch.


If 8-ch audio is only available in these 3 formats then it should be easy to correct the MediaInfo parsing.

But I found some more confusing facts:
8-ch audio tracks can consist of several audio streams within one track. This concept is rather new to me. MediaInfo 18.05 enumerates the audio as tracks while all FFMpeg based software enumerates the audio as streams. This means trouble for AVStoDVD.

LAV Audio has no way for a user to specify a certain stream from an audio track, it always uses the first stream within a track which it can decode. A specific stream can be selected at playback via LAV splitter (right-click on the splitter tray icon), but I have found no way to select a specific stream within a track for AVStoDVD. So with the exception of DD+ 7.1 LAV Audio will always see 8-ch audio.

If more than one audio track should be included in the A2D project, and the first audio track has 8 channels, the result will be broken. A2D needs to use FFMS2 as the source filter for the second audio track (because DS based source filters do not allow to select the audio track). But if the first audio track contains more than 1 stream, the FFMS2 enumeration will see 2 or more streams in the first audio track pushing up the index numbers. In the case of 2 audio streams within the first audio track the index number for the second audio track will be 3 (instead of 2). This is probably tough to fix.


Cheers
manolito
manolito is offline   Reply With Quote
Old 3rd October 2020, 22:43   #3344  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
That's weird. But intriguing

First step is to read properly ATMOS clips. Time to put aside MediaInfo and to embrace FFprobe? It could be a good idea... maybe giving the user the option to choose the media reader in the Preferences... to consider for 2.9.0 release.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 4th October 2020, 01:02   #3345  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
I don't know if handling 8-ch audio correctly for DVD output is worth all the trouble...

My workaround is to preprocess source clips with 8-ch audio using dmMediaConverter. This is an FFMpeg GUI specializing in video conversion, and it is very smart. Source clips with 8-ch audio are shown stream based, you can easily select or discard specific audio streams. If you want to downmix audio streams you can either do it into WAV or into the desired DVD target audio format. For video you just use "Copy", and the target container should be MKV. This MKV can be used as the A2D source file, and I never had any issues with the conversion.


Cheers
manolito
manolito is offline   Reply With Quote
Old 4th October 2020, 16:43   #3346  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Probably you are right, btw sometimes troubles mean fun. Just to save some time...

On the path of releasing 2.8.9 final: hotfix with improvements to define previewer (default external for Win10) and better parsing of Mediainfo audio channels.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 4th October 2020, 21:45   #3347  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
Quote:
Originally Posted by MrC View Post
...and better parsing of Mediainfo audio channels.
Thanks, this is a major progress, and the number of audio channels are now correctly detected even for the most demanding source files...

The test clip I mostly use is the helicopter demo from here:
https://drive.google.com/open?id=0Bw...ElIcC1xTnF2Yk0
It has 2 audio tracks, but 3 audio streams. A nasty thing is that the second audio track contains an E-AC3 stream where MediaInfo reports 15 objects first, so A2D used to think that it had 15 audio channels.

This is now completely fixed, I tested at least 10 clips with 8-ch audio, and this new build always detected the correct number of channels.

There is a small glitch in the A2D GUI, though. For a source with 2 audio tracks users can switch the active audio track in the "View/Edit Titles" window. The change is correctly reflected in the AviSynth tab, and the preview also uses the selected audio track. But after selecting audio track #2 and pressing OK it is not possible to edit the title properties for audio track #2. Only track #1 shows up for editing, I found no way to select track #2.

As long as A2D detects the correct number of channels (which it does now) this is not a big problem, but it would be nice if it would get fixed.


The other bigger issue is for sources with more than 1 audio track. The "Helicopter" clip is a good example. The first audio track has two streams, so the index numbers for the audio get shifted if an FFMpeg based (i.e. stream based) software is used. If I specify to include both audio tracks in my project then FFMS2 will be called with "track=2" for the second audio track. This is wrong, to use the audio in the second audio track FFMS2 would have to be called with "track=3".

I cannot think of an automatic and foolproof way to fix this. It is the "culture clash" between enumerating audio track based or stream based. A foolproof workaround is to repack such source files into an MKV container before feeding them to AVStoDVD (MKVToolnix does this painlessly). When you feed this MKV into A2D every audio stream becomes a separate audio track again, and FFMS2 will use the correct track number for the second (or higher) audio track.


Whatever, thanks again for this latest build, it solves many problems...

Cheers
manolito
manolito is offline   Reply With Quote
Old 5th October 2020, 20:50   #3348  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
Quote:
I cannot think of an automatic and foolproof way to fix this. It is the "culture clash" between enumerating audio track based or stream based.
Maybe there is a way to determine if a track contains more than one audio stream by parsing the MediaInfo output. For a typical audio track with ATMOS/TrueHD plus an AC3 substream Mediainfo reports this:
Format profile : TrueHD+Atmos / TrueHD / AC-3
Channel(s) : Object Based / 8 channels / 6 channels


Both keys could be used IMO. An entry with "Atmos" or "Object Based" needs to be ignored, and if there are more than one entries left you will know that there is one or more additional substreams in this track. In the above example there is one substream, this means that 1 has to be added to the track number of the second and higher audio tracks for FFMS2 to work correctly.

For all the 8-ch clips I tested only the first audio track ever contained more than one stream, so it would not be hard to implement this. Of course I have no idea if higher audio tracks can also have more than one stream. If yes this would complicate the math to pass the correct track number to FFMS2.

Just an idea...

Cheers
manolito
manolito is offline   Reply With Quote
Old 5th October 2020, 22:08   #3349  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Thanks manolito for all the research. Frankly speaking I would not spend too much time to fix that mismatch between Mediainfo and FFmpeg. I don't know which program is handling properly the recent 8 channels audio tracks. Right now I prefer to stand by the window and see if the 2 apps come to a convergence. If not, I will second FFmpeg and for 2.9.0 release (2025 maybe? ) I can develop a new media info parser from FFprobe output (xml or json based).

Meanwhile I will add a new entry in the FAQ audio section, to suggest to use MKVtoolnix in case of "problematic" 8 channels tracks.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 6th October 2020, 01:08   #3350  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
I have my doubts that MediaInfo and FFMpeg will ever come to a convergence in this respect. And in 2025 nobody except a few geezers like you and me will even know that the DVD format ever existed...

But I do agree with your conclusion. It is hardly worth the trouble to make A2D foolproof for handling source videos with 8-ch audio, especially for ATMOS. Experienced users have a choice of several workarounds.

But still I have a hard time conceiling the fact that I am a perfectionist. It bugs me that software like DVDStyler which is completely FFMpeg based can handle such sources without problems, and AVStoDVD cannot...

This issue would not exist if DirectShowSource had a way to specify a specific audio track for decoding (like FFMS2 and LSMASH have). Probably this won't happen anytime soon.


Cheers
manolito
manolito is offline   Reply With Quote
Old 11th October 2020, 15:07   #3351  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
2.8.9 Final is out. No changes from latest Alpha+hotfix.

Two main items for next release: advanced preview under Win10 and switch from MediaInfo to FFprobe.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 11th October 2020, 22:19   #3352  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,912
for this new stable build...

Quote:
Originally Posted by MrC View Post
Two main items for next release: advanced preview under Win10 and switch from MediaInfo to FFprobe.
Sounds like you have no intention to abandon your baby...
Great news

The switch from MediaInfo to FFprobe could be a lot of work. Especially for 8-ch audio sources with a Dolby ATMOS track I can already see the pitfalls...


Cheers
manolito
manolito is offline   Reply With Quote
Reply

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 Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:06.


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