/AWS1/IF_REK=>STARTSEGMENTDETECTION()¶
About StartSegmentDetection¶
Starts asynchronous detection of segment detection in a stored video.
Amazon Rekognition Video can detect segments in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and
the filename of the video. StartSegmentDetection returns a job identifier (JobId) which you use to get
the results of the operation. When segment detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic
that you specify in NotificationChannel.
You can use the Filters (StartSegmentDetectionFilters)
input parameter to specify the minimum detection confidence returned in the response.
Within Filters, use ShotFilter (StartShotDetectionFilter)
to filter detected shots. Use TechnicalCueFilter (StartTechnicalCueDetectionFilter)
to filter technical cues.
To get the results of the segment detection operation, first check that the status value published to the Amazon SNS
topic is SUCCEEDED. if so, call GetSegmentDetection and pass the job identifier (JobId)
from the initial call to StartSegmentDetection.
For more information, see Detecting video segments in stored video in the Amazon Rekognition Developer Guide.
Method Signature¶
METHODS /AWS1/IF_REK~STARTSEGMENTDETECTION
IMPORTING
!IO_VIDEO TYPE REF TO /AWS1/CL_REKVIDEO OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/REKCLIENTREQUESTTOKEN OPTIONAL
!IO_NOTIFICATIONCHANNEL TYPE REF TO /AWS1/CL_REKNOTIFCHANNEL OPTIONAL
!IV_JOBTAG TYPE /AWS1/REKJOBTAG OPTIONAL
!IO_FILTERS TYPE REF TO /AWS1/CL_REKSTRTSEGMENTDETFI00 OPTIONAL
!IT_SEGMENTTYPES TYPE /AWS1/CL_REKSEGMENTTYPES_W=>TT_SEGMENTTYPES OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_rekstartsegmentdetrsp
RAISING
/AWS1/CX_REKACCESSDENIEDEX
/AWS1/CX_REKIDEMPOTENTPRMMIS00
/AWS1/CX_REKINTERNALSERVERERR
/AWS1/CX_REKINVALIDPARAMETEREX
/AWS1/CX_REKINVALIDS3OBJECTEX
/AWS1/CX_REKLIMITEXCEEDEDEX
/AWS1/CX_REKPROVTHRUPUTEXCDEX
/AWS1/CX_REKTHROTTLINGEX
/AWS1/CX_REKVIDEOTOOLARGEEX
/AWS1/CX_REKCLIENTEXC
/AWS1/CX_REKSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_video TYPE REF TO /AWS1/CL_REKVIDEO /AWS1/CL_REKVIDEO¶
Video
it_segmenttypes TYPE /AWS1/CL_REKSEGMENTTYPES_W=>TT_SEGMENTTYPES TT_SEGMENTTYPES¶
An array of segment types to detect in the video. Valid values are TECHNICAL_CUE and SHOT.
Optional arguments:¶
iv_clientrequesttoken TYPE /AWS1/REKCLIENTREQUESTTOKEN /AWS1/REKCLIENTREQUESTTOKEN¶
Idempotent token used to identify the start request. If you use the same token with multiple
StartSegmentDetectionrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidently started more than once.
io_notificationchannel TYPE REF TO /AWS1/CL_REKNOTIFCHANNEL /AWS1/CL_REKNOTIFCHANNEL¶
The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the segment detection operation. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.
iv_jobtag TYPE /AWS1/REKJOBTAG /AWS1/REKJOBTAG¶
An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. For example, you can use
JobTagto group related jobs and identify them in the completion notification.
io_filters TYPE REF TO /AWS1/CL_REKSTRTSEGMENTDETFI00 /AWS1/CL_REKSTRTSEGMENTDETFI00¶
Filters for technical cue or shot detection.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_rekstartsegmentdetrsp /AWS1/CL_REKSTARTSEGMENTDETRSP¶
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->startsegmentdetection(
io_filters = new /aws1/cl_rekstrtsegmentdetfi00(
io_shotfilter = new /aws1/cl_rekstrtshotdetectfilt( '0.1' )
io_technicalcuefilter = new /aws1/cl_rekstrttechnicalcue00(
io_blackframe = new /aws1/cl_rekblackframe(
iv_maxpixelthreshold = '0.1'
iv_mincoveragepercentage = '0.1'
)
iv_minsegmentconfidence = '0.1'
)
)
io_notificationchannel = new /aws1/cl_reknotifchannel(
iv_rolearn = |string|
iv_snstopicarn = |string|
)
io_video = new /aws1/cl_rekvideo(
io_s3object = new /aws1/cl_reks3object(
iv_bucket = |string|
iv_name = |string|
iv_version = |string|
)
)
it_segmenttypes = VALUE /aws1/cl_reksegmenttypes_w=>tt_segmenttypes(
( new /aws1/cl_reksegmenttypes_w( |string| ) )
)
iv_clientrequesttoken = |string|
iv_jobtag = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_jobid = lo_result->get_jobid( ).
ENDIF.