How to optimize MF Media Source for MKV playback (containing H264 and AC3)

I've built a working Media Foundation Media Source for matroska (MKV files) using the sample for an MPEG Source.  I've finally gotten it to a point where I can play the file and both video and audio are visible and audible.  I followed the MPEG1Source
code quite closely actually.
However, I can't seem to make the video playback smoothly.  Audio plays fine, but video just can't seem to keep up with the playback speed. It stutters and breaks up into blocks constantly.
The only thing I have been able to try is to remove as much dynamic allocation of memory as I can.   While my parser parses the file and initially creates a bunch of objects on the heap (pertaining to track formatting, cue locations, etc)
, when I start actually parsing video and audio frames, I'm no longer dynamically allocating memory on the heap.  I even removed a std::queue for frame lengths and created a fixed length circular buffer instead.
What else do I need to try?
I am simply parsing each of the video and audio frames in the order that they appear in the file.  The frames are not Annex B compatible (for H264), so in the DeliverPayload function I replace the length section of each NAL unit within the frame
with a start code of 00 00 00 01.   Then I copy the frame into the stream's buffer.  
One thing that is very different from the MPEG1Source example is that I am not creating structs that contain all of the video "initialization" data (i.e. MPEG1StreamHeader, MPEG1SystemHeader, MPEG1PacketHeader).  Instead, I am leaving all
of it as public variables on my parser class.  So I am referring back to my parser quite a bit from the MKVSource class.  I don't know if this affects anything. 
Anyways, I'd be happy to elaborate to get this working... Thanks!
Lee McPherson

Just a follow-up:
I was indeed calculating the timecode / timestamp incorrectly.  MKV uses a technique called lacing to stitch frames together and save space.  While I was separating them and forwarding them correctly to the pipeline, the timecode in the header
for each laced block only applies to the first frame.  I needed to add the default duration time to each successive frame laced in the block.
While not specifying the timestamp using the SetSampleTime method caused smooth video, it was actually playing faster than the audio.  Each frame _needs_ a timestamp to sync correctly with the audio or other streams.
Lee McPherson

