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 > Capturing and Editing Video > Avisynth Development

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 22nd May 2015, 08:35   #1161  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,901
Quote:
Originally Posted by stax76 View Post
I can upload the file no problem...
In that case just do it, videoh even asked for it. You've nothing to loose.
jpsdr is offline  
Old 22nd May 2015, 10:29   #1162  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,718
random DVB recording I recorded for testing purpose.

KabelBW, Germany, DVBViewer, ZDF HD, TS, AVC, MP2, 720p, 50fps

http://www.mediafire.com/download/wx....0_-_ZDF_HD.ts

Code:
General

ID                        : 1079
Audio_Codec_List          : MPEG-1 Audio layer 2
Audio_Language_List       : German
Codec/String              : MPEG-TS
FileSize/String4          : 676.7 MiB
Duration/String1          : 7mn 29s 961ms
OverallBitRate/String     : 12.6 Mbps
FrameRate/String          : 50.000 fps
FrameCount                : 22481
StreamSize/String         : 34.4 MiB (5%)
File_Created_Date_Local   : 2012-02-05 14:35:16.103
File_Modified_Date_Local  : 2010-09-27 11:07:12.806

Video

ID                        : 6110
Format_Profile            : Main@L4
Codec/String              : AVC
Duration/String1          : 7mn 29s 620ms
BitRate_Mode              : VBR
BitRate/String            : 11.7 Mbps
Width/String              : 1 280 pixels
Height/String             : 720 pixels
PixelAspectRatio          : 1.000
DisplayAspectRatio/String : 16:9
FrameRate/String          : 50.000 fps
FrameCount                : 22481
Resolution/String         : 8 bits
ScanType                  : Progressive
StreamSize/String         : 629 MiB (93%)

Audio

ID                        : 6120
Format_Profile            : Layer 2
Codec/String              : MPEG-1 Audio layer 2
Duration/String1          : 7mn 29s 856ms
BitRate_Mode              : CBR
BitRate/String            : 256 Kbps
Channel(s)/String         : 2 channels
SamplingRate/String       : 48.0 KHz
FrameCount                : 18744
Compression_Mode          : Lossy
Video_Delay               : -1053
StreamSize/String         : 13.7 MiB (2%)
Language/String           : German

Menu

ID                        : 6100
Codec/String              : AVC / MPA1L2 /  /  /  /  /
Duration/String1          : 7mn 29s 961ms
Language/String           : / German
stax76 is offline  
Old 22nd May 2015, 10:33   #1163  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,451
Thank you. Investigating...
videoh is offline  
Old 22nd May 2015, 14:32   #1164  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,451
OK, I tested DGDecNV because you said that is not working for you also. I find that it is operating correctly as designed. To show this, I loaded your file and saved project. Then I made this script:

loadplugin("dgdecodenv.dll")
loadplugin("nicaudio.dll")
vid=dgsource("720p - AVC - MP2 2.0 - ZDF HD.dgi")
aud=nicmpg123source("720p - AVC - MP2 2.0 - ZDF HD PID 17e8 L2 2ch 48 256 DELAY -1444ms.mp2").delayaudio(-1.444)
audiodub(vid,aud)

Playing the script in VirtualDub, everything is in sync, showing that DGDecNV is operating correctly as designed.

I also did it by first demuxing the 264 ES using DGIndexNV and then did the above but starting with the demuxed file. The result was the same, ie., in sync.

Then I used mkvtoolnix to mux the 264 ES and the audio, specifying the delay adjustment with --sync. The result was out of sync. I also did a delay cut edit of the audio and then made the MKV again but without --sync. The result was again out of sync.

So the question is why are things out of sync in the MKV? The answer is that there are a lot of leading non-IDR/I frames before the first IDR/I (your stream was not cut at a GOP). DGDecNV is designed to replace those frames with copies of the first IDR/I frame, and the audio is demuxed starting from the beginning. But mkvtoolnix discards all those frames and that is what leads to async.

Every demuxer has to align the starts of the audio and video *as the demuxer sees things*. Other demuxers may discard the leading frames and start the audio demux later at the first I frame. DGDecNV, however, tries to retain all the frames, so it starts the audio demux much earlier.

If we had to assign "blame" anywhere, it is in the assumptions of your workflow, which are incorrect. By using DGDecNV demuxing you are committing to using a muxer that retains all the leading non-IDR/I frames, but the muxer you chose does not do so. For your workflow, a demuxer like eac3to would be suitable.

Conclusion: DGDecNV is operating correctly as designed. Your hybrid workflow makes incorrect assumptions, so DGDecNV demuxing is not suitable for your workflow, but it is not broken. I would respectfully ask you not to jump to conclusions and say some tool is a failure, before consulting with the developer. That is surely what you expect from staxrip users, isn't it?

