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 30th May 2018, 16:20   #3101  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by thescrapyard View Post
Attached is the file I'm trying to add back in as either AVstoDVD internal or as an added subs file. Either way the subs fail and are displayed as nothing but "?????????" on the video
Approval of the attachment could take a while, why don't you upload it somewhere else?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 31st May 2018, 13:10   #3102  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@thescrapyard

I guess the issue is related to the fact that SubtitlesCreator, the app used to convert from SRT to SUP, accepts only ANSI formatted text. If the input SRT file is formatted in UTF format (and your file should be like that), than A2D converts the content to ANSI. During conversion many special chars are lost, very likely cyrillic chars are lost as well.

BTW to be sure of that guess, let's wait for the russian subs file.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 31st May 2018, 13:57   #3103  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by MrC View Post
I guess the issue is related to the fact that SubtitlesCreator, the app used to convert from SRT to SUP, accepts only ANSI formatted text.
A program that deals with subtitles and doesn't support UTF-8 is ridiculous.
Isn't there another free program that can do that?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 3rd June 2018, 17:23   #3104  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
A fresh 2.8.8 release hotfix is available to download. It should address (very likely all) the issues manolito has kindly and with expertise highlighted about NTSC to PAL conversions.

There's also an implementation of FFmpeg stderr capture within VB code. No more need to go thru an external text file.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 4th June 2018, 03:58   #3105  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
It should address (very likely all) the issues manolito has kindly and with expertise highlighted about NTSC to PAL conversions.
Yes, this build does handle ALL the issues about NTSC to PAL conversions when importing OGM chapter files. Beautiful, this must have been a lot of work...

Quote:
Originally Posted by MrC View Post
There's also an implementation of FFmpeg stderr capture within VB code. No more need to go thru an external text file.
This feature does not work (yet) when my FF_Mod hack is active. I get an error window telling me
Runtime error 5, Invalid procedure call or invalid argument

Please note that this is not an FFmpeg error, it is an AVStoDVD error message. Running the hacked FFmpeg version with the command line issued by AVStoDVD causes no problems.


Cheers
manolito

Last edited by manolito; 4th June 2018 at 22:29.
manolito is offline   Reply With Quote
Old 5th June 2018, 13:39   #3106  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
This feature does not work (yet) when my FF_Mod hack is active. I get an error window telling me
Runtime error 5, Invalid procedure call or invalid argument

Please note that this is not an FFmpeg error, it is an AVStoDVD error message. Running the hacked FFmpeg version with the command line issued by AVStoDVD causes no problems.
The new VB routine to grab stderr output tries to grab the ffmpeg.exe.mod (renamed to ffmpeg.exe) stderr, but a bat file with exe camouflage has no stderr output.

BTW I have added in the Peak Level Check routine few lines to check if there is _ffmpeg.exe and if yes, then _ffmpeg.exe will be called instead of ffmpeg.exe, only for that scope.

Hotfix



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 6th June 2018, 00:20   #3107  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
BTW I have added in the Peak Level Check routine few lines to check if there is _ffmpeg.exe and if yes, then _ffmpeg.exe will be called instead of ffmpeg.exe, only for that scope.
Thanks MrC for this hotfix, and yes, it does of course fix the issue...

