[RESOLVED] DGAvcDecDI crashes when playing mkv-file

Support forum for DGAVCDecDI
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

[RESOLVED] DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

DGAvcDecDI 2001 crashes when playing file specified in URL below. I am using trial version of last DiAVC decoder (1.2.2).
viewtopic.php?f=8&t=69

I do following:
1. Load file to application
2. Play it (it plays correctly).
3. Try to create project
4. Try to play file again
5. Application crashes.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

prokhozhijj wrote:DGAvcDecDI 2001 crashes when playing file specified in URL below. I am using trial version of last DiAVC decoder (1.2.2).
viewtopic.php?f=8&t=69

I do following:
1. Load file to application
2. Play it (it plays correctly).
You've lost me already. DGAVCDecDI cannot play the file "riget34_1_nv_progressive_loseless_mkvtools-001.mkv" that you uploaded, because the code rejects that profile 244 associated with lossless 264. When I try to play I get the "No video frames found" pop-up.

Are you sure that this is the file you are talking about?

If DiAVC supports these lossless files I can add support for them to DGAVCDecDI also. But you are really muddying the waters here by claiming to have played that file.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

admin wrote:
prokhozhijj wrote:DGAvcDecDI 2001 crashes when playing file specified in URL below. I am using trial version of last DiAVC decoder (1.2.2).
viewtopic.php?f=8&t=69

I do following:
1. Load file to application
2. Play it (it plays correctly).
You've lost me already. DGAVCDecDI cannot play the file "riget34_1_nv_progressive_loseless_mkvtools-001.mkv" that you uploaded, because the code rejects that profile 244 associated with lossless 264. When I try to play I get the "No video frames found" pop-up.

Are you sure that this is the file you are talking about?
Yes, of course. I have no problems with playing this file for the first time.
admin wrote:If DiAVC supports these lossless files I can add support for them to DGAVCDecDI also. But you are really muddying the waters here by claiming to have played that file.
I can provide the proof when I get home.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

Open the Help/About box in DGAVCDecDI. It should show version 2024. Is that what you have? If so, there is no way you can play that file.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

I've downloaded your soft and decoder (trial version) yesterday (03 jan 2011). And I can play the file, at least one time. Within two hours I can prove it. And for any case I can provide you with MD5-hash for the file. It is possible that you did not downloaded it completely.

Even if your soft can't process such files properly at the moment, why you don't want to add this feature? Why you don't want to investigate this issue in details? I do not understand. Really. It is well known practice when video stream first encoded with lossless compression when hard filters using. Your soft can be very useful in such cases because directsource can lost some frames within processing. And your soft can't.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

prokhozhijj wrote:Even if your soft can't process such files properly at the moment, why you don't want to add this feature? Why you don't want to investigate this issue in details? I do not understand. Really.
I never said I would not support it. I said this quite clearly:

"If DiAVC supports these lossless files I can add support for them to DGAVCDecDI also."
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

So there is proof in attachment. Please take a look at it.

And there is MD5 hash for riget34_1_nv_progressive_loseless_mkvtools-001.mkv

8DFE95E6A9FA492A370022D667078B33

Its original size is 28'609'892 b. An its size on disk is 28'610'560 b (as Windows 7 shows).
Attachments
DGAVCIndexDI.jpg
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

I don't know how that is happening, unless some uninited variables are taking on very lucky values for you.

