[RESOLVED] DGAvcDecDI crashes when playing mkv-file
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
There is an example.
http://www.filefactory.com/file/b4f9h39 ... seless.264
MD5: 178CB2406C737728C6AD2A2CA16DE9AD
Size: 28'586'623 b
By the way, I can't play this file with your soft. But the same file wrapped in mkv container by x264.exe encoder - I can.
http://www.filefactory.com/file/b4f9h39 ... seless.264
MD5: 178CB2406C737728C6AD2A2CA16DE9AD
Size: 28'586'623 b
By the way, I can't play this file with your soft. But the same file wrapped in mkv container by x264.exe encoder - I can.
Re: DGAvcDecDI crashes when playing mkv-file
It has the same problem with illegal frame_num value.
What are you using to encode this? Is it an official version of x264.exe? If so, you could ask the x264 guys about it.
What are you using to encode this? Is it an official version of x264.exe? If so, you could ask the x264 guys about it.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Yes, it is official version. I took it from x264.nl. Thank you for your analysis. I doubt whether I will ask developers about anything. I really don't know what I should say them. Again, I'm just an amateur and I know nothing about the standards. Sorry for disturbing you and thanks for help.admin wrote:It has the same problem with illegal frame_num value.
What are you using to encode this? Is it an official version of x264.exe? If so, you need to ask the x264 guys why they are generating illegal files.
Re: DGAvcDecDI crashes when playing mkv-file
You're not disturbing me; I appreciate you bringing this issue to light.
Looking closer at the spec, I see I have to parse the SPS differently when profile=244, so I am probably reading the wrong frame_num value. I will continue investigating.
Looking closer at the spec, I see I have to parse the SPS differently when profile=244, so I am probably reading the wrong frame_num value. I will continue investigating.
Re: DGAvcDecDI crashes when playing mkv-file
I have revised the parsing to allow for profile 244 and I now have your stream playing fine without crashing. I will release a new revision this evening if my regression testing goes without surprises.
Re: DGAvcDecDI crashes when playing mkv-file
Build 2025 is now available.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Thank you very much, Donald.
It works fine now. But... When I am using SetMTMode in my Avisynth script it crashes. There is no such problem when I am opening source file with DSS2() plugin instead of DGSource(). DSS2() comes with HAALI media splitter - avss.dll. Source file is big enough (about 18Gb), so I don't know how to load it. But it was made in the same way as example from this thread. Application crashes from very beginning, before encoding starts.
Script looks like following
It works fine now. But... When I am using SetMTMode in my Avisynth script it crashes. There is no such problem when I am opening source file with DSS2() plugin instead of DGSource(). DSS2() comes with HAALI media splitter - avss.dll. Source file is big enough (about 18Gb), so I don't know how to load it. But it was made in the same way as example from this thread. Application crashes from very beginning, before encoding starts.
Script looks like following
Code: Select all
SetMemoryMax(1200)
SetMTMode(5,4)
DGSource("my_file.dgi")
#DSS2("my_file.mkv")
SetMTMode(2)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
return last
Re: DGAvcDecDI crashes when playing mkv-file
I don't know anything about MT and have no interest in installing it.
Didée is our local expert on this. He has performed similar experiments for DGDecNV. Maybe you'd like to ping him about this.
Didée is our local expert on this. He has performed similar experiments for DGDecNV. Maybe you'd like to ping him about this.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Ok, thank you.
May be you know some other way how to reach multi-threading processing in your application? I read a little about decoder you are using in your application. It is multi-threaded in its nature. But I see that only one core used when I am processing my video. It is not very effective I think.
May be you know some other way how to reach multi-threading processing in your application? I read a little about decoder you are using in your application. It is multi-threaded in its nature. But I see that only one core used when I am processing my video. It is not very effective I think.
Re: DGAvcDecDI crashes when playing mkv-file
I believe you have to not attempt to multithread the source filter but only the remaining part of the script. I know that DiAVC is multithreaded and I see it using multiple threads on my PC. So perhaps you have it misconfigured. Please consult DIAVC for assistance in that regard.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Well. May be you are right regarding decoder misconfiguration. The matter is that trial version has no configuration tool at all. Only file diavc.ax. I know this is not your area. It's just my think aloud.
BTW. May be you will be interested. I've asked regarding my problem in DiAVC thread elsewhere.
I do not know really if this reply correct or not. But until now there are no others.
BTW. May be you will be interested. I've asked regarding my problem in DiAVC thread elsewhere.
I do not know really if this reply correct or not. But until now there are no others.
Re: DGAvcDecDI crashes when playing mkv-file
As I said, do not attempt to MT the DGSource() filter. Use DiAVC's integral multithreading.
DGSource() code itself is thread-safe. It's the combination with DiAVC that causes the issue, I believe.
DGSource() code itself is thread-safe. It's the combination with DiAVC that causes the issue, I believe.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Ok. I think I understand you.
Can you propose some test case regarding stable multi-threading with DGSource+DiAVC? I mean some avisynth script. Because you've told that in your computer everything works fine.
Can you propose some test case regarding stable multi-threading with DGSource+DiAVC? I mean some avisynth script. Because you've told that in your computer everything works fine.
I know that DiAVC is multithreaded and I see it using multiple threads on my PC.
Re: DGAvcDecDI crashes when playing mkv-file
Just use DGSource() and enable multithreading in the DiAVC configuration.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I don't understand how it could be reached within Avisynth (and with trial version of DiAVC)?
Do you mean something like that?
or may be something like following?
Which one example is correct for using multithreading in Avisynth? Please specify.
Do you mean something like that?
Code: Select all
DGSource("my_file.dgi")
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Code: Select all
DGSource("my_file.dgi")
SetMTMode(2)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Re: DGAvcDecDI crashes when playing mkv-file
I've found some code that makes DGSource() not thread-safe, and therefore not compatible with MT. I have corrected it and slipstreamed it into build 2025. So redownload build 2025 and update DGAVCDecodeDI.dll. Please test it and report your results.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Thank you. I've downloaded last version. And what I have.
This code works properly but only with 1 thread (please pay your attention on comments within script).
Following code crashes all time when I am using x264 coder.
Following code crashes all time when I am using x264 coder. And it only works once with VirtualDub(I was unable to repeat this result later).
This code works properly but only with 1 thread (please pay your attention on comments within script).
Code: Select all
DGSource("my_file.dgi")
SetMTMode(2)
# or SetMTMode(2,0) or SetMTMode(2,3) or SetMTMode(2,4)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Code: Select all
SetMTMode(5)
# or SetMTMode(5,0) or SetMTMode(5,2) or SetMTMode(5,3) or SetMTMode(5,4)
DGSource("my_file.dgi")
SetMTMode(2)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Code: Select all
SetMTMode(5,4)
DGSource("my_file.dgi")
SetMTMode(2,4)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Re: DGAvcDecDI crashes when playing mkv-file
That's all I can do for you on this issue. Use your first script.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
This is certainly not what I expected. DSS2() can work stable with multi-threading in all these scripts. But... That's something at least.
Thanks.
Thanks.
Re: DGAvcDecDI crashes when playing mkv-file
You need to ask DiAVC about it. I have confirmed that DGSource() itself is threadsafe. I can open a script several times in simultaneous VirtualDub instances and they play fine and independently.
Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it. And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
You are free to use DSS2() if that works better for you.
Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it. And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
You are free to use DSS2() if that works better for you.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
As far as I know possibility to run several applications simultaneously is not equal to multi-threading. Threadsafe means that you can run several threads within one application process in operating system. It is because every process runs in its own memory area which is isolated from other processes. But threads run in shared memory area which one process owns.admin wrote:You need to ask DiAVC about it. I have confirmed that DGSource() itself is threadsafe. I can open a script several times in simultaneous VirtualDub instances and they play fine and independently.
Yes, you told me already about it. It is a pity (for me of course).admin wrote:Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it.
I am trying to use all cores of my CPU. I don't know exactly how it works with DSS2() but it works smoothly on all cores and when I am not MT'ing before this filter it works on one core only. The same situation with your plug-in - it can works on one core only when I am not turning on MT before it.admin wrote:And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
May be MT spawns several threads when filter loads the video. And consequent filters runs within these threads.
I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.admin wrote:You are free to use DSS2() if that works better for you.
Re: DGAvcDecDI crashes when playing mkv-file
What makes you think that DSS2() cannot use the DiAVC decoder?I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.
One more time: DiAVC runs multithreaded distributed on all your CPUs. There is no need to try to instantiate DGSource() multiple times. If you cannot get DiAVC to use all your cores, then again, talk to DiAVC about it!
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
At present I not quite understand how to make it work with DiAVC.admin wrote:What makes you think that DSS2() cannot use the DiAVC decoder?I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.
admin wrote:One more time: DiAVC runs multithreaded distributed on all your CPUs. There is no need to try to instantiate DGSource() multiple times. If you cannot get DiAVC to use all your cores, then again, talk to DiAVC about it!
On forum.doom9.org I've got reply regarding this. There is no need to perform special action to force decoder for using multithreading.
And I've notice that when I run following script within VirtualDub all my cores were used. But that happened only one time and only within VirtualDub
Code: Select all
SetMTmode(5,4)
DGSource()
SetMTMode(2,4)
Re: DGAvcDecDI crashes when playing mkv-file
What version of Avisynth are you running? Also, what version of MT.dll?
If you give me enough information I will try to duplicate the issue.
If you give me enough information I will try to duplicate the issue.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I have usual Avisynth (last 32-bit version from SourceForge) and MT-libraries from SEt version 2009.07.12. I've got Avisynth MT here http://forum.doom9.org/showthread.php?p ... ost1301410
There are my Avisynth files
http://www.filefactory.com/file/b4g40cf ... isynth.zip
MD5: 869C8001ACF985372DC9E0F7A8328745
Size: 2'200'278
There are my Avisynth files
http://www.filefactory.com/file/b4g40cf ... isynth.zip
MD5: 869C8001ACF985372DC9E0F7A8328745
Size: 2'200'278