Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Wmv Input Plugin: Replicated Data Length 0, problem loading some wmv files
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
i4004
Posted: Sep 5 2011, 11:03 PM


Advanced Member


Group: Members
Posts: 2432
Member No.: 4935
Joined: 24-June 03



ie this error:
user posted image

running it thru asfbin app fixes it ( http://www.radioactivepages.com/asfbin.aspx ), but i have lots of such files so it would be easier if one could load them straight to vdub...

here's a sample file if you need it
https://rapidshare.com/files/2131832583/DVD...VD-20__wmr_.wmv

--------------------
my signature:
user posted image
 
     Top
fccHandler
Posted: Sep 10 2011, 04:48 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Although the ASF specification allows a replicated data length of zero, it is so rare that in all these years I have never seen it. The error thrown by the code is kind of like a mountweazel, in that I put it there just to alert ME if ever such a thing was found.

Congratulations Ivo, you are the first to have found it. biggrin.gif

I was not able to download your sample, so I am going to have to assume that there is not something else seriously wrong with those WMVs you have. Anyway here is a new build which removes the error:

http://fcchandler.home.comcast.net/Plugins/WMV


--------------------
May the FOURCC be with you...
 
     Top
i4004
  Posted: Sep 16 2011, 06:39 PM


Advanced Member


Group: Members
Posts: 2432
Member No.: 4935
Joined: 24-June 03



i've found TON of it! biggrin.gif
here
http://www.slobodanpraljak.com/ratni_video.html
(it's war stuff, there might be some gore there....but dvd20, dvd24, dvd30 are safe for anybody's eyes...i just inspected them in vdub, so yes, the fix works...you can dload them via "pokreni" mms link)

as far as i see most files have this error. only smallest don't.
(for example i think i picked DVD-27 (wmr).wmv (3.43mb) for upload, but then saw it loaded ok, and then picked the next bigger file that had it.)

also, this was ripped with some mass dloader (my friend was doing that...i think it was wmrecorder
http://www.wmrecorder.com/ ) dunno if that messed itup...

loaded it to hex editor and don't see what was the encoder...

QUOTE
The error thrown by the code is kind of like a mountweazel, in that I put it there just to alert ME if ever such a thing was found.

heh, so rare?
interesting.

thanks a lot for the quick fix!

i need this because vdub is much better way to quickly inspect these files than usual video players...better timeline resolution.
this fix makes that task a lot easier...

--------------------
my signature:
user posted image
 
     Top
ale5000
Posted: Nov 29 2011, 09:37 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



I have 2 samples that come from a camera.

With the previous version of the input plugin they get replicated data length of zero,
instead with the new version:
The 40MB file after direct strem copy show garbage in the video and audio is present but it cannot be played;
The 65MB file cannot be opened, it say "File ... does not have a video stream.".

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Dec 1 2011, 01:01 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Sorry, try again.

--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Dec 1 2011, 01:44 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



I have sent you a PM.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Dec 24 2011, 04:57 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



To update, I have found the problem and fixed it. I was not correctly handling the unusual case of replicated data length zero.

I am currently trying (again) to fix audio/video sync issues which have plagued this plugin since the beginning, therefore I would prefer to delay the next release. But if you have an urgent need for the replicated data bug fix, just let me know.


--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Dec 24 2011, 01:14 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Don't worry, there is no urgency. biggrin.gif

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Feb 12 2012, 06:11 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Well, again I've given up on trying to fix the audio/video sync issues, after much frustration. I do still believe it is possible to fix, but it pretty much involves me writing a dedicated Windows Media Audio decoder into the plugin! I am totally going to have to defer that for some later time (if ever).

Anyway, version 2.7 has the aforementioned fix for replicated data length zero:

http://fcchandler.home.comcast.net/Plugins/WMV

--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Feb 13 2012, 03:43 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Test file (Afo4 - Stupido v2.wmv): http://uploading.com/files/1m439f9d/Afo4%2...upido%2Bv2.wmv/ (click on "WAIT TO DOWNLOAD")

In file informations with version 2.6 it say "Length (duration): 6912000 samples (3:36)"
instead with version 2.7 it say "Length (duration): 6909918 samples (3:36)".

Is it a new bug or it was wrong in the previous version?

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Feb 13 2012, 11:46 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



QUOTE (ale5000 @ Nov 29 2011, 10:37 PM)
I have 2 samples that come from a camera.

With the previous version of the input plugin they get replicated data length of zero,
instead with the new version:
The 40MB file after direct strem copy show garbage in the video and audio is present but it cannot be played;
The 65MB file cannot be opened, it say "File ... does not have a video stream.".


With the latest version it crash while direct strem copying the 40MB file:
CODE
VirtualDub crash report -- build 34717 (release)
--------------------------------------

Disassembly:
100076a0: 6c              insb  
100076a1: ba01107519      mov    edx, 19751001
100076a6: 830d78ba011001  or     dword ptr [1001ba78], 01h
100076ad: 8bce            mov    ecx, esi
100076af: e862ffffff      call   10007616
100076b4: 6801450110      push   10014501
100076b9: e863330000      call   1000aa21
100076be: 59              pop    ecx
100076bf: 56              push   esi
100076c0: 8d4df4          lea    ecx, [ebp-0ch]
100076c3: e89e310000      call   1000a866
100076c8: 68488c0110      push   10018c48
100076cd: 8d45f4          lea    eax, [ebp-0ch]
100076d0: 50              push   eax
100076d1: c745f4b4670110  mov    dword ptr [ebp-0ch], 100167b4
100076d8: e882330000      call   1000aa5f
100076dd: cc              int    3
100076de: cc              int    3
100076df: cc              int    3
100076e0: 55              push   ebp
100076e1: 8bec            mov    ebp, esp
100076e3: 57              push   edi
100076e4: 56              push   esi
100076e5: 8b750c          mov    esi, [ebp+0ch]
100076e8: 8b4d10          mov    ecx, [ebp+10h]
100076eb: 8b7d08          mov    edi, [ebp+08h]
100076ee: 8bc1            mov    eax, ecx
100076f0: 8bd1            mov    edx, ecx
100076f2: 03c6            add    eax, esi
100076f4: 3bfe            cmp    edi, esi
100076f6: 7608            jbe    10007700
100076f8: 3bf8            cmp    edi, eax
100076fa: 0f82a4010000    jc     100078a4
10007700: 81f900010000    cmp    ecx, 00000100
10007706: 721f            jc     10007727
10007708: 833d94d6011000  cmp    dword ptr [1001d694], 00h
1000770f: 7416            jz     10007727
10007711: 57              push   edi
10007712: 56              push   esi
10007713: 83e70f          and    edi, 0fh
10007716: 83e60f          and    esi, 0fh
10007719: 3bfe            cmp    edi, esi
1000771b: 5e              pop    esi
1000771c: 5f              pop    edi
1000771d: 7508            jnz    10007727
1000771f: 5e              pop    esi
10007720: 5f              pop    edi
10007721: 5d              pop    ebp
10007722: e909340000      jmp    1000ab30
10007727: f7c703000000    test   edi, 00000003
1000772d: 7515            jnz    10007744
1000772f: c1e902          shr    ecx, 02h
10007732: 83e203          and    edx, 03h
10007735: 83f908          cmp    ecx, 08h
10007738: 722a            jc     10007764
1000773a: f3a5            rep    movsd      <-- FAULT
1000773c: ff249554780010  jmp    dword ptr [edx*4+10007854]
10007743: 90              nop    
10007744: 8bc7            mov    eax, edi
10007746: ba03000000      mov    edx, 00000003
1000774b: 83e904          sub    ecx, 04h
1000774e: 720c            jc     1000775c
10007750: 83e003          and    eax, 03h
10007753: 03c8            add    ecx, eax
10007755: ff248568770010  jmp    dword ptr [eax*4+10007768]
1000775c: ff248d64780010  jmp    dword ptr [ecx*4+10007864]
10007763: 90              nop    
10007764: ff248de8770010  jmp    dword ptr [ecx*4+100077e8]
1000776b: 90              nop    
1000776c: 7877            js     100077e5
1000776e: 0010            add    [eax], dl
10007770: a4              movsb  
10007771: 7700            ja     10007773
10007773: 10c8            adc    al, cl
10007775: 7700            ja     10007777
10007777: 1023            adc    [ebx], ah
10007779: d18a0688078a    ror    dword ptr [edx-75f877fa], 1
1000777f: 46              inc    esi
10007780: 018847018a46    add    [eax+468a0147], ecx
10007786: 02c1            add    al, cl
10007788: e902884702      jmp    1247ff8f
1000778d: 83c603          add    esi, 03h
10007790: 83c703          add    edi, 03h
10007793: 83f908          cmp    ecx, 08h
10007796: 72cc            jc     10007764
10007798: f3a5            rep    movsd
1000779a: ff2495          jmp    dword ptr [ebp+edx*4]
1000779d: 54              push   esp
1000779e: 7800            js     100077a0

Built on Althena on Sun Jan 08 18:54:03 2012 using compiler version 1400

Windows 5.1 (Windows XP x86 build 2600) [Service Pack 3]
Memory status: virtual free 1908M/2048M, commit limit 2406M, physical total 2048M

EAX = 023b05df
EBX = 023b02bf
ECX = 00000046
EDX = 00000000
EBP = 0517fa10
ESI = 023b04c7
EDI = 00cb9000
ESP = 0517fa08
EIP = 1000773a
EFLAGS = 00010206
FPUCW = ffff027f
FPUTW = ffffffff

Crash reason: Access Violation

Crash context:
An out-of-bounds memory access (access violation) occurred in module 'WMV'...

...writing address 00CB9000...

...while reading 2250 raw audio samples starting at 0 (stream length=2250) (Audio.cpp:656)...

...while running thread "Dub-I/O" (thread.cpp:179).

Pointer dumps:

EAX   023b05db: fce3cf23 00000000 7f7f7f7f 00000000 00000000 00000000 00000000 00000000
EBX   023b02bb: 03200003 ff8fecf8 c0c88fcb 00038770 3ec3cf8c fff2ac3f 3c0ea3c3 30f3238f
ESI   023b04c3: eff3eccf fbf8ec33 f3cc7ccf c333801c 7ffe02f4 e3ef3eef 028f3fe2 0008c20f
ESP   0517fa08: 023b05df 023a0048 00000000 10002b8a 00cb8df8 023b02bf 00000320 01362320
     0517fa28: 000006c1 00000320 00000209 09400000 81015d00 00000009 00cb8df8 00000320
     0517fa48: 00000320 00000002 00000491 00000002 00000000 0000005d 00000001 00000005
     0517fa68: 00000017 00000008 023a0048 10001190 00cb8df8 00000209 00000000 00000320
EBP   0517fa10: 00000000 10002b8a 00cb8df8 023b02bf 00000320 01362320 000006c1 00000320
     0517fa30: 00000209 09400000 81015d00 00000009 00cb8df8 00000320 00000320 00000002
     0517fa50: 00000491 00000002 00000000 0000005d 00000001 00000005 00000017 00000008
     0517fa70: 023a0048 10001190 00cb8df8 00000209 00000000 00000320 01362280 00c36778

Thread call stack:
1000773a: WMV!VDGetPluginInfo [10000000+35e0+415a]
10002b8a: WMV!00002b8a
10001190: WMV!00001190
004eccf8: VDAudioSourcePlugin::_read()
004dffb5: DubSource::read()
0040ac76: AudioStreamSource::_Read()
7c927ec0: ntdll!LdrGetProcedureAddress [7c910000+17ea8+18]
45011f0f: urlmon!DllCanUnloadNow [45010000+1ae4+42b]
0040813a: AudioStream::Read()
0040b113: AudioSubset::_Read()
7c812afb: kernel32!RaiseException [7c800000+12aa9+52]
004d2e07: AVIOutputFile::BlockOpen()
7c927ef3: ntdll!LdrGetProcedureAddress [7c910000+17ea8+4b]
7c920385: ntdll!RtlImageDirectoryEntryToData [7c910000+10346+3f]
7c927dba: ntdll!RtlCompareUnicodeString [7c910000+179a8+412]
7c927e5f: ntdll!RtlCompareUnicodeString [7c910000+179a8+4b7]
7c927e09: ntdll!RtlCompareUnicodeString [7c910000+179a8+461]
7c91df5a: ntdll!NtWaitForSingleObject [7c910000+df4e+c]
7c92b24b: ntdll!RtlpWaitForCriticalSection [7c910000+1b1bf+8c]
7c927e09: ntdll!RtlCompareUnicodeString [7c910000+179a8+461]
7c928047: ntdll!LdrGetProcedureAddress [7c910000+17ea8+19f]
0040813a: AudioStream::Read()
0041f59d: VDDubIOThread::MainAddAudioFrame()
0041245b: AVIPipe::getQueueInfo()
0041f05e: VDDubIOThread::MainAddVideoFrame()
0041f860: VDDubIOThread::ThreadRun()
7c80df13: kernel32!DuplicateHandle [7c800000+de9e+75]
7c80df13: kernel32!DuplicateHandle [7c800000+de9e+75]
004189f0: VDThreadInitHandler()
0051713f: VDThread::StaticThreadStart()
005e4b2e: _callthreadstartex()
005e4bd3: _threadstartex@4()
7c80b729: kernel32!GetModuleFileNameA [7c800000+b56f+1ba]

-- End of report


--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Feb 18 2012, 05:50 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



The crash was due to an incorrect nBlockAlign value in the WAVEFORMATEX structure of the audio stream, and that was a side effect of some changes I made while trying (unsuccessfully) to fix the audio/video sync problem. The crash is fixed now:

http://fcchandler.home.comcast.net/Plugins/WMV

Regarding the number of WMA samples, there is some guesswork involved to estimate that number. It isn't going to be 100% accurate. However, I believe the latest version delivers a more accurate guess.

--------------------
May the FOURCC be with you...
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
11 replies since Sep 5 2011, 11:03 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development