Anyway, I demuxed the 264 out of the MKV and ran a parser on it. I get the dump below. You can see that the first IDR slice has a frame_num of 1 (must be 0 by spec). This is ILLEGAL and so your stream is invalid. I am willing to try to support these lossless files, but only if I am supplied with valid files. So I will do no more on this until I receive a valid, legal test file, preferably raw 264 rather than MKV.
-----
h264parse - mpeg4ip version 1.5.0.1
Nal length 26 start code 4 bytes
ref 3 type 7 Sequence parameter set
profile: 244
constaint_set0_flag: 0
constaint_set1_flag: 0
constaint_set2_flag: 0
constaint_set3_flag: 0
level_idc: 31
seq parameter set id: 0
log2_max_frame_num_minus4: 1
pic_order_cnt_type: 0
log2_max_pic_order_cnt_lsb_minus4: 0
num_ref_frames: 0
gaps_in_frame_num_value_allowed_flag: 0
pic_width_in_mbs_minus1: 0 (16)
pic_height_in_map_minus1: 2
frame_mbs_only_flag: 0
derived height: 96
mb_adaptive_frame_field_flag: 1
direct_8x8_inference_flag: 0
frame_cropping_flag: 0
vui_parameters_present_flag: 0
Nal length 9 start code 4 bytes
ref 3 type 8 Picture parameter set
pic_parameter_set_id: 0
seq_parameter_set_id: 0
entropy_coding_mode_flag: 0
pic_order_present_flag: 0
num_slice_groups_minus1: 0
num_ref_idx_l0_active_minus1: 0
num_ref_idx_l1_active_minus1: 0
weighted_pred_flag: 0
weighted_bipred_idc: 0
pic_init_qp_minus26: -26
pic_init_qs_minus26: 0
chroma_qp_index_offset: 0
deblocking_filter_control_present_flag: 1
constrained_intra_pred_flag: 0
redundant_pic_cnt_present_flag: 0
Nal length 486 start code 4 bytes
ref 0 type 6 SEI
payload_type: 5 user_data_unregistered
payload_size: 477
0xdc 0x45 0xe9 0xbd 0xe6 0xd9 0x48 0xb7
0x96 0x2c 0xd8 0x20 0xd9 0x23 0xee 0xef
0x78 0x32 0x36 0x34 0x20 0x2d 0x20 0x63
0x6f 0x72 0x65 0x20 0x31 0x31 0x32 0x20
0x72 0x31 0x38 0x33 0x34 0x20 0x61 0x35
0x31 0x38 0x31 0x36 0x61 0x20 0x2d 0x20
0x48 0x2e 0x32 0x36 0x34 0x2f 0x4d 0x50
0x45 0x47 0x2d 0x34 0x20 0x41 0x56 0x43
0x20 0x63 0x6f 0x64 0x65 0x63 0x20 0x2d
0x20 0x43 0x6f 0x70 0x79 0x6c 0x65 0x66
0x74 0x20 0x32 0x30 0x30 0x33 0x2d 0x32
0x30 0x31 0x30 0x20 0x2d 0x20 0x68 0x74
0x74 0x70 0x3a 0x2f 0x2f 0x77 0x77 0x77
0x2e 0x76 0x69 0x64 0x65 0x6f 0x6c 0x61
0x6e 0x2e 0x6f 0x72 0x67 0x2f 0x78 0x32
0x36 0x34 0x2e 0x68 0x74 0x6d 0x6c 0x20
0x2d 0x20 0x6f 0x70 0x74 0x69 0x6f 0x6e
0x73 0x3a 0x20 0x63 0x61 0x62 0x61 0x63
0x3d 0x30 0x20 0x72 0x65 0x66 0x3d 0x31
0x20 0x64 0x65 0x62 0x6c 0x6f 0x63 0x6b
0x3d 0x30 0x3a 0x30 0x3a 0x30 0x20 0x61
0x6e 0x61 0x6c 0x79 0x73 0x65 0x3d 0x30
0x3a 0x30 0x20 0x6d 0x65 0x3d 0x64 0x69
0x61 0x20 0x73 0x75 0x62 0x6d 0x65 0x3d
0x30 0x20 0x70 0x73 0x79 0x3d 0x30 0x20
0x6d 0x69 0x78 0x65 0x64 0x5f 0x72 0x65
0x66 0x3d 0x30 0x20 0x6d 0x65 0x5f 0x72
0x61 0x6e 0x67 0x65 0x3d 0x31 0x36 0x20
0x63 0x68 0x72 0x6f 0x6d 0x61 0x5f 0x6d
0x65 0x3d 0x31 0x20 0x74 0x72 0x65 0x6c
0x6c 0x69 0x73 0x3d 0x30 0x20 0x38 0x78
0x38 0x64 0x63 0x74 0x3d 0x30 0x20 0x63
0x71 0x6d 0x3d 0x30 0x20 0x64 0x65 0x61
0x64 0x7a 0x6f 0x6e 0x65 0x3d 0x32 0x31
0x2c 0x31 0x31 0x20 0x66 0x61 0x73 0x74
0x5f 0x70 0x73 0x6b 0x69 0x70 0x3d 0x30
0x20 0x63 0x68 0x72 0x6f 0x6d 0x61 0x5f
0x71 0x70 0x5f 0x6f 0x66 0x66 0x73 0x65
0x74 0x3d 0x30 0x20 0x74 0x68 0x72 0x65
0x61 0x64 0x73 0x3d 0x36 0x20 0x73 0x6c
0x69 0x63 0x65 0x64 0x5f 0x74 0x68 0x72
0x65 0x61 0x64 0x73 0x3d 0x30 0x20 0x6e
0x72 0x3d 0x30 0x20 0x64 0x65 0x63 0x69
0x6d 0x61 0x74 0x65 0x3d 0x31 0x20 0x69
0x6e 0x74 0x65 0x72 0x6c 0x61 0x63 0x65
0x64 0x3d 0x30 0x20 0x63 0x6f 0x6e 0x73
0x74 0x72 0x61 0x69 0x6e 0x65 0x64 0x5f
0x69 0x6e 0x74 0x72 0x61 0x3d 0x30 0x20
0x62 0x66 0x72 0x61 0x6d 0x65 0x73 0x3d
0x30 0x20 0x77 0x65 0x69 0x67 0x68 0x74
0x70 0x3d 0x30 0x20 0x6b 0x65 0x79 0x69
0x6e 0x74 0x3d 0x32 0x35 0x30 0x20 0x6b
0x65 0x79 0x69 0x6e 0x74 0x5f 0x6d 0x69
0x6e 0x3d 0x32 0x35 0x20 0x73 0x63 0x65
0x6e 0x65 0x63 0x75 0x74 0x3d 0x30 0x20
0x69 0x6e 0x74 0x72 0x61 0x5f 0x72 0x65
0x66 0x72 0x65 0x73 0x68 0x3d 0x30 0x20
0x72 0x63 0x3d 0x63 0x71 0x70 0x20 0x6d
0x62 0x74 0x72 0x65 0x65 0x3d 0x30 0x20
0x71 0x70 0x3d 0x30 0x0
string is ".E....H..,. .#..x264 - core 112 r1834 a51816a - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0."
Nal length 6 start code 4 bytes
ref 0 type 9 Access unit delimeter
primary_pic_type: 0
Nal length 3442 start code 4 bytes
ref 3 type 5 Coded slice of an IDR picture
first_mb_in_slice: 0
slice_type: 7 (I)
pic_parameter_set_id: 0
frame_num: 1 (5 bits)
field_pic_flag: 0
idr_pic_id: 1
pic_order_cnt_lsb: 8
[etc.]
-----
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

