NX Plugin Frame decode byte array Python endpoint

In Progress

Comments

2 comments

  • Avatar
    Anton Babinov

    Hi Bacchus,

    media SDK allows you to request frames in different formats. Decoding will be different based on configuration of your plugin. This behavior is controlled via streamTypeFilter and capabilities fields of the plugin manifest.

    What type of data is expected in python? SDK can provide compressed video frames or the following formats of uncompressed video:

            - `needUncompressedVideoFrames_yuv420`
            - `needUncompressedVideoFrames_argb`
            - `needUncompressedVideoFrames_abgr`
            - `needUncompressedVideoFrames_rgba`
            - `needUncompressedVideoFrames_bgra`
            - `needUncompressedVideoFrames_rgb`
            - `needUncompressedVideoFrames_bgr`

     

     

    0
    Comment actions Permalink
  • Avatar
    Bacchus Beale

    I made a C++ only version using needUncompressedVideoFrames_bgr like in the samples
    Now, I have Python endpoint doing object detection and tracking
    But when trying to imdecode it as a string or byte array with Open CV it does not work

    I also tried PIL Image frombytes and frombuffer, also does not work

    Now, I am tring other way around, get thumbnails via API and push metadata
    But I tried running HTTP listener in a new thread and adding to a queue, then use pullMetadataPackets()
    to get from the queue

    This causes NX to freeze or start/stop 

    Any ideas?

    Regards

    Bacchus

    0
    Comment actions Permalink

Please sign in to leave a comment.