Last edited by videoh; 22nd May 2015 at 14:42.
videoh is offline  
Old 22nd May 2015, 14:43   #1165  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,999
Interesting source file...
I do not do many HD conversions (oldfashioned DVD guy), but opening HD sources happens frequently, so I played a little with this source:

First of all I ran the file through TSDoctor, but this had no influence at all for the sync issue. The processed file had a slightly shorter audio delay (1005ms instead of 1053ms), and it was significantly shorter than the original. But it did not solve the sync issues.

Trying a conversion to DVD I first opened the video with ffvideosource (audio through DirectShowSource). I had to use the old version 2.17 because all later versions do not run on my machine (SSE2 problem). Result: Terrible audio desync.


Next I used DSS2Mod for video (preroll = 15, otherwise default settings). LAVFilters 0.65 were used.

Result:
When the reported audio delay of 1053ms was corrected, the result was out of sync. But when I ignored the audio delay, I got a perfect conversion without any sync problems. (The TSDoctor processed file gave the same result).

This confirmed my previous experience with the DSS2Mod / LAVFilters combination. Whenever MediaInfo reports an audio delay greater than 100ms, just ignore it and get a perfect result.


Just for fun I then processed the file with the old StaxRip version 1.1.9.0. StaxRip automatically selected DirectShowSource as the source filter (LAVFilters were installed), and I got a resulting file which was in perfect sync.


Cheers
manolito

Last edited by manolito; 22nd May 2015 at 14:56.
manolito is offline  
Old 22nd May 2015, 14:47   #1166  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,451
Thanks, manolito, for the input on this. You have underlined the point that tools must be combined in the right way, taking into account their specific designs and behavior. One can't assume that any combination of tools will do what one wants, and one can't call them broken because one makes an incorrect assumption about how they operate.

So the idea that staxrip can just allow free choice of source filters, etc., without regard to how they are combined is asking for trouble.

Last edited by videoh; 22nd May 2015 at 15:10.
videoh is offline  
Old 22nd May 2015, 15:02   #1167  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,999
Thanks videoh for explaining how your source filters work differently than other source filters.

I noticed this whenever I converted a DVD (or MPEG2) source. AVStoDVD gives me a choice in these cases to either use DGIndex / DGDecode or to use DSS (or DSS2Mod or whatever). When I use DGIndex, I need to honor the reported audio delay even if it is very large. For DSS2Mod I always have to discard large delay values.

So far I had no explanation for this behavior, but now I do...


Cheers
manolito
manolito is offline  
Old 22nd May 2015, 15:14   #1168  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,451
An aside on why DGDecNV does things this way. Suppose you have a stream with a bunch of leading B frames. If you discard them, you have to discard audio too. But what if it's a song or a narration...you don't want to truncate the audio at the beginning. The philosophy is to deliver an output frame for all coded input frames. It just seems like the right thing to do if you want to claim frame accuracy. The user asks for frame N; he shouldn't have to adjust the number depending on how many leading B frames there are. Well, that's my take on things.

I suppose that is why CUVID and MSDK also deliver an output frame for all coded frames, regardless of frame type. That way there is also no need to coordinate with the audio. E.g., how could CUVID signal that is dropping some leading frames or not?

I had to jump through hoops when making DGAVCDec to work around the fact that libav was discarding leading B frames. That's one reason why I decided to stop using libav.

Last edited by videoh; 22nd May 2015 at 15:24.
videoh is offline  
Old 22nd May 2015, 18:05   #1169  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,268
Quote:
Originally Posted by manolito View Post
Trying a conversion to DVD I first opened the video with ffvideosource (audio through DirectShowSource). I had to use the old version 2.17 because all later versions do not run on my machine (SSE2 problem). Result: Terrible audio desync.
Not that it would necessarily do anything to the desync issue, but the C-plugin builds are more lax about this.
qyot27 is offline  
Old 22nd May 2015, 18:21   #1170  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,999
Thanks qyot27 for this reminder, I do know this...

Doesn't help me though because I mainly use AVStoDVD for my encodes, and the LoadPlugin call for ffms2.dll is hard coded into the executable. Not much I can do about it except compiling my own version of AVStoDVD...


Cheers
manolito
manolito is offline  
Old 1st June 2015, 01:51   #1171  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,718
the fps drop issue with MT seem to happen only with certain filters, I was successful with this:

DGDource
QTGMC
Prefetch
SelectEven

but as soon as I added crop after DGDource the fps drop issue was back, I tried HW cropping then and again fps drop was happening, unfortunately many popular scripts are not usable at the moment, makes me wonder if QTGMC works better with VapourSynth, adding basic support to StaxRip might be easy.
stax76 is offline  
Old 2nd June 2015, 14:31   #1172  |  Link
chainik_svp
Registered User
 
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
Please update avisynth.h header accordingly to AVS 2.6 final release!
Quote:
Restore GPL exemption.
__________________
SVPflow motion interpolation
chainik_svp is offline  
Old 2nd June 2015, 17:26   #1173  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
@chainik_svp: https://github.com/AviSynth/AviSynthPlus/issues/62
__________________
AviSynth+
innocenat is offline  
Old 5th June 2015, 07:28   #1174  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,399
Today I tried to play an AviSynth file with a fresh built ffplay, and it complains:

Code:
[avisynth @ 00000000030c6f80] AviSynth version is too old. Please upgrade to either AviSynth 2.6 >= RC1 or AviSynth+ >= r1718.
The homepage and the github releases only offer AviSynth+ r1576; so where do I get AviSynth+ r1718 or newer from?!

And on top, will AviSynth+ MT be continued?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 5th June 2015, 07:47   #1175  |  Link
thescrapyard
Registered User
 
thescrapyard's Avatar
 
Join Date: Feb 2008
Posts: 56
Here is the installer for r1779, I'm still hunting for r1825 or r1833

http://www.mediafire.com/download/wi....1.0_r1779.exe


Found it after a few more minutes of hunting and trawling through StaxRip forums topics as he uses AviSynth+ as well

http://www.mediafire.com/download/hv...0_r1825-MT.exe


Both links confimed working, as I've just downloaded both

Last edited by thescrapyard; 5th June 2015 at 07:53.
thescrapyard is offline  
Old 5th June 2015, 07:59   #1176  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,399
a lot!

Now ffplay works well; and by the way, this issue happened with a 64 bit ffplay, so no surprise it didn't work with AviSynth 2.60 final either ... which is 32-bit only
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 5th June 2015 at 08:04.
LigH is offline  
Old 5th June 2015, 08:03   #1177  |  Link
thescrapyard
Registered User
 
thescrapyard's Avatar
 
Join Date: Feb 2008
Posts: 56
This might help others, like me, that use AviSynth+ about development and appearing to have stalled and the current release state

Basically it hasn't stopped, more like idling and does get minor updates as and when needed with the main developer working on the core when he has time. Which apparently may be very little for 'side projects'

https://www.doom9.org/showthread.php...63#post1719763
thescrapyard is offline  
Old 5th June 2015, 08:53   #1178  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,268
Quote:
Originally Posted by LigH View Post
And on top, will AviSynth+ MT be continued?
There is no division there like there is for classic AviSynth; the MT branch has been the main branch of AviSynth+ for nearly a year and a half (the length is mostly because of the hiatus that was in there; we're currently in kind of another one after a rather busy March). MT is the Git HEAD branch.

In the event that 0.2 stable is released sometime soon, it will be MT capable (even if the 'stable' tag would mostly be referring to the single-threaded mode). Whenever that happens, the message in libavformat will get modified to reflect a point release rather than a development revision number.

For quick reference,
  • r1718 was the update against 2.6 RC1 (and technically would be r1723 or thereabouts if checked out from Git; some of the changes were uncommitted at the time I made that build)
  • r1825 is the current Git HEAD.
  • r1833/r1834 (which exists in a still-unmerged pull request) is the extremely-paltry update against RC2. RC3's changes were completely irrelevant to AviSynth+. r1834 adds the exception clause back to avisynth.h and is thus updated against 2.6.0 Final, but as the issue innocenat linked to shows, there's still some pondering about whether that's do-able with the changes already made to avsplus during the 2.6 alpha period.


ffplay isn't really a good way of previewing scripts, because it's more of a test bed for the FFmpeg libraries than a canonical media player. mpv is vastly preferable here. Someone might want to bug the VLC devs to expose AviSynth support through libavformat, since it currently doesn't (or didn't, at least the last time I checked).

Last edited by qyot27; 5th June 2015 at 09:05.
qyot27 is offline  
Old 5th June 2015, 09:07   #1179  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,399
Thank you for the summary.

Using ffplay was in fact rather a test if ffmpeg based tools can be used at all; but I will recommend mpv as alternative now, even though I don't always build it, it used to fail compiling often in the past.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 8th June 2015, 13:22   #1180  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 818
on my lap top windows 8.1 64 bit quad core, installed from home page avisynth+. Compiled plugins in 64 bit mode using VC++ community edition 2013. With loadplugin("....") call get message unable to load. If I paste the plugin dll in avisynth64+ plugins folder, get a message of no such function. Earlier I had 2.6 and opted for upgrade. Both 32bit and 64bit check boxes were ticked. Regular 32 bit plugins compiled for avisynth2.6 are being loaded. In the installation log I see the avissynth.dll (almost an year older to avisynth2.6) is installed. I also see in the wow64bit folder also a avisynth.dll.
In the documentation I do not see any help for using setFilterMtMode or prefetch.Do I need to do any thing else to be able to load 64 bit plugins compiled using the recommended header file for avisynth+?
__________________
mohan
my plugins are now hosted here
vcmohan is offline  
Closed Thread

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 03:22.


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