admin wrote: Anyway, I demuxed the 264 out of the MKV and ran a parser on it. I get the dump below. You can see that the first IDR slice has a frame_num of 1 (must be 0 by spec).
can it be error in coder (x.264.exe) or in muxer?
admin wrote: This is ILLEGAL and so your stream is invalid. I am willing to try to support these lossless files, but only if I am supplied with valid files. So I will do no more on this until I receive a valid, legal test file, preferably raw 264 rather than MKV.
Does it means that I have to demux video with mkvtools, for example, and send demuxed video to you? Or should I re-encode video without mkv container?
What is preferable way for you? Sorry, but I can't check if my raw file is correct according to spec.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

Please make a small clean raw 264 file in lossless mode. I can't believe that x264 will produce IDR slices with frame_num not equal to 0.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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.
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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

Build 2025 is now available.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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

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
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

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.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

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.
I know that DiAVC is multithreaded and I see it using multiple threads on my PC.
User avatar
admin
Site Admin
Posts: 4449
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin »

Just use DGSource() and enable multithreading in the DiAVC configuration.
DAE avatar
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 11:16 am

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj »

I don't understand how it could be reached within Avisynth (and with trial version of DiAVC)?

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)
or may be something like following?

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)
Which one example is correct for using multithreading in Avisynth? Please specify.
Post Reply