But I have the feeling that you are not all that eager to employ such workarounds (I wouldn't for sure). In the end it all comes down to another ugly rant about how the FFmpeg devs handle things...

Why in the world can't they just add a "logfile" parameter where users can specify a file location and name just like everybody else does? Instead they use stderr which must be redirected to a file. Even this is not done well, normally one would expect that only errors end up in stderr, the normal progress logging should go to stdout instead. But whatever, these guys will do what they want anyways, maybe they need to do it this way because FFmpeg needs to be multi-platform.

In this special case the executable which actually writes to stderr is the grandchild of the executable which A2D actually calls. Is there a way in VB6 to intercept stderr output of child or grandchild processes? Probably not...

For my audio analyzing needs I usually use BS1770Gain. For decoding it is based on FFmpeg, but it writes its results to a file directly, and it analyzes peak level and BS1770 (EBU R128) levels in one single pass. It is part of my Wavi_Mod plugin.


For the peak level analysis I do have one more request. Right now A2D offers to bring up the audio level to 0dB. If the final result is uncompressed PCM then this is fine. But for MP2 or AC3 output you should never go up to 0dB, a little headroom of at least 1dB is required.

For the old A2D normalizing there is a setting to only normalize to a lower value. But this value is a percentage, while the FFmpeg analysis and the AmplifydB command use Decibels. There is no linear relationship between these two, so it will be difficult to take the percentage (like 0.95) from the A2D audio settings and apply this reduction to the dB value of Amplifydb - like AmplifydB(FFmpeg peak result - 1). Maybe you should give up on the old AviSynth normalize altogether and instead use FFmpeg analysis -> AmplifyDB exclusively.


Cheers
manolito
manolito is offline   Reply With Quote
Old 6th June 2018, 23:38   #3108  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Two more issues found with the Audio Peak Level detection...
(This time it is not related to the FFmpeg-Mod hack)

1. If a title has more than 1 audio track then after analyzing the second track A2D will throw an error message:
Error 5 Invalid Procedure Call or Invalid Argument

2. If the title has been trimmed using the AviSynth tab then the selection will not be honored by the analysis. FFmpeg will analyze the whole audio track without regard to the selection.


Cheers
manolito
manolito is offline   Reply With Quote
Old 23rd June 2018, 17:15   #3109  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@manolito

the 1st issue has uncovered some weaknesses in general management of multiple audio tracks. A good amount of code lines has been refactored The 2nd issue was way easier to fix.

See the new hotfix.

As you suggested, I'm thinking about to drop classic AviSynth normalization and keep only the Peak Level Check + AmplifyDB routine. That's a more lean approach, I like the idea to drop the normalization option in Edit Title sections... but I would have to drop the normalization option in Preferences too... Still have to digest it ... I'm an old conservative man... and some users with the habit to normalize the world may complain. Do you have any advise?



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 28th June 2018, 14:14   #3110  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Hi MrC,

sorry for the late reply, but I just got back from my annual motorcycle trip. It was Scotland this time, real nice, and we had the greatest weather...

Just did some quick tests with the new hotfix, so far no problems...

There is a small cosmetic thing when detecting the audio peak for 2 audio tracks. The detection works nicely now, and the 2 AVS scripts use the correct gain values. Only under the Audio tab the displayed gain value is always the value of the last detection. Switching to the other audio track has no effect on the displayed gain value (under the AviSynth tab the different gain values are displayed correctly according to the selected audio track). Just cosmetic and probably easy to fix...

The audio range parameters in the detection command also work nicely, even though I do not really understand why the number of audio frames is different from the number of video frames in the trim command.


For the general normalization concept I do not really have any opinion. I suppose that you want to stick with the simple peak normalization (as opposed to ReplayGain or EBU R128 normalization or even Dynamic Range Compression).

In this case AviSynth normalization and peak detection/amplifydb are redundant, I would prefer ditching AviSynth normalizing. Under Preferences you could leave the normalize option, just change the target value from percentage to dB. If the user has normalization ticked under Preferences and does not explicitly do a peak level check then just do the peak check plus amplifydb silently (of course subtracting the target dB which was specified under Preferences). If the user does the peak level check then let the user decide if he wants to alter the gain or not, just like it works now. This should of course override the normalize setting under Preferences.

This should satisfy even users who want to normalize the world... But mostly these users do not really understand the concept of normalizing, they falsely assume that peak normalizing will result in a constant loudness.


Thanks again for your work,
Cheers
manolito

Last edited by manolito; 28th June 2018 at 14:17.
manolito is offline   Reply With Quote
Old 1st July 2018, 20:49   #3111  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Hi manolito,

I'm sure your trip in Scotland was memorable and finding good weather in Great Britain is a nice fluke!

Thanks for testing the new alpha. The cosmetic bug is quickly fixable. We agree that simple peak detection and avisynth normalization are redundant. Very likely I will drop Normalize in Edit Title > Audio. I think the more convenient way is to erase the Normalize option and to move the peak level check in the AviSynth tab, under Amplify Audio option. It will be a bit hidden, but I would say more elegant. Then, as you suggest, I can leave the Normalize option in Preferences > Audio (with a target dB textbox), to trigger the peak level check at runtime during project execution.

I think this approach is more streamlined and fine for standard users. More sophisticated users can still use manolito's ReplayGain or EBU R128 normalization extensions.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 1st July 2018, 22:36   #3112  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Yes, totally agreed...
Looking forward for the next Alpha.


Cheers
manolito
manolito is offline   Reply With Quote
Old 4th July 2018, 17:13   #3113  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Here is a slightly updated version of my plugin package for AVStoDVD. The download link is at the bottom of this post:
https://files.videohelp.com/u/172211...D%20Plugins.7z

Changes:
1. Added a new audio mode to the Wavi_Mod plugin. Now there is a new Dynamic Range Compression (DRC) mode using SoX. The parameters were taken from MkvToMp4 by oreons, I like the results very much. Optional EBU R128 postprocessing is available.

2. Added the file "Toggle_Plugins.bat". By executing this batch file both my FFmpeg based plugins (FF_VBR and Wavi_Mod) can be disabled or reenabled completely with one mouse click.

3. Updated documentation


Cheers
manolito


//EDIT//
Hardened the Wavi_Mod script against file names containing an exclamation mark. Please redownload...

Last edited by manolito; 19th July 2018 at 11:15.
manolito is offline   Reply With Quote
Old 6th July 2018, 21:35   #3114  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
I have a request for changing the handling of FFmpegSource...

It seems that many versions of ffms2 have a problem when fpsnum/fpsden are used to guarantee CFR output. A recent discussion was started here:
https://forum.doom9.org/showthread.p...39#post1845939

AVStoDVD is only rarely affected, but generally the safest workaround is to abandon the fpsnum/fpsden parameters completely and instead use ChangeFPS following the ffvideosource call. (I know that it was me pushing the use of fpsnum/fpsden, but this was before the issues became apparent).

For AVStoDVD this will require two changes:
1. The A2DSource.avsi must be changed. An updated file is here:
https://www.sendspace.com/file/7b2tux

2. If FFmpegSource is specified under "Preferences" then the A2D executable must be changed like this:
This script line
Quote:
Video = FFVideoSource("F:\Download\2 source.avi", track=-1, fpsnum=2997, fpsden=100, seekmode=0)
must become this
Quote:
Video = FFVideoSource("F:\Download\2 source.avi", track=-1, seekmode=0).ChangeFPS(2997, 100)
Cheers
manolito

Last edited by manolito; 7th July 2018 at 15:35.
manolito is offline   Reply With Quote
Old 7th July 2018, 15:26   #3115  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Thanks manolito for the plugins update and for the suggestion how to improve the handling of FFMS. I will have a look very soon. Meanwhile I have updated a new Alpha with the latest fixes.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 7th July 2018, 22:07   #3116  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks for the new Alpha,

did a couple of tests already, everything is fine so far...


Cheers
manolito
manolito is offline   Reply With Quote
Old 11th July 2018, 17:58   #3117  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
I found an issue with all versions of ffms2 with AAC-LATM audio streams. Unfortunately this evil audio format is one of the standards for German DVB-T2 broadcasts.

I posted the detailed problem plus a sample file here:
https://forum.doom9.org/showthread.p...72#post1846272

According to qyot27 a (sort of) working solution would be to index the source manually before calling ffaudiosource. But still the second audio track cannot be accessed.

LAVFilters have no problems with this audio format. But unfortunately AVStoDVD can only access the first audio track with DirectShowSource. For the second audio track ffmpegsource must be used.

I think that only very few users will be affected by this issue, it is probably not worth spending any time to fix it.


Cheers
manolito


//EDIT//
Turned out that it was surprisingly difficult to find a workaround for such sources to make them work in AVStoDVD. It is easy if you only need the first audio track, but if the second track is also needed (and you want audio to be in sync) then only methods which do not use AviSynth for audio seem to work.

Specifying "FFmpeg Safe Mode" under preferences works, but there is no way to process audio. The other option is to use FFmpeg to preprocess the source. I use dmMediaConverter as the front end for FFmpeg. Repacking the source to MKV, using copy mode for video and converting both audio tracks to AC3 did the trick. The front end makes it easy to use built-in FFmpeg audio filters, and the AC3 encoder is first rate. Then feed the resulting MKV to AVStoDVD and use Direct Stream Copy for the audio tracks. This is my preferred method.

Last edited by manolito; 13th July 2018 at 22:51.
manolito is offline   Reply With Quote
Old 19th July 2018, 21:08   #3118  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
I have a request for changing the handling of FFmpegSource...

It seems that many versions of ffms2 have a problem when fpsnum/fpsden are used to guarantee CFR output. A recent discussion was started here:
https://forum.doom9.org/showthread.p...39#post1845939

AVStoDVD is only rarely affected, but generally the safest workaround is to abandon the fpsnum/fpsden parameters completely and instead use ChangeFPS following the ffvideosource call. (I know that it was me pushing the use of fpsnum/fpsden, but this was before the issues became apparent).

For AVStoDVD this will require two changes:
1. The A2DSource.avsi must be changed. An updated file is here:
https://www.sendspace.com/file/7b2tux

2. If FFmpegSource is specified under "Preferences" then the A2D executable must be changed like this:
This script line

must become this


Cheers
manolito
I have had a quick look to the mentioned thread, and, frankly speaking , I would not alter the current A2D code to deal with similar AVI titles. Also, the approximation to use 2997/100 config should be safer than the more accurate 30000/1001

Quote:
Originally Posted by manolito View Post
I found an issue with all versions of ffms2 with AAC-LATM audio streams. Unfortunately this evil audio format is one of the standards for German DVB-T2 broadcasts.

I posted the detailed problem plus a sample file here:
https://forum.doom9.org/showthread.p...72#post1846272

According to qyot27 a (sort of) working solution would be to index the source manually before calling ffaudiosource. But still the second audio track cannot be accessed.

LAVFilters have no problems with this audio format. But unfortunately AVStoDVD can only access the first audio track with DirectShowSource. For the second audio track ffmpegsource must be used.

I think that only very few users will be affected by this issue, it is probably not worth spending any time to fix it.


Cheers
manolito


//EDIT//
Turned out that it was surprisingly difficult to find a workaround for such sources to make them work in AVStoDVD. It is easy if you only need the first audio track, but if the second track is also needed (and you want audio to be in sync) then only methods which do not use AviSynth for audio seem to work.

Specifying "FFmpeg Safe Mode" under preferences works, but there is no way to process audio. The other option is to use FFmpeg to preprocess the source. I use dmMediaConverter as the front end for FFmpeg. Repacking the source to MKV, using copy mode for video and converting both audio tracks to AC3 did the trick. The front end makes it easy to use built-in FFmpeg audio filters, and the AC3 encoder is first rate. Then feed the resulting MKV to AVStoDVD and use Direct Stream Copy for the audio tracks. This is my preferred method.
That's weird because it could become a general issue if the AAC-LATM standard will become popular. Do you know if qyot27 has plans to finally fix that?

An actual workaround for A2D could be to demux the 2nd (and above) track when a containing title is added. Not very elegant indeed. By the way I can add an entry to the FAQ/Audio section.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 20th July 2018, 00:16   #3119  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
I have had a quick look to the mentioned thread, and, frankly speaking , I would not alter the current A2D code to deal with similar AVI titles. Also, the approximation to use 2997/100 config should be safer than the more accurate 30000/1001
I agree, most A2D users will never be affected by this ffms2 issue. BTW is there any situation at all where A2D will issue 1001 as the denominator? Because only then there is a problem. Using 23976/1000 works while 24000/1001 does not.

Whatever, what really bugs me is that there is no error message at all, you only see the problem if you step through the frames. And it must be a pretty stupid error because the old version 2.17 of ffms2 behaves just fine.

Quote:
Originally Posted by MrC View Post
That's weird because it could become a general issue if the AAC-LATM standard will become popular. Do you know if qyot27 has plans to finally fix that?

An actual workaround for A2D could be to demux the 2nd (and above) track when a containing title is added. Not very elegant indeed. By the way I can add an entry to the FAQ/Audio section.



Bye
I have no idea if qyot27 cares for this problem at all. ffms2 depends on a couple of external libraries and headers, he has no control over these assets.

Demuxing the 2nd and above audio tracks does not work within A2D. FFmpeg tries to save the AAC-LATM audio tracks as standard AAC tracks, and this is not supported. The demuxed tracks come out totally silent.


Cheers
manolito
manolito is offline   Reply With Quote
Old 20th July 2018, 12:28   #3120  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
BTW is there any situation at all where A2D will issue 1001 as the denominator? Because only then there is a problem. Using 23976/1000 works while 24000/1001 does not.
1001 is never used within A2D code

Quote:
Originally Posted by manolito View Post
Demuxing the 2nd and above audio tracks does not work within A2D. FFmpeg tries to save the AAC-LATM audio tracks as standard AAC tracks, and this is not supported. The demuxed tracks come out totally silent.
Got it. Do you have a small sample with AAC-LATM audio track?

Thanks



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC 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 20:10.


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