Similar Messages

  • I need to know how to size a media server for 800-1200 user

    i need to know how to size a media server for 800-1200 user

    Please clarify what you mean. Do you already have an iPhone? If so, and it came from the US and is (presumably) carrier locked, you're out of luck. NONE of the US carriers will unlock iPhones. There are no exceptions.
    The unlocked iPhone 4S is not yet available in US Apple retail stores. All phones sold at retail in the US are currently carrier locked.

  • HT204291 how do get the media icon for mac mirroring when running airplay on itunes?

    how do get the media icon for mac mirroring when running airplay

    Airplay mirroring requires a Mac from 2011 or later, running OSX 10.8 (or later)
    http://support.apple.com/kb/HT5404?viewlocale=en_US&locale=en_US

  • How can I export to PDF for Offset printing including color and grayscale photo's?

    After reading dozens of forum, I still don’t found the answer.
    I made a photobook with full-colur and B/W photos for Offset printing. I want the B/W to be in grayscale to avoid color possible color shades. It seems InDesign doesn’t support grayscale, the images become way to dark. Even with exporting without any colour conversion or destination and/or including original colour profiles, the grayscale pictures are being exported to dark to PDF.
    How can I export to PDF for Offset printing including color and grayscale photo’s?

    Yes, the Photoshop & ID CMYK working spaces are the same
    This can get difficult because the 3 programs handle soft proofing differently.
    The working spaces don't matter, it's the document profile(s) that manage the preview. So here is the same grayscale image placed in ID on top and PS on the bottom. I've set my Photoshop info to show the doc profile in the lower left corner. I can see my InDesign's Document CMYK profile in my Proof Setup (the Working CMYK is different and isn't being used). Both profiles are effectively the same Coated FOGRA39 (Black Ink FOGRA in the case of PS).
    But the previews don't match because I have Overprint turned off, so the InDesign preview is Gamma 2.2 or a "screen" media preview.
    If I turn on Overprint preview I get a match because I'm soft proofing for print:

  • How to Use the same iview for both KM End User and the KM Administrator

    Hi friends,
    *This is my scenario :* How to Use the same iview for both KM End User and the KM Administrator but with different Context
    Menu Options.
    i followed these steps but im getting same context menu for both KM End User and the KM Administrator .
    Assign the role Content Administrator to the user km_admin. This is needed so that km_admin can change
    the presentation settings for the KM Folder u201EReports_kmFolder‟.
    Now, login with user km_admin. Navigate to the Km Folder reports_kmFolder through Content Administration
    -> Km Content. Click on Details link of the folder reports_kmFolder.
    Go To Settings -> Presentation. Click on the tab u201ESettings for You‟-> Click on button u201ESelect Profile‟.
    Select the radio button corresponding to u201Elayout Set‟, and choose u201EConsumerExplorer‟ from the dropdown.
    Click u201EOK‟.
    Select both the check boxes corresponding to Items Affected as shown above, and click u201ESave‟
    Now, remove the u201ESuper Administrator‟ role from the user km_admin and login with this user.
    How rto resolve this????
    Regards,
    Prasad.

    Hello Prasad,
    Most likely the user km_admin still has system principal roles assigned, even though you removed the Super Admin role, you should check that this user doesn't have any other admin roles, otherwise it will be considered a System Principal user and will therefore still have access to all content. For more information see http://help.sap.com/saphelp_nw70/helpdata/en/19/56f28fbd4e11d5993b00508b6b8b11/frameset.htm
    Try creating a new user with just read access to the content and you should see that it will not be able to make any changes etc.
    Regards,
    Lorcan.

  • How can I find my password for iTunes?  Forgot it and can't see how to restore or change

    How can I find my password for iTunes?  Forgot it and can't see how to restore or change it.  It is not the same as the apple id password - or so my iPhone iTunes says - Help

    I don't want to reset my apple ID password. I know it's right. It doesn't work on Itunes to restore my phone. All the passwords I know are not working. I want to know why.

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How to specify html5 fallback source for Apple devices?

    I see that SMP will support both Flash and HTML5 video formats. However, I don't see where I can give more than one video source. I am using FMS 4.5 and have both HDS and HLS streams available. I was putting them in different containers (one using html5 tags, the other using SMP) on the same web page, but am looking at combining them to be more elegant. Is this something that can be done with SMP?

    Nuts. JW Player works great for canned videos that are on the same server as JW Player, but when I try to play live streaming video from Amazon Cloudfront using JW Player stored on a different AWS server, I get cross domain errors.
    I don't get those errors when running Strobe Media Player hosted by Adobe. So, I'm back where I started. How do I specify multiple sources in SMP?
    If I can't do that, I guess I'll have to set up EBS on the Amazon server that hosts the Flash Media Server so I can put the JW Player files on it and not have to recopy it every time I bring the server up...

  • How to find out data source for a datawindow?

    I have a datawindow and I want to identify it's datasource.
    I open this datawindow in pb. then in design menu, Data Source is disabled. It means not direct sql
    Then I go to Column Specific(small window), and right click on any space, in the popup menu, there is no 'Stored Procedure...'. It means not procedure.
    (see screeshot attached)
    then how to find out the data source for this datawindow?

    Hi Kent;
    1) I would use the RHMB on the DWO in the System Tree and select the "Edit Source" option.
    2) In the DWO source, locate the "TABLE ( ...." line
    3) If the next major line starts with "DATA(...." then this is an external DWO.
    4) If the next major line starts with "Retrieve(...." then this is a normal DWO (SQL or SP based).
    5) If the next major line starts with "webservice=(WSDL...." then this is a Web Service based DWO.
    Note: if your DWO has no #3, 4 or 5, then its external.
    HTH
    Regards ... Chris

  • How to rip with Media Source when not Administrato

    It looks like MediaSource cannot rip audio CDs when user is not logged as Administrator on Windows XP SP2.
    How can I make it work for regular users (not Administrators) ?
    Thanks

    There are also problems getting Creative software to recognise that a player is attached when not logged on as an Admin - see this thread. Windows Explorer see the player and so does Windows Media Player, but MediaSource and Creative Media Explorer don't.
    C'mon Creative, your software doesn't seem to be fully compatible with the user groups that XP Home uses! What are you going to do about it's
    PB

  • How to make CRM data sources for delta capability?

    Hi All,
    I know that the CRM data sources 0CRM_SALES_ACT_1, 0CRM_QUOTATION_I, 0CRM_SALES_ORDER_I have delta capability.
    At present we are doing full loads daily but it has got some performance issues.So we are thinking to make these as delta loads.
    Already some one has made a trail to make delta loads but not successful for some unknown reasons.
    Could you please suggest me the steps to make these data sources delta capable both in CRM and BW systems?
    As this is urgent...Please suggest ASAP.

    Hi
    Go thorugh Below the note: 692195
    Summary
    Symptom
    There may be problems or issues related to data tranfer from CRM to BW.
    Other terms
    CRM-BW extraction,upload,initial,delta,full upload ,Sales Analytics,
    Reason and Prerequisites
    There could be errors in customization or program errors due to which
    data may not be transferred or incorrectly transferred to BW.
    Solutions
    Question 1 : The Extraction from CRM to BW takes a very long time. What can be done? (Performance Issues)
    Suggestion 1: Please implement notes  653645 (Collective note) and
    639072(Parallel  Processing).
    The performance could be slow because of the wrong control parameters
    used for packaging.
    You can change the package size for the data extraction.
    Also note that changing the package size in the transaction SBIW
    would imply a change for all the extractors. Instead, you could
    follow the path in the bw system.
    Infopackage (scheduler)    > Menu 'Scheduler'   > 'DataS. default data
    transfer'   > maintain the value as 1500 or 1000(This value is variable)
    The package size depends on the Resources available at the customer side
    (The no of parallel processes that could be assigned =
    1.5 times the no of CPU's available approx.)
    Question 2 : On executing transaction RSA3 I get records but I find 0
    records when I load data from BW request.(No Data Available)
    Suggestion 2: First check if there are any entries in the table
    CRMD_ORDER_INDEX.Only if there are entries in this table you can
    extract records.
    If this is not the case then,
    It is possible that the user does not have sufficient
    authorities for extraction of  the relevant objects.
    Additionally, please review and implement the following notes
    615670
    161570
    150315
    618953
    If you are in the release 4.0 then
    To do BW extraction with the user please see that the following
    authorization object exists(display mode is enough):
    CRM_ACT,CRM_OPP, CRM_LEAD, CRM_SAO, CRM_SEO, CRM_CO_SE,CRM_CO_SC
    CRM_CO_SA, CRM_CON_SE, CRM_CMP, CRM_ORD_OP,CRM_ORD_LP,CRM_ORD_PR
    CRM_ORD_OE, CRM_CO_PU, CRM_CO_PD, CRM_ORD_PO
    (all these objects are linked to transaction crmd_order).
    Question 3 : The Deltas for my data source are not extracted . What can I do?
    Suggestion 3: Please check the following.
    Please Check if the services have been generated in transaction GNRWB.
    If they are not active(not marked 'X' before their names) then activate
    the services following the steps here.
    Go to transaction GNRWB
    Select BUS_TRANS_MSG
    Select (on the right, the services) : BWA_DELTA3, BWA_FILL, BWA_queue
    Press Generate.
    Also check  for the following:
    1. The delta should have been initialized successfully.
    2. Confirm that all Bdocs of type BUS_TRANS_MSG
       are processed with success in SMW01.
    3. If there are queues in SMQ1 with erroneous status then activate
       these queues.
       In Transaction SMQ1 if there are Queues existing with
       names beginning with CRM_BWAn (n is number) then
       activate these queues in the same transaction.
    4.a)If required activate the datasource
        Go to transaction BWA5   > select the required datasource and
        activate.
    4 b) The Delta may not be active ,activate the delta in BWA7 by
      selecting the name of the datsource and pressing the candle icon for
      'activate delta'.
    5. In BW system
       Go to transaction RSA1   > modeling   > infosources   > select the
       infosource   > right mouse click on the selected
       infosource   > choose option replicate datasource
        Activate the infosource.
    6. Go to the scheduler for the infosource   > select delta  in the
        update  >choose the option PSA only (in the Processing tab)
        > start immediately
    Check the entry in the RSA7 in the OLTP(CRM system)
    Question 4: How can I extract the fields, which are not provided in the standard  data source extraction .
    Suggestion 4: Follow the steps mentioned below.
    1. Enhance Extract Structure with the required fields. (Create & include
       an append structure to the extract structure via transaction RSA6).
    2.a) Release the fields of the append  for usage. (  To do this, double
       click on the Datasource and remove the flags in the column 'Hide
       Field' for all fields of Append. )
    2.b)If the new fields cannot be seen in the extract structure of
        the transaction BWA1 then change and save the datasource, and then
        activate it in RSA6.
    3. Define your mappings in BADI (CRM_BWA_MFLOW) to fill these fields.
    Goto SPRO .
    Follow the path ->
    SAP Implementation guide ->Implementation with other mySAP components ->
    Data transfer to the Business Information Warehouse->
    Settings for the application specific datasources (CRM)->
    Settings for BW adapter->
    Badi :BW adapter :Enhancement of datasources in messaging flow.
    4. Replicate the new Datasource to BW.
    5. Expand the Communication Structure in BW.
    6. Maintain transfer Rules for the new Datasource.
    7. Activate the trasfer rules and perform the upload.
    Question 5:  I am unable to extract  user status correctly.What should I
    do?
    Suggestion 5 :Check the following notes
    531875
    616062
    713458
    700714
    765281
    Question 6 : What can I  do when the activity/Opportunity/Complaint
    reasons(Code,CodeGruppe,Katalogart)  are not extracted.
    Suggestion 6 :Check the following notes
    481686
    516820
    603609
    617411
    711146
    Question 7:Deleted opportunities are not reflected in BW.
    Suggestion 7: Check the note 706327.
    Question 8: How do you  activate the metadata?
    Suggestion 8:CRM BW adapter meta data has to be activated first before
    it is available in the system. You can use Transaction BWA5 to copy the
    meta data for selected DataSources. You can reach the transaction via
    the IMG maintenance 'SAP Reference IMG -> Settings for SAP Business
    Information Warehouse -> Activate BW Adapter Meta Data'. For more
    information, see the documentation on the IMG activity 'Activate BW
    Adapter Meta Data'.  (Note 432485)
    Question 9: I donot get any records for the delta upload of my attribute
    datasource(s).What is to be done?
    Suggestion 9: In case of attribute datasources, it is possible that the
    entry for the GUID is missing in the table SMOXAFLD.
    If , for example the datasource 0CRM_OPPT_ATTR is not giving deltas
    then you can follow the steps:
    1)If Delta process is active for the attribute datasource e.g.
         0CRM_OPPT_ATTR,  then stop the delta process in the BW
         system 
    2) In the CRM system, Make the entry in the table SMOXAFLD
       for the datasource with the Key
       as  0CRM_OPPT_ATTR     GUID 3) Save the entry.Activate the datasource                           4) Check that the above entry is replicated in smoxafld_s also    after this.               5) Create a transport request manually for the following    object             R3TR   SMO4   0CRM_OPPT_ATTR    
    Question 10: What do the status BWSTONESYS0 , BWSTONEUSS0,BWSTTECSYS0 and various other BW status mean ?
    Suggestion 10: The BW status are used to extract system and user defined
    status.
    The BW status are defined in the customization settings in SPRO.
    Check for-> Status Concept for BP/Product/CRM objects
    Here goto-> Process user status You will find the documentation attached here for the user status. Going inside the transaction you will find the status groups USS0, ZIOP,ZMOP etc. The names of the various BW status are derived from this For ex. BW + ST+ One + USS0 gives the name of the field BWSTONEUSS0 or BWST + ONE + ZMOP = BWSTONEZMOP (Master opportunity values) (which means BWST + (status group name) + status object group name) Double clicking on any of the object groups will take you to the values that these status can have . For ex. BWSTONEUSS0 in your system can have values E001 ,E002,E003,E007 which will be shown in RSA3 as BW status values 1,2,3,7, respectively.
    Similarly we have Goto -> Process system status (in SPRO). Here you can get the values for the system status in exactly the same way as BWSTONESYS0(Lifecycle status) , BWSTTECSYS2 (Error) etc. In RSA3 you get the names as BW status, To know which corresponds to which status here,Gotothe record list in RSA3 . Here goto Settings - Layout -Current . Right click -> Press Show technical field names . You will be able to see the BW status names and will be able to adjust the layout accordingly.
    Thank you,
    DST

  • How To Use Flash Media Server For RPG Game Development Project ?

    I have a educational music video game development project (A Sea Voyage)  for whcih I am thinking to use the Adobe Flash Media Server for develping the 3D Game for which I plan to also use two other key tools,  blenderartist.org for 3D Creation of my ship, and use the popular game engine tool,  unity.com to integrated all my game elements.
    How to use the Adobe Flash Video Streaming Server Element for this RPG Type Game, internet friendly and desktop anchored ?
    Cafe Twin
    Metro Washington DC Hub

    I'm more or less in the same boat. I've got the admin console
    up. I am able to run the vodtest application locally pointing the
    video file to rtmp://localhost/vod/sample.flv or using the server
    name instead of localhost as in rtmp://mclmedia/vod/sample.flv
    I can also load the html and swf file to my xp machine that
    has access to the server via our internal network. (DNS isn't
    configured yet) But the connectionFailed message appears when I try
    to call the videos using rtmp://mclmedia/vod/sample.flv

  • How to create master data source for Profit center group in source system

    Profit center group information is available in SAP(T-code:kch3). But, I want to have this information in BW too.
    Can anyone tell me how to create a datasource for Profit center group? And which SAP table is able to feed master data for this information?
    Many thanks
    rajatina.

    HI ,
    It looks lilke we need to use the FM like 'G_SET_LIST_SELECT' to get the Profit
    Here ais note from the forums to get profit center group from table
    From Table SETLEAF,  Field SETCLASS  =  '0106'. Field SUBCLASS with controlling area. Profit center in Field VALFROM.
    You will get Group name in Field SETNAME.
    Regards,
    Sathya

  • How to optimize building from source.

    Hi, ive read about MAKE options to optimize the package youre building, like "-march, -O3, -pipe and -fomit-frame-pointer"
    Is there another ways to improve package speed and optimize?

    bangkok_manouel wrote:
    I'm surprised no one's using the new graphite branch loop optimizations:
    -floop-interchange -floop-strip-mine -floop-block (See http://gcc.gnu.org/gcc-4.4/changes.html)
    Using this since GCC4.4 was pushed in [TESTING], no build problems at all. Of course, the performance gain is >>!*HUGE*!<< but won't be noticed by any human being. ;-)
    Found this in another thread... not sure how sarcastic he is being... is it worth using those optimizations?

  • How to keep that valve open for certain period of time and shut off automatically

    Hi everyone,
    The objective of the VI is to measure pH and then open acid or base valve based on pH valve. Below is my UNFINISHED VI
    My question is:  if, for example, the  pH is 10, then, the program will open acidic valve for 5 seconds and then shut off automatically. After that, wait for 5 second. this process will go on and on as I use while loop, but I just dont know how to control the valve on for 5sec and off and then wait for 5sec.
    Anyone can help me out?    Thank you very much
    In the picture, please enter those values before running
    P.S The VI is based on previously posted vi by someone who made it 1 yrs ago.
    Attachments:
    project_trial_1_26.vi ‏27 KB
    Capture.JPG ‏79 KB

    1. The reason the valves close immediately is that the Elapsed Time VI does not cause any wait, it only measures the time. So the valves closed within a small fraction of a second of the time they opened.
    2. I modified your VI to wait until the Elapsed Time has ended.  See the "wait" state.  I probably modified some of your other functionality in the process, but this shows one way you could do the timing. 
    3. You do not need any Value property nodes.  They should never be used if the value can be wired directly.
    4. You do not need any sequence structures. Dataflow will determine the order of things occurring.
    5. If you use an enum for the state machine (and it is a good way to name and select states), you should make it a type def. Then when you need to change it as I did to add several states, you only need to change the Type Def in one place and the changes propagate through to every place you used the control or constants derived from it.
    6. I added a Halt state which will close both valves before stopping the program.  When you are controlling a real world process, it is important to consider the start up and shutdown requirements. For example the digital outputs of the USB-6008 default to inputs when the device is first powered up. And, the inputs are pulled high by a 4700 ohm resistor (at least I think I recall that value). Will this open your valves before the program starts running and sets the I/O lines to outputs and forces them low?
    The USB-6008 has rather limited drive on the digital lines. You will probably need a buffer between it and the valve coils.
    PID and PWM are more complicated than I want to get into here.  First, are your valves proportional or on/off? Second, (assuming that they are on/off) how fast can you open and close them without destroying them in the first week? What is their expected lifetime in terms of the number of operations? How fast do you need to be able to change them to keep your pH where you want it?  Are these values compatible?
    Lynn
    Attachments:
    pH State.ctl ‏12 KB
    project_trial_1_28.2.vi ‏66 KB

Maybe you are looking for

  • Mac software for Cisco Aironet 340

    I have a Cisco Aironet 340 PCMCIA card that I want to use with an old PowerBook. But I can't find the download for the Mac software for this card. This page tells me to go to "http://www.cisco.com/pcgi-bin/tablebuild.pl/aironet-utils-mac." but it jus

  • QuickTime 7.1.1 Upgrade or Install

    I have been trying to upgrade, then install an upgrade from 7.1 to 7.1.1, but every time I get an installer error (log is below). I deleted the QT folders for the system and library, but still get the same errors...please HELP (I hope I didn't screw

  • Servermgr_dns: no reverse DNS entry for server

    Hi all, After installing and configuring OS X Server, Tiger, I realized I had given the machine the wrong IP-address. After changing it, I'm getting the following errors every half hour: Jun 28 12:54:26 g4 servermgrd: servermgr_dns: no name available

  • HT4623 I would like to swap my primary email with my rescue email address.  How is this done?

    I would like to swap my primary email with my rescue email address.  How is this done?

  • .mac outgoing server fail

    outgoing mail for my .mac and .me accounts is failing to send for two days.  It will randomly work for a few sends and then hang. trying outgoing port swaps no luck, tried rebooting everything, no luck.  Sends OK from gmail account.  current status: