View Full Version : AVStoDVD Support Thread
Groucho2004
30th May 2018, 16:20
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?
@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
Groucho2004
31st May 2018, 13:57
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?
A fresh 2.8.8 release hotfix is available to download (https://sites.google.com/site/avstodvdmain/AVStoDVD_288_Alpha180603_Hotfix.7z). 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
manolito
4th June 2018, 03:58
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...
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
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 (https://sites.google.com/site/avstodvdmain/AVStoDVD_288_Alpha180605_Hotfix.7z)
;)
Bye
manolito
6th June 2018, 00:20
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... :cool:
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
6th June 2018, 23:38
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
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 (https://sites.google.com/site/avstodvdmain/AVStoDVD_288_Alpha180623_Hotfix.7z).
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
manolito
28th June 2018, 14:14
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... :p 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
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
manolito
1st July 2018, 22:36
Yes, totally agreed...
Looking forward for the next Alpha.
Cheers
manolito
manolito
4th July 2018, 17:13
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/Manolito_s%20A2D%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...
manolito
6th July 2018, 21:35
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.php?p=1845939#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
Video = FFVideoSource("F:\Download\2 source.avi", track=-1, fpsnum=2997, fpsden=100, seekmode=0)
must become this
Video = FFVideoSource("F:\Download\2 source.avi", track=-1, seekmode=0).ChangeFPS(2997, 100)
Cheers
manolito
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 (https://sourceforge.net/projects/avstodvd/files/avstodvd_alpha_beta/AVStoDVD%202.8.8%20Alpha%20180706/) with the latest fixes.
;)
Bye
manolito
7th July 2018, 22:07
Thanks for the new Alpha,
did a couple of tests already, everything is fine so far...
Cheers
manolito
manolito
11th July 2018, 17:58
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.php?p=1846272#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.
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.php?p=1845939#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 ;)
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.php?p=1846272#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
manolito
20th July 2018, 00:16
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.
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
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 ;)
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
manolito
20th July 2018, 14:16
Got it. Do you have a small sample with AAC-LATM audio track?
Thanks
;)
Bye
Sure, the link still works...
https://www51.zippyshare.com/v/KY10rZkC/file.html
It is not just this file, it applies to all captured files from stations which use AAC-LATM. About half of the public broadcasters in Germany use this audio format, the other half use E-AC3. Since you fixed A2D recently so it no longer confuses E-AC3 with standard AC3 these captures do work nicely with A2D.
Cheers
manolito
//EDIT//
When I said that mts files with E-AC3 audio tracks work nicely in A2D I forgot to mention that audio delay correction is a little bit tricky with such transport streams (could well be an issue with MediaInfo). The reported delay may be something like -1500 ms for both audio tracks. For a perfect result the delay correction for the first track (the one which is decoded with DirectShowSource) must be disabled. For the second track (the one which gets decoded by ffms2) the delay correction must be applied, but it needs to be reversed. So the "-" sign in the "DelayAudio" command has to be removed.
//EDIT2//
It gets even more confusing. The above behavior only applies when the A2D default settings are used, i.e. DSS2Mod/LavFilters for video, DirectShowSource/LAVFilters for the first audio track and FFmpegSource for the second audio track. If the user forces FFmpegSource for video and audio under "Preferences" then the audio delay correction must be disabled for both audio tracks. Weird...
Sure, the link still works...
https://www51.zippyshare.com/v/KY10rZkC/file.html
Could you upload the file elsewhere? When I click on "Download Now" from zippyshare site, I have to download and install first the app "MessengerTime"... I really don't...
;)
Bye
manolito
21st July 2018, 21:44
Sorry for the zippyshare trouble. I always use a custom hosts file from
winhelp2002.mvps.org/hosts.htm
so I never experienced these issues.
You can get the file here:
https://www.zeta-uploader.com/2097415887
and here:
https://we.tl/8EraIY43vo
Let me know if you also need a captured mts file with E-AC3 audio.
Cheers
manolito
Hi manolito, zeta-uploader works ;)
Yes, please, upload the mts with e-ac3 too
;)
Bye
manolito
22nd July 2018, 16:30
No problem, here it is:
https://www.zeta-uploader.com/2130213520
Unfortunately I could not find a station which broadcasts with 2 different audio languages at the moment.
Cheers
manolito
About the mts with aac-latm, switching to FFmpeg Safe Mode for audio encoding is the better workaround. With FFmpeg Safe Mode the audio delay is ignored, and for this capture is the right thing. Somehow MediaInfo is exposing a wrong delay.
I have found that remuxing the mts to mkv has some benefits: the filesize decreases a lot (padding within the mts?) and FFMS2 is now able to decode the 2nd aac track. In this case, major drawback, the audio delay is messed up even more. Again, FFmpeg Safe Mode with the remuxed mkv works as well.
Still to test the mts with e-ac3
;)
Bye
manolito
23rd July 2018, 02:10
About the mts with aac-latm, switching to FFmpeg Safe Mode for audio encoding is the better workaround. With FFmpeg Safe Mode the audio delay is ignored, and for this capture is the right thing. Somehow MediaInfo is exposing a wrong delay.
This is what I said in my first post about the problem:
Specifying "FFmpeg Safe Mode" under preferences works, but there is no way to process audio.
This may be all which most users need, but others like me really like to be able to manipulate the audo tracks.
I have found that remuxing the mts to mkv has some benefits: the filesize decreases a lot (padding within the mts?) and FFMS2 is now able to decode the 2nd aac track. In this case, major drawback, the audio delay is messed up even more. Again, FFmpeg Safe Mode with the remuxed mkv works as well.
I agree, I always do this with HEVC transport streams, but mainly for the video track. None of the available source filters does a decent job seeking within such sources. Finding the right cut points when trying to cut out parts is painful. MKV is a much better format to do this.
Great that you found out that ffms2 can decode AAC-LATM when it is in an MKV container, I did not have this situation on my screen. And the messed up audio delay actually is not too challenging. You just need to use the delay value reported by MediaInfo, only reverse the prefix. Just remove the "-" prefix from the "DelayAudio" command.
My take on the whole issue is that such captured transport streams always have non-decodable B-Frames at the beginning. And all the available source filters have different ways how they treat these non-decodable frames. Luckily we only need to deal with DirectShow based source filters and ffms2 (Donald Graft handles such sources differently again).
Cheers
manolito
manolito
23rd July 2018, 19:08
I am trying to find a fool proof work flow for such captured MTS transport streams which allows me to add audio filters and does not have any audio delay problems. And I believe that I found such a work flow... ;)
These are the steps:
1. Repack the source to MKV while converting the audio tracks to PCM. Here is a universal FFmpeg command line for this task:
ffmpeg.exe -fflags +genpts -y -i "ONE.mts" -map 0:0 -c:v:0 copy -aspect:v:0 16:9 -map 0:1 -c:a:0 pcm_s24le -map 0:2 -c:a:1 pcm_s24le -shortest "ONE.mkv"
2. In AVStoDVD preferences disable audio delay correction AND force FFmpegSource for video and audio.
So far I tested 6 different captured sources, and they all came out in perfect sync. During the remuxing to MKV there are dozens of FFmpeg warnings at the beginning, but the garbled non-decodable frames are removed perfectly.
Cheers
manolito
@manolito
great, thanks for sharing the workflow
;)
Bye
manolito
6th August 2018, 14:33
New versions of my A2D plugins...
https://files.videohelp.com/u/172211/Manolito_s%20A2D%20Plugins.7z
Changes:
For the FF_VBR and the HC_Mod plugins I added an option to append a Prefetch() command to the end of the AVS script generated by AVStoDVD. This is for users of AVS+ who want to automatically enable multithreading.
Cheers
manolito
thescrapyard
19th August 2018, 14:51
Bit of a strange error/bug here
Setting up a project everything is fine, but if I save any project then load it again, a few lines have been added onto the end of the avisynth scripts which then causes it to fail with a script error
I've tried literally running AVStoDVD, setting up a very simple project and saving it without touching any settings or fiddling with anything. Loading the project straight back into AVstoDVD gives the extra lines
No ideas where they are being added from, or why
All that has been done is use the A2DPlugins for FFMPEG, HCEnc and WAVI mods. These have always worked perfectly
The scripts still work as they should, BUT the extra lines have to be removed first from any loaded project or it fails with an error
The lines added to the end of AVISynth scripts for any project that has been saved and then loaded are :
AVSDelayAudio1: 0
AudioDelay1: 0
AVSAmplifyAudio1: 0
AudioAmplify1: 1
But I haven't changed any settings. Just tried saving a job list then loading it. Nothings changed, so seems to be an issue with saving and loading projects only
Thanks
manolito
19th August 2018, 15:54
This post is in the wrong thread. It should be moved to the "AVStoDVD Support Thread". Can a moderator please move the post...
[moved from Avisynth+ thread]
But you are right, you have discovered a bug in the latest AVStoDVD versions. I can confirm it under version 2.8.8 Alpha, I have no idea when this regression was introduced. I also tested if my plugins have anything to do with it, but they don't.
Some work for MrC... :devil:
Cheers
manolito
//EDIT//
This regression was introduced with version 2.8.8 Alpha. Probably issues with the new code which was needed for the audio peak level detection. Going back to version 2.8.7 stable solves the problem.
MrC
22nd August 2018, 22:06
Yes, there's a load project routine section not updated after the introduction of the peak level detection feature. My bad. I will fix it asap, together with a better management of the peak level stuff.
Thanks for the report.
;)
Bye
thescrapyard
23rd August 2018, 08:36
Yes, there's a load project routine section not updated after the introduction of the peak level detection feature. My bad. I will fix it asap, together with a better management of the peak level stuff.
Thanks for the report.
;)
Bye
Thanks. At least it wasn't me messing about with things again
manolito
3rd September 2018, 02:09
@MrC
Sorry I have to bug you with another request to change the A2D behavior for progressive 23.976 clips with pulldown flags... :eek:
Turns out that some of my previous findings about source filter behavior for such sources were wrong.
https://forum.doom9.org/showthread.php?p=1850321#post1850321
These statements are not true:
The problem with A2D is that whenever DSS2Mod or DirectShowSource or FFmpegSource is used then the frame rate reported by MediaInfo is included in the call for the source filter. This will give incorrect results. If MediaInfo reports 2:3 pulldown then the frame rate for the source filter call should be 29.97 (or it could be omitted).
The reason for this incorrect behavior is that all the above source filters have no option to remove pulldown flags with a "Forced Film" option like DGIndex. They all honor the pulldown flags and serve a "pseudo-interlaced" output to AviSynth.
I recently did some more thorough tests about source filter behavior for such sources, have a look here:
https://forum.doom9.org/showthread.php?p=1850321#post1850321
Mainly AVStoDVD should use these procedures for the different source filters:
1: DGIndex / DGDecode
Basically leave it as it is. Only add the D2V parameter to the TFM call like:
TFM(d2v="my_d2v_file").TDecimate()
2: FFmpegsource
Use 23.976 as the fps value. Do not invoke IVTC
3: DSS2Mod and DirectShowSource
Use 23.976 as the fps value. Do not invoke IVTC
FFmpegSource does not honor the pulldown flags. When called without fpsnum/fpsden it will decode to 23.976.
DSS2Mod and DirectshowSource when called without an "fps=" parameter will decode to 29.97. But this is misleading because it does not honor the pulldown flags. Instead it decodes to 23.976 first and then adds duplicate frames to reach the 29.97 frame rate. Quite stupid. A2D should add the "fps=23.976" parameter to avoid this stupid behavior.
Alright, you won't like these new findings, I apologize for having misled you. The DSS2Mod/DirectShowSource way of outputting 29.97 but with dupes instead of repeated fields got me on the wrong track.
Cheers
manolito
manolito
6th September 2018, 01:08
Bug report for the latest version 2.88 Alpha
-------------------------------------------------
When converting a PAL progressive DVD title (in an MKV container) to NTSC with HCenc, then AVStoDVD applies pulldown twice. First by putting "*PULLDOWN" into the HC.ini, then again by using DGPulldown. I think that doing this only once would be better... :devil:
Here is the relevant part of the log:
<06.09.2018 01:35:25>
START VIDEO ENCODING OPERATIONS
Video Encoding Profile: HCenc VBR 1-pass
Target Video FileSize: 4180 MB
Encoding Parameters: -ini "D:\DVD_test.HCenc.ini"
HCenc ini file:
*INFILE D:\DVD_test_1.avs
*AVSRELOAD
*OUTFILE D:\DVD_test.m2v
*LOGFILE D:\DVD_test.HCenc.log
*MAXBITRATE 8724
*1PASS
*BITRATE 5580
*PROFILE NORMAL
*ASPECT 16:9
*PROGRESSIVE
*TFF
*PULLDOWN
*BIAS 60
*DC_PREC 9
*MATRIX MANONO1
*AQ 2
*LUMGAIN 2
*SMP
*PRIORITY IDLE
*DBPATH D:
*WAIT 2
<>
<06.09.2018 01:49:41>
END VIDEO ENCODING OPERATIONS
Video Source Filter: A2DSource - DSS2 mod (LAV Filters on)
Created File: D:\DVD_test.m2v (4182,2 MB)
Ouput Video Info: MPEG-2 Video - 5583 kbps - 720x480 - DAR 16:9 - 29,97 fps - Progressive (2:3 Pulldown) - 1:44:44 hours - 188318 frames
Avg Video Encoding Speed: 223,4 fps
<>
<06.09.2018 01:49:41>
START PULLDOWN OPERATIONS
DGPulldown Parameters: "D:\DVD_test.m2v" -srcfps 29.97 -destfps 29.97 -inplace -tff
<>
<06.09.2018 01:51:49>
END PULLDOWN OPERATIONS
DGPulldown executed on File: D:\DVD_test.m2v (4182,2 MB)
Output Video Info: MPEG-2 Video - 6979 kbps - 720x480 - DAR 16:9 - 29,97 fps - Progressive (TFF) - 1:23:47 hours - 150656 frames
<>
<06.09.2018 01:51:59>
Process halted during Title 1 VIDEO encoding operations.
Error Message: 'Warning! Title 1 output Video duration (01:23:47) is shorter than expected duration (01:44:44).'
This issue might have been there for a while, I do NTSC conversions only rarely.
Cheers
manolito
MrC
1st October 2018, 22:28
@manolito
back from job marathon...
Thanks for the bug report about the double pulldown procedure. It was a recent entry, after the re-definition of NTSC progressive w/ pulldown flags framerate as 29.97 (2:3 pulldown) instead of 23.976 (2:3 pulldown). Very easy to fix.
About the other post (https://forum.doom9.org/showpost.php?p=1850490&postcount=3135), I will take a careful look. My time for A2D is running so low that I have to be absolutely sure in making changes to the code in order not to insert more damages than gains. I'm sure you can understand. From the link you reported (https://forum.doom9.org/showthread.php?p=1850321#post1850321) the discussion was way long: after sept 3rd (your post here), solutions #1, #2, #3 are still valid from your more recent findings?
;)
Bye
manolito
1st October 2018, 23:51
Hi MrC,
good to see you back after more than a month (I had hoped that you were on a nice and long vacation...).
For the NTSC progressive with pulldown sources, yes, the 3 solutions are still valid, but only #1 is really fool proof. DSS2Mod and ffms2 have problems with such sources no matter which settings are used.
If the MPEG2 video is in an MKV container, the MKV should probably be demuxed first, then use DGIndex/DGDecode for the video and add the other streams manually. Mr. Graft indicated in the linked thread that he might expand DGIndex to support MPEG2 in an MKV container, but I have no idea if this will materialize.
For ffms2 a working solution is to add "RFFMode=1" to the command line which will honor the pulldown flags. But the field order needs to be the reverse value of the DGIndex field order. Not something the average user wants to deal with.
Another thing you might want to add to the next stable version is AVS+ support. I have been using it on my Core i5 laptop for some time now without any issues. It was requested by steptoe at VideoHelp, see here:
https://forum.videohelp.com/threads/277852-AVStoDVD-Support-Thread/page124#post2526075
It basically comes down to adding a "Prefetch" call at the end of the AVS script after detecting if AVS+ is installed. The number of threads can be determined automatically, Myrsloik proposed this formula:
max(physical cores, min(logical threads, 8))
I have already integrated it into my FF_VBR and HCenc_Mod plugins, but most folks probably do not use them... :devil:
Cheers
manolito
SuLyMaN
2nd October 2018, 12:16
@mrc Heh man It's been a while since I posted there as I simply am not making an DVDs at the moment. I have shifted to converting my stuffs and watching them on TV via a TV Box.
So, until I need the wonderful piece of free software that is AVStoDVD, a big thank you for the work. Top level software!
manolito
8th October 2018, 00:17
Just found another bug when dealing with clips with more than 1 audio tracks:
With the default source configuration (A2DSource) DirectShow will be used for audio. But only for the first audio track, because DirectShowSource does not allow track selection. The second and third audio tracks will use FFmpegSource because it allows track selection.
This works nicely as long as DirectShowSource picks the first audio track of the source clip. But I found that this is not always true. The sample clip from this post
https://forum.doom9.org/showthread.php?p=1854124#post1854124
has 3 audio tracks, and the second one is marked as "default". For this clip DirectShowSource will pick the second (default) audio track as the first audio track, and A2D will throw an error because the number of channels is different for the two tracks.
The only workaround I can think of so far is to not use DirectShowSource Audio at all for such sources, force using FFmpegSource instead. This will treat the track numbers correctly, but the "Default" audio track flag will be lost. Does MPEG2 even support this flag at all?
Cheers
manolito
thescrapyard
8th October 2018, 14:42
Just found another bug when dealing with clips with more than 1 audio tracks:
With the default source configuration (A2DSource) DirectShow will be used for audio. But only for the first audio track, because DirectShowSource does not allow track selection. The second and third audio tracks will use FFmpegSource because it allows track selection.
This works nicely as long as DirectShowSource picks the first audio track of the source clip. But I found that this is not always true. The sample clip from this post
https://forum.doom9.org/showthread.php?p=1854124#post1854124
has 3 audio tracks, and the second one is marked as "default". For this clip DirectShowSource will pick the second (default) audio track as the first audio track, and A2D will throw an error because the number of channels is different for the two tracks.
The only workaround I can think of so far is to not use DirectShowSource Audio at all for such sources, force using FFmpegSource instead. This will treat the track numbers correctly, but the "Default" audio track flag will be lost. Does MPEG2 even support this flag at all?
Cheers
manolito
I thought it was me, but I've had this issue a few times with multiple audio tracks
I also had issues with sometimes you end up with the default audio track which may not be the audio track you actually want, even though you chose something different as the ONLY audio track. I found the easiest way aroudn this problem was to use MKVToolnix and just strip what audio you don't want and try again ...
imsrk48
10th October 2018, 12:15
how to make any mkv or mp4 into DVD player playable format??
manolito
10th October 2018, 14:04
Download AVStoDVD (the installer version), install the required helper software if it's not already installed (AviSynth, LAVFilters, optionally IMGBurn), then install AVStoDVD. Leave all settings at their defaults for now.
Have a look at the documentation to familiarize yourself with the GUI interface. Load your source file(s) and click "Start".
If AVStoDVD is too complicated for you, I suggest to try DVDFlick v2 (get it at VideoHelp). It is based on FFMpeg, very easy to use and delivers more than acceptable quality.
Cheers
manolito
imsrk48
11th October 2018, 18:38
Thanks buddyDownload AVStoDVD (the installer version), install the required helper software if it's not already installed (AviSynth, LAVFilters, optionally IMGBurn), then install AVStoDVD. Leave all settings at their defaults for now.
Have a look at the documentation to familiarize yourself with the GUI interface. Load your source file(s) and click "Start".
If AVStoDVD is too complicated for you, I suggest to try DVDFlick v2 (get it at VideoHelp). It is based on FFMpeg, very easy to use and delivers more than acceptable quality.
Cheers
manolito
manolito
14th December 2018, 04:35
Found a tiny little issue in the latest non-public Alpha:
The WEBM format was added a short while ago to the officially supported formats. Works perfectly when opening source files, but under "Tools/Demux" the WEBM extension is not included in the "all supported formats" file mask. Adding a WEBM file by specifying a "*" character in the "file open" field works fine, the file gets demuxed perfectly.
Cheers
manolito
manolito
24th December 2018, 10:02
And another year is almost over...
A Merry Christmas and a Happy New Year to everone,
Cheers
manolito
Sir Didymus
24th December 2018, 18:59
Best wishes from my side too, to you Manolito, for the impressive contributions you have given in the years to the doom9 community, to MrC for the great work of coding and support on AVStoDVD, to all forum users and your families...
Cheers,
sd
MrC
28th December 2018, 17:52
@manolito
thanks for the tiny bug report... final 2.8.8 should see the light before New Year's Eve ;)
@manolito, SD, all
happy holidays to everybody, I wish you all the best for the upcoming 2019
;)
Bye
MrC
29th December 2018, 12:00
OK, 2.8.8 final release is out (https://sourceforge.net/projects/avstodvd/files/avstodvd/AVStoDVD%202.8.8/).
No major updates from latest 2.8.8 alpha. Cumulative change log from 2.8.7:
- Some bugs fixed
- Added 'Audio Peak Level Check' feature in 'Title Edit'/'AviSynth'/'Audio'/'Delay Audio' option
- Added support to OGG chapters txt format (timestamps) in 'Title Edit'/'Chapters'/'Import Chapters' routine
- Added management of 'Default=Yes/No' audio and subs tracks tags from MediaInfo, instead of assuming that 1st track is the default one
- Improved 'Title Edit'/'Chapters'/'Export Chapters' routine
- Improved source chapters detection routine (now it works again for IFO/DVD files)
- Improved handling of NTSC progressive sources with pulldown flags
- MKVToolNix updated to release 23.0.0
- MediaInfo updated to release 18.03
- LAV Filters updated to release 0.73.1
;)
Bye
manolito
29th December 2018, 16:14
Thanks very much MrC, works beautifully... :thanks:
And again a happy new year to you and your family, hopefully with a little less stress.
Cheers
manolito
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.