Latest post Wed, Mar 1 2017 12:00 AM by mikedeluca. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Fri, Feb 24 2017 11:33 AM

    • Francesco
    • Not Ranked
    • Joined on Wed, May 16 2012
    • Pisa - Italy
    • Posts 68
    • Points 665

    Network flow doubled

    Hi

    in these days I noticed by accident that network flow generated by plugin is doubled. I map a network drive with some clips and AMA linked a clip from it. Then I start to play the clip with full quality ( requested image scale is 1.0). My material has a flow rate of 100Mbit while playing a clip with MC the measured flow on the network is 200Mbit. That is  doubled !!

    I insert an outputdebugstring in order to display read operation in ProvideSampleRange:

     sprintf_s(db,256,"ProvideSampleRange  Thread %d Tick : Reading %lx bytes  ",GetCurrentThreadId(),GetTickCount(),numBytes); OutputDebugStringA(db);
     ReadFile(_hfile,cbuff,(DWORD)numBytes,&br,NULL);

    and the number of bytes read is correct.  Playing the clip :

    00000274    15.74114799    [6512] ProvideSampleRange  Thread 11096 Tick : 266284437 Reading 64000 bytes for sample 0   
    00000275    15.76725578    [6512] ProvideSampleRange  Thread 11096 Tick : 266284468 Reading 64000 bytes for sample 1   
    00000276    15.79587650    [6512] ProvideSampleRange  Thread 11096 Tick : 266284500 Reading 65000 bytes for sample 2   
    00000277    15.82273960    [6512] ProvideSampleRange  Thread 11096 Tick : 266284515 Reading 65000 bytes for sample 3   
    00000278    15.84884167    [6512] ProvideSampleRange  Thread 11096 Tick : 266284546 Reading 65000 bytes for sample 4   
    00000279    15.87492561    [6512] ProvideSampleRange  Thread 11096 Tick : 266284578 Reading 65000 bytes for sample 5   
    00000280    15.90006542    [6512] ProvideSampleRange  Thread 11096 Tick : 266284593 Reading 65000 bytes for sample 6   
    00000281    15.92817116    [6512] ProvideSampleRange  Thread 11096 Tick : 266284625 Reading 65000 bytes for sample 7   
    00000282    15.95363522    [6512] ProvideSampleRange  Thread 11096 Tick : 266284656 Reading 65000 bytes for sample 8   
    00000283    15.98141575    [6512] ProvideSampleRange  Thread 11096 Tick : 266284687 Reading 65000 bytes for sample 9   
    00000284    16.01127243    [6512] ProvideSampleRange  Thread 11096 Tick : 266284718 Reading 65000 bytes for sample 10   
    00000285    16.04003334    [6512] ProvideSampleRange  Thread 11096 Tick : 266284734 Reading 65000 bytes for sample 11   
    00000286    16.08172035    [6512] ProvideSampleRange  Thread 11096 Tick : 266284765 Reading 66000 bytes for sample 12   
    00000287    16.09787750    [6512] ProvideSampleRange  Thread 11096 Tick : 266284796 Reading 66000 bytes for sample 13   
    00000288    16.12487793    [6512] ProvideSampleRange  Thread 11096 Tick : 266284828 Reading 65000 bytes for sample 14   
    00000289    16.15557098    [6512] ProvideSampleRange  Thread 11096 Tick : 266284859 Reading 65000 bytes for sample 15   
    00000290    16.18549156    [6512] ProvideSampleRange  Thread 11096 Tick : 266284890 Reading 63000 bytes for sample 16   
    00000291    16.21311760    [6512] ProvideSampleRange  Thread 11096 Tick : 266284906 Reading 63000 bytes for sample 17   
    00000292    16.24324036    [6512] ProvideSampleRange  Thread 11096 Tick : 266284937 Reading 62000 bytes for sample 18   
    00000293    16.27035713    [6512] ProvideSampleRange  Thread 11096 Tick : 266284968 Reading 62000 bytes for sample 19   
    00000294    16.29685211    [6512] ProvideSampleRange  Thread 11096 Tick : 266285000 Reading 62000 bytes for sample 20   
    00000295    16.32276917    [6512] ProvideSampleRange  Thread 11096 Tick : 266285015 Reading 63000 bytes for sample 21   
    00000296    16.35002708    [6512] ProvideSampleRange  Thread 11096 Tick : 266285046 Reading 63000 bytes for sample 22   
    00000297    16.37864876    [6512] ProvideSampleRange  Thread 11096 Tick : 266285078 Reading 64000 bytes for sample 23   
    00000298    16.40488625    [6512] ProvideSampleRange  Thread 11096 Tick : 266285109 Reading 66000 bytes for sample 24   
    00000299    16.43267250    [6512] ProvideSampleRange  Thread 11096 Tick : 266285125 Reading 66000 bytes for sample 25   
    00000300    16.46454239    [6512] ProvideSampleRange  Thread 11096 Tick : 266285171 Reading 67000 bytes for sample 26   
    00000301    16.49241638    [6512] ProvideSampleRange  Thread 11096 Tick : 266285187 Reading 68000 bytes for sample 27   
    00000302    16.54216385    [6512] ProvideSampleRange  Thread 11096 Tick : 266285218 Reading 69000 bytes for sample 28   
    00000303    16.59564018    [6512] ProvideSampleRange  Thread 11096 Tick : 266285265 Reading 69000 bytes for sample 29   
    00000304    16.61520195    [6512] ProvideSampleRange  Thread 11096 Tick : 266285281 Reading 69000 bytes for sample 30   
    00000305    16.62879372    [6512] ProvideSampleRange  Thread 11096 Tick : 266285328 Reading 69000 bytes for sample 31   
    00000306    16.66171074    [6512] ProvideSampleRange  Thread 11096 Tick : 266285359 Reading 69000 bytes for sample 32   
    00000307    16.68812943    [6512] ProvideSampleRange  Thread 11096 Tick : 266285390 Reading 69000 bytes for sample 33   
    00000308    16.71612549    [6512] ProvideSampleRange  Thread 11096 Tick : 266285421 Reading 69000 bytes for sample 34   
    00000309    16.74569321    [6512] ProvideSampleRange  Thread 11096 Tick : 266285453 Reading 69000 bytes for sample 35   
    00000310    16.77258682    [6512] ProvideSampleRange  Thread 11096 Tick : 266285468 Reading 6a000 bytes for sample 36   
    00000311    16.80162239    [6512] ProvideSampleRange  Thread 11096 Tick : 266285500 Reading 6a000 bytes for sample 37   
    00000312    16.83215904    [6512] ProvideSampleRange  Thread 11096 Tick : 266285531 Reading 6a000 bytes for sample 38   
    00000313    16.86178207    [6512] ProvideSampleRange  Thread 11096 Tick : 266285562 Reading 6a000 bytes for sample 39   
    00000314    16.89170456    [6512] ProvideSampleRange  Thread 11096 Tick : 266285593 Reading 69000 bytes for sample 40   
    00000315    16.92381859    [6512] ProvideSampleRange  Thread 11096 Tick : 266285625 Reading 68000 bytes for sample 41   
    00000316    16.95831680    [6512] ProvideSampleRange  Thread 11096 Tick : 266285656 Reading 68000 bytes for sample 42   
    00000317    16.99174500    [6512] ProvideSampleRange  Thread 5516 Tick : 266285687 Reading 67000 bytes for sample 43   
    00000318    17.03751755    [6512] ProvideSampleRange  Thread 5516 Tick : 266285734 Reading 67000 bytes for sample 44   
    00000319    17.09936523    [6512] ProvideSampleRange  Thread 11096 Tick : 266285765 Reading 65000 bytes for sample 45   
    00000320    17.11029816    [6512] ProvideSampleRange  Thread 9256 Tick : 266285812 Reading 65000 bytes for sample 47   
    00000321    17.14022446    [6512] ProvideSampleRange  Thread 9256 Tick : 266285843 Reading 64000 bytes for sample 46   
    00000322    17.16970634    [6512] ProvideSampleRange  Thread 9256 Tick : 266285875 Reading 68000 bytes for sample 48   
    00000323    17.20071983    [6512] ProvideSampleRange  Thread 9256 Tick : 266285906 Reading 6a000 bytes for sample 49   
    00000324    17.23340034    [6512] ProvideSampleRange  Thread 9256 Tick : 266285937 Reading 6a000 bytes for sample 50   
    00000325    17.26479721    [6512] ProvideSampleRange  Thread 9256 Tick : 266285968 Reading 6a000 bytes for sample 51   
    00000326    17.29879379    [6512] ProvideSampleRange  Thread 9256 Tick : 266286000 Reading 6a000 bytes for sample 52   
    00000327    17.32821655    [6512] ProvideSampleRange  Thread 9256 Tick : 266286031 Reading 6a000 bytes for sample 53   
    00000328    17.36482811    [6512] ProvideSampleRange  Thread 9256 Tick : 266286062 Reading 6a000 bytes for sample 54   
    00000329    17.39776230    [6512] ProvideSampleRange  Thread 9256 Tick : 266286093 Reading 6a000 bytes for sample 55   
    00000330    17.43043518    [6512] ProvideSampleRange  Thread 9256 Tick : 266286125 Reading 6a000 bytes for sample 56   
    00000331    17.46276283    [6512] ProvideSampleRange  Thread 9256 Tick : 266286156 Reading 6a000 bytes for sample 57   
    00000332    17.49844933    [6512] ProvideSampleRange  Thread 9256 Tick : 266286203 Reading 6a000 bytes for sample 58   
    00000333    17.53338814    [6512] ProvideSampleRange  Thread 9256 Tick : 266286234 Reading 6a000 bytes for sample 59   
    00000334    17.59838486    [6512] ProvideSampleRange  Thread 9256 Tick : 266286265 Reading 6a000 bytes for sample 60   
    00000335    17.60680580    [6512] ProvideSampleRange  Thread 9256 Tick : 266286296 Reading 6a000 bytes for sample 61   
    00000336    17.63958168    [6512] ProvideSampleRange  Thread 9256 Tick : 266286343 Reading 6a000 bytes for sample 62   
    00000337    17.67893600    [6512] ProvideSampleRange  Thread 9256 Tick : 266286375 Reading 6a000 bytes for sample 63   
    00000338    17.72094727    [6512] ProvideSampleRange  Thread 11096 Tick : 266286421 Reading 6a000 bytes for sample 64   
    00000339    17.75417328    [6512] ProvideSampleRange  Thread 11096 Tick : 266286453 Reading 6a000 bytes for sample 65   

    The cpu is an Intel i5 with 4 cores, so we have 3  instances of SampleMapping  (Threads with ID 5516, 9256 and 11096) like if the number of instances is NumcoresCPU-1 and the sample reading is one for each instance.  Playing the same clip with another player (QuickTime) I see a network flow of 100Mbit as it should be, whilst playing with Media Composer the TaskManager reports 200Mbit. Observing the tick time at every read, I note that each read are spaced of about 30ms in time (correct, rate is 25Hz) but I didn't see double reads (that is different instances that read same frame).  Any suggestions ?  How can I detect who generate this doubled flow ?

    Regards

  • Wed, Mar 1 2017 12:00 AM In reply to

    • mikedeluca
    • Not Ranked
    • Joined on Tue, Feb 28 2017
    • Posts 5
    • Points 55

    Re: Network flow doubled

    Francesco, I am glad your issue was resolved and thank you for the new issue report.  For the benefit of the forum, I will repeat our conversation:

    I said:

    I have seen your report.  I have a some questions and a few suggestions.

    1.      It seems you are running on Windows, is that correct?

    2.      Please do the same experiment with the same file on local disk storage to see what can be measured for bytes per second (sometimes network mapping can result in more transfers than expected.)

    3.      If you are running Windows, you can use Process Monitor to get more details on I/O https://technet.microsoft.com/en-us/sysinternals/bb896645

    4.      Use the AMAValidator  option ‘—readVideoSamplesProvided’ to measure throughput.

    5.      Write you own client test program to replace Media Composer to measure throughput.

    You replied:

    Dear Mr. De Luca
    thank for the fast response.  I found the cause using Process Monitor.  It seems is Media Composer that generate the high traffic
    in retrieving audio.
    Setting the audio as  UncompressedSound_UndefinedCodingStandard and reading it from the plugin.  In this case the
    network flow is as expected (about 100MBit).
    I want to advise that i found a situation in which Media Composer crashes.  In first I thought that was due to my plugin, but
    I made some test with other files and the behavior is the same.
    If I select a directory with source browser, it show me all files in that directory and the plugin that will import them.
    If I add another file in the directory, it will be showed like the others as well. But if I play one file in that directory and
    during playing I add another file, Media Composer crashes.  I made this test using files parsed by my plugin (files
    with extension ".blt") and with mxf files (DNxHD).  The result is the same.
    The problem is still in the latest version of Media Composer 8.7.2.
    Regards
    Francesco Cuzzocrea

     

Page 1 of 1 (2 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller