Skip to content

/AWS1/CL_MDC=>PROBE()

About Probe

Use Probe to obtain detailed information about your input media files. Probe returns a JSON that includes container, codec, frame rate, resolution, track count, audio layout, captions, and more. You can use this information to learn more about your media files, or to help make decisions while automating your transcoding workflow.

Method Signature

IMPORTING

Optional arguments:

it_inputfiles TYPE /AWS1/CL_MDCPROBEINPUTFILE=>TT___LISTOFPROBEINPUTFILE TT___LISTOFPROBEINPUTFILE

Specify a media file to probe.

RETURNING

oo_output TYPE REF TO /aws1/cl_mdcproberesponse /AWS1/CL_MDCPROBERESPONSE

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_mdc~probe(
  it_inputfiles = VALUE /aws1/cl_mdcprobeinputfile=>tt___listofprobeinputfile(
    ( new /aws1/cl_mdcprobeinputfile( |string| ) )
  )
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_proberesults( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lo_container = lo_row_1->get_container( ).
      IF lo_container IS NOT INITIAL.
        lv___double = lo_container->get_duration( ).
        lv_format = lo_container->get_format( ).
        LOOP AT lo_container->get_tracks( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lo_audioproperties = lo_row_3->get_audioproperties( ).
            IF lo_audioproperties IS NOT INITIAL.
              lv___integer = lo_audioproperties->get_bitdepth( ).
              lv___long = lo_audioproperties->get_bitrate( ).
              lv___integer = lo_audioproperties->get_channels( ).
              lo_framerate = lo_audioproperties->get_framerate( ).
              IF lo_framerate IS NOT INITIAL.
                lv___integer = lo_framerate->get_denominator( ).
                lv___integer = lo_framerate->get_numerator( ).
              ENDIF.
              lv___string = lo_audioproperties->get_languagecode( ).
              lv___integer = lo_audioproperties->get_samplerate( ).
            ENDIF.
            lv_codec = lo_row_3->get_codec( ).
            lo_dataproperties = lo_row_3->get_dataproperties( ).
            IF lo_dataproperties IS NOT INITIAL.
              lv___string = lo_dataproperties->get_languagecode( ).
            ENDIF.
            lv___double = lo_row_3->get_duration( ).
            lv___integer = lo_row_3->get_index( ).
            lv_tracktype = lo_row_3->get_tracktype( ).
            lo_videoproperties = lo_row_3->get_videoproperties( ).
            IF lo_videoproperties IS NOT INITIAL.
              lv___integer = lo_videoproperties->get_bitdepth( ).
              lv___long = lo_videoproperties->get_bitrate( ).
              lv_colorprimaries = lo_videoproperties->get_colorprimaries( ).
              lo_framerate = lo_videoproperties->get_framerate( ).
              IF lo_framerate IS NOT INITIAL.
                lv___integer = lo_framerate->get_denominator( ).
                lv___integer = lo_framerate->get_numerator( ).
              ENDIF.
              lv___integer = lo_videoproperties->get_height( ).
              lv_matrixcoefficients = lo_videoproperties->get_matrixcoefficients( ).
              lv_transfercharacteristics = lo_videoproperties->get_transfercharacteristics( ).
              lv___integer = lo_videoproperties->get_width( ).
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_metadata = lo_row_1->get_metadata( ).
      IF lo_metadata IS NOT INITIAL.
        lv___string = lo_metadata->get_etag( ).
        lv___long = lo_metadata->get_filesize( ).
        lv___timestampunix = lo_metadata->get_lastmodified( ).
        lv___string = lo_metadata->get_mimetype( ).
      ENDIF.
      LOOP AT lo_row_1->get_trackmappings( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          LOOP AT lo_row_5->get_audiotrackindexes( ) into lo_row_6.
            lo_row_7 = lo_row_6.
            IF lo_row_7 IS NOT INITIAL.
              lv___integer = lo_row_7->get_value( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_row_5->get_datatrackindexes( ) into lo_row_6.
            lo_row_7 = lo_row_6.
            IF lo_row_7 IS NOT INITIAL.
              lv___integer = lo_row_7->get_value( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_row_5->get_videotrackindexes( ) into lo_row_6.
            lo_row_7 = lo_row_6.
            IF lo_row_7 IS NOT INITIAL.
              lv___integer = lo_row_7->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
ENDIF.