aws-sdk-kinesisvideoarchivedmedia 1.15.0 → 1.20.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f598f51096795a053f04bb889d2f5c1aaf38591
|
4
|
+
data.tar.gz: 4be2ea08bede51d01980f5c060a125efed214a9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dfafab22b01f078948fbf8f92cca4ba111dca6c709d577224b8bc08ea5043fa2db0ccdd61884dacb276b842d30ef797c5187fb7a31dbf6dc8983e3a5198a93f
|
7
|
+
data.tar.gz: a6b0bcfc43e1ad56e62dee2803212ec3380e1cce19a1a0e91cac024ce7678f3de6a2b0bb9bd52b1859cfdb6317f09f51d4bb7e809a2afbb7ac3deb8e22e7b992
|
@@ -254,36 +254,385 @@ module Aws::KinesisVideoArchivedMedia
|
|
254
254
|
|
255
255
|
# @!group API Operations
|
256
256
|
|
257
|
+
# Retrieves an MPEG Dynamic Adaptive Streaming over HTTP (DASH) URL for
|
258
|
+
# the stream. You can then open the URL in a media player to view the
|
259
|
+
# stream contents.
|
260
|
+
#
|
261
|
+
# Both the `StreamName` and the `StreamARN` parameters are optional, but
|
262
|
+
# you must specify either the `StreamName` or the `StreamARN` when
|
263
|
+
# invoking this API operation.
|
264
|
+
#
|
265
|
+
# An Amazon Kinesis video stream has the following requirements for
|
266
|
+
# providing data through MPEG-DASH:
|
267
|
+
#
|
268
|
+
# * The media must contain h.264 or h.265 encoded video and, optionally,
|
269
|
+
# AAC or G.711 encoded audio. Specifically, the codec ID of track 1
|
270
|
+
# should be `V_MPEG/ISO/AVC` (for h.264) or V\_MPEGH/ISO/HEVC (for
|
271
|
+
# H.265). Optionally, the codec ID of track 2 should be `A_AAC` (for
|
272
|
+
# AAC) or A\_MS/ACM (for G.711).
|
273
|
+
#
|
274
|
+
# * Data retention must be greater than 0.
|
275
|
+
#
|
276
|
+
# * The video track of each fragment must contain codec private data in
|
277
|
+
# the Advanced Video Coding (AVC) for H.264 format and HEVC for H.265
|
278
|
+
# format. For more information, see [MPEG-4 specification ISO/IEC
|
279
|
+
# 14496-15][1]. For information about adapting stream data to a given
|
280
|
+
# format, see [NAL Adaptation Flags][2].
|
281
|
+
#
|
282
|
+
# * The audio track (if present) of each fragment must contain codec
|
283
|
+
# private data in the AAC format ([AAC specification ISO/IEC
|
284
|
+
# 13818-7][3]) or the [MS Wave format][4].
|
285
|
+
#
|
286
|
+
# The following procedure shows how to use MPEG-DASH with Kinesis Video
|
287
|
+
# Streams:
|
288
|
+
#
|
289
|
+
# 1. Get an endpoint using [GetDataEndpoint][5], specifying
|
290
|
+
# `GET_DASH_STREAMING_SESSION_URL` for the `APIName` parameter.
|
291
|
+
#
|
292
|
+
# 2. Retrieve the MPEG-DASH URL using `GetDASHStreamingSessionURL`.
|
293
|
+
# Kinesis Video Streams creates an MPEG-DASH streaming session to be
|
294
|
+
# used for accessing content in a stream using the MPEG-DASH
|
295
|
+
# protocol. `GetDASHStreamingSessionURL` returns an authenticated
|
296
|
+
# URL (that includes an encrypted session token) for the session's
|
297
|
+
# MPEG-DASH *manifest* (the root resource needed for streaming with
|
298
|
+
# MPEG-DASH).
|
299
|
+
#
|
300
|
+
# <note markdown="1"> Don't share or store this token where an unauthorized entity
|
301
|
+
# could access it. The token provides access to the content of the
|
302
|
+
# stream. Safeguard the token with the same measures that you would
|
303
|
+
# use with your AWS credentials.
|
304
|
+
#
|
305
|
+
# </note>
|
306
|
+
#
|
307
|
+
# The media that is made available through the manifest consists
|
308
|
+
# only of the requested stream, time range, and format. No other
|
309
|
+
# media data (such as frames outside the requested window or
|
310
|
+
# alternate bitrates) is made available.
|
311
|
+
#
|
312
|
+
# 3. Provide the URL (containing the encrypted session token) for the
|
313
|
+
# MPEG-DASH manifest to a media player that supports the MPEG-DASH
|
314
|
+
# protocol. Kinesis Video Streams makes the initialization fragment
|
315
|
+
# and media fragments available through the manifest URL. The
|
316
|
+
# initialization fragment contains the codec private data for the
|
317
|
+
# stream, and other data needed to set up the video or audio decoder
|
318
|
+
# and renderer. The media fragments contain encoded video frames or
|
319
|
+
# encoded audio samples.
|
320
|
+
#
|
321
|
+
# 4. The media player receives the authenticated URL and requests
|
322
|
+
# stream metadata and media data normally. When the media player
|
323
|
+
# requests data, it calls the following actions:
|
324
|
+
#
|
325
|
+
# * **GetDASHManifest:** Retrieves an MPEG DASH manifest, which
|
326
|
+
# contains the metadata for the media that you want to playback.
|
327
|
+
#
|
328
|
+
# * **GetMP4InitFragment:** Retrieves the MP4 initialization
|
329
|
+
# fragment. The media player typically loads the initialization
|
330
|
+
# fragment before loading any media fragments. This fragment
|
331
|
+
# contains the "`fytp`" and "`moov`" MP4 atoms, and the child
|
332
|
+
# atoms that are needed to initialize the media player decoder.
|
333
|
+
#
|
334
|
+
# The initialization fragment does not correspond to a fragment in
|
335
|
+
# a Kinesis video stream. It contains only the codec private data
|
336
|
+
# for the stream and respective track, which the media player
|
337
|
+
# needs to decode the media frames.
|
338
|
+
#
|
339
|
+
# * **GetMP4MediaFragment:** Retrieves MP4 media fragments. These
|
340
|
+
# fragments contain the "`moof`" and "`mdat`" MP4 atoms and
|
341
|
+
# their child atoms, containing the encoded fragment's media
|
342
|
+
# frames and their timestamps.
|
343
|
+
#
|
344
|
+
# <note markdown="1"> After the first media fragment is made available in a streaming
|
345
|
+
# session, any fragments that don't contain the same codec
|
346
|
+
# private data cause an error to be returned when those different
|
347
|
+
# media fragments are loaded. Therefore, the codec private data
|
348
|
+
# should not change between fragments in a session. This also
|
349
|
+
# means that the session fails if the fragments in a stream change
|
350
|
+
# from having only video to having both audio and video.
|
351
|
+
#
|
352
|
+
# </note>
|
353
|
+
#
|
354
|
+
# Data retrieved with this action is billable. See [Pricing][6]
|
355
|
+
# for details.
|
356
|
+
#
|
357
|
+
# <note markdown="1"> The following restrictions apply to MPEG-DASH sessions:
|
358
|
+
#
|
359
|
+
# * A streaming session URL should not be shared between players. The
|
360
|
+
# service might throttle a session if multiple media players are
|
361
|
+
# sharing it. For connection limits, see [Kinesis Video Streams
|
362
|
+
# Limits][7].
|
363
|
+
#
|
364
|
+
# * A Kinesis video stream can have a maximum of ten active MPEG-DASH
|
365
|
+
# streaming sessions. If a new session is created when the maximum
|
366
|
+
# number of sessions is already active, the oldest (earliest created)
|
367
|
+
# session is closed. The number of active `GetMedia` connections on a
|
368
|
+
# Kinesis video stream does not count against this limit, and the
|
369
|
+
# number of active MPEG-DASH sessions does not count against the
|
370
|
+
# active `GetMedia` connection limit.
|
371
|
+
#
|
372
|
+
# <note markdown="1"> The maximum limits for active HLS and MPEG-DASH streaming sessions
|
373
|
+
# are independent of each other.
|
374
|
+
#
|
375
|
+
# </note>
|
376
|
+
#
|
377
|
+
# </note>
|
378
|
+
#
|
379
|
+
# You can monitor the amount of data that the media player consumes by
|
380
|
+
# monitoring the `GetMP4MediaFragment.OutgoingBytes` Amazon CloudWatch
|
381
|
+
# metric. For information about using CloudWatch to monitor Kinesis
|
382
|
+
# Video Streams, see [Monitoring Kinesis Video Streams][8]. For pricing
|
383
|
+
# information, see [Amazon Kinesis Video Streams Pricing][6] and [AWS
|
384
|
+
# Pricing][9]. Charges for both HLS sessions and outgoing AWS data
|
385
|
+
# apply.
|
386
|
+
#
|
387
|
+
# For more information about HLS, see [HTTP Live Streaming][10] on the
|
388
|
+
# [Apple Developer site][11].
|
389
|
+
#
|
390
|
+
# If an error is thrown after invoking a Kinesis Video Streams archived
|
391
|
+
# media API, in addition to the HTTP status code and the response body,
|
392
|
+
# it includes the following pieces of information:
|
393
|
+
#
|
394
|
+
# * `x-amz-ErrorType` HTTP header – contains a more specific error type
|
395
|
+
# in addition to what the HTTP status code provides.
|
396
|
+
#
|
397
|
+
# * `x-amz-RequestId` HTTP header – if you want to report an issue to
|
398
|
+
# AWS, the support team can better diagnose the problem if given the
|
399
|
+
# Request Id.
|
400
|
+
#
|
401
|
+
# Both the HTTP status code and the ErrorType header can be utilized to
|
402
|
+
# make programmatic decisions about whether errors are retry-able and
|
403
|
+
# under what conditions, as well as provide information on what actions
|
404
|
+
# the client programmer might need to take in order to successfully try
|
405
|
+
# again.
|
406
|
+
#
|
407
|
+
# For more information, see the **Errors** section at the bottom of
|
408
|
+
# this
|
409
|
+
# topic, as well as [Common Errors][12].
|
410
|
+
#
|
411
|
+
#
|
412
|
+
#
|
413
|
+
# [1]: https://www.iso.org/standard/55980.html
|
414
|
+
# [2]: http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html
|
415
|
+
# [3]: https://www.iso.org/standard/43345.html
|
416
|
+
# [4]: http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
|
417
|
+
# [5]: http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html
|
418
|
+
# [6]: https://aws.amazon.com/kinesis/video-streams/pricing/
|
419
|
+
# [7]: http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html
|
420
|
+
# [8]: http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html
|
421
|
+
# [9]: https://aws.amazon.com/pricing/
|
422
|
+
# [10]: https://developer.apple.com/streaming/
|
423
|
+
# [11]: https://developer.apple.com
|
424
|
+
# [12]: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html
|
425
|
+
#
|
426
|
+
# @option params [String] :stream_name
|
427
|
+
# The name of the stream for which to retrieve the MPEG-DASH manifest
|
428
|
+
# URL.
|
429
|
+
#
|
430
|
+
# You must specify either the `StreamName` or the `StreamARN`.
|
431
|
+
#
|
432
|
+
# @option params [String] :stream_arn
|
433
|
+
# The Amazon Resource Name (ARN) of the stream for which to retrieve the
|
434
|
+
# MPEG-DASH manifest URL.
|
435
|
+
#
|
436
|
+
# You must specify either the `StreamName` or the `StreamARN`.
|
437
|
+
#
|
438
|
+
# @option params [String] :playback_mode
|
439
|
+
# Whether to retrieve live, live replay, or archived, on-demand data.
|
440
|
+
#
|
441
|
+
# Features of the three types of sessions include the following:
|
442
|
+
#
|
443
|
+
# * <b> <code>LIVE</code> </b>\: For sessions of this type, the
|
444
|
+
# MPEG-DASH manifest is continually updated with the latest fragments
|
445
|
+
# as they become available. We recommend that the media player
|
446
|
+
# retrieve a new manifest on a one-second interval. When this type of
|
447
|
+
# session is played in a media player, the user interface typically
|
448
|
+
# displays a "live" notification, with no scrubber control for
|
449
|
+
# choosing the position in the playback window to display.
|
450
|
+
#
|
451
|
+
# <note markdown="1"> In `LIVE` mode, the newest available fragments are included in an
|
452
|
+
# MPEG-DASH manifest, even if there is a gap between fragments (that
|
453
|
+
# is, if a fragment is missing). A gap like this might cause a media
|
454
|
+
# player to halt or cause a jump in playback. In this mode, fragments
|
455
|
+
# are not added to the MPEG-DASH manifest if they are older than the
|
456
|
+
# newest fragment in the playlist. If the missing fragment becomes
|
457
|
+
# available after a subsequent fragment is added to the manifest, the
|
458
|
+
# older fragment is not added, and the gap is not filled.
|
459
|
+
#
|
460
|
+
# </note>
|
461
|
+
#
|
462
|
+
# * <b> <code>LIVE_REPLAY</code> </b>\: For sessions of this type, the
|
463
|
+
# MPEG-DASH manifest is updated similarly to how it is updated for
|
464
|
+
# `LIVE` mode except that it starts by including fragments from a
|
465
|
+
# given start time. Instead of fragments being added as they are
|
466
|
+
# ingested, fragments are added as the duration of the next fragment
|
467
|
+
# elapses. For example, if the fragments in the session are two
|
468
|
+
# seconds long, then a new fragment is added to the manifest every two
|
469
|
+
# seconds. This mode is useful to be able to start playback from when
|
470
|
+
# an event is detected and continue live streaming media that has not
|
471
|
+
# yet been ingested as of the time of the session creation. This mode
|
472
|
+
# is also useful to stream previously archived media without being
|
473
|
+
# limited by the 1,000 fragment limit in the `ON_DEMAND` mode.
|
474
|
+
#
|
475
|
+
# * <b> <code>ON_DEMAND</code> </b>\: For sessions of this type, the
|
476
|
+
# MPEG-DASH manifest contains all the fragments for the session, up to
|
477
|
+
# the number that is specified in `MaxMediaPlaylistFragmentResults`.
|
478
|
+
# The manifest must be retrieved only once for each session. When this
|
479
|
+
# type of session is played in a media player, the user interface
|
480
|
+
# typically displays a scrubber control for choosing the position in
|
481
|
+
# the playback window to display.
|
482
|
+
#
|
483
|
+
# In all playback modes, if `FragmentSelectorType` is
|
484
|
+
# `PRODUCER_TIMESTAMP`, and if there are multiple fragments with the
|
485
|
+
# same start timestamp, the fragment that has the larger fragment number
|
486
|
+
# (that is, the newer fragment) is included in the MPEG-DASH manifest.
|
487
|
+
# The other fragments are not included. Fragments that have different
|
488
|
+
# timestamps but have overlapping durations are still included in the
|
489
|
+
# MPEG-DASH manifest. This can lead to unexpected behavior in the media
|
490
|
+
# player.
|
491
|
+
#
|
492
|
+
# The default is `LIVE`.
|
493
|
+
#
|
494
|
+
# @option params [String] :display_fragment_timestamp
|
495
|
+
# Per the MPEG-DASH specification, the wall-clock time of fragments in
|
496
|
+
# the manifest file can be derived using attributes in the manifest
|
497
|
+
# itself. However, typically, MPEG-DASH compatible media players do not
|
498
|
+
# properly handle gaps in the media timeline. Kinesis Video Streams
|
499
|
+
# adjusts the media timeline in the manifest file to enable playback of
|
500
|
+
# media with discontinuities. Therefore, the wall-clock time derived
|
501
|
+
# from the manifest file may be inaccurate. If DisplayFragmentTimestamp
|
502
|
+
# is set to `ALWAYS`, the accurate fragment timestamp is added to each S
|
503
|
+
# element in the manifest file with the attribute name “kvs:ts”. A
|
504
|
+
# custom MPEG-DASH media player is necessary to leverage this custom
|
505
|
+
# attribute.
|
506
|
+
#
|
507
|
+
# The default value is `NEVER`. When DASHFragmentSelector is
|
508
|
+
# `SERVER_TIMESTAMP`, the timestamps will be the server start
|
509
|
+
# timestamps. Similarly, when DASHFragmentSelector is
|
510
|
+
# `PRODUCER_TIMESTAMP`, the timestamps will be the producer start
|
511
|
+
# timestamps.
|
512
|
+
#
|
513
|
+
# @option params [String] :display_fragment_number
|
514
|
+
# Fragments are identified in the manifest file based on their sequence
|
515
|
+
# number in the session. If DisplayFragmentNumber is set to `ALWAYS`,
|
516
|
+
# the Kinesis Video Streams fragment number is added to each S element
|
517
|
+
# in the manifest file with the attribute name “kvs:fn”. These fragment
|
518
|
+
# numbers can be used for logging or for use with other APIs (e.g.
|
519
|
+
# `GetMedia` and `GetMediaForFragmentList`). A custom MPEG-DASH media
|
520
|
+
# player is necessary to leverage these this custom attribute.
|
521
|
+
#
|
522
|
+
# The default value is `NEVER`.
|
523
|
+
#
|
524
|
+
# @option params [Types::DASHFragmentSelector] :dash_fragment_selector
|
525
|
+
# The time range of the requested fragment and the source of the
|
526
|
+
# timestamps.
|
527
|
+
#
|
528
|
+
# This parameter is required if `PlaybackMode` is `ON_DEMAND` or
|
529
|
+
# `LIVE_REPLAY`. This parameter is optional if PlaybackMode is` LIVE. If
|
530
|
+
# PlaybackMode is LIVE, the FragmentSelectorType can be set, but the
|
531
|
+
# TimestampRange should not be set. If PlaybackMode is ON_DEMAND or
|
532
|
+
# LIVE_REPLAY, both FragmentSelectorType and TimestampRange must be
|
533
|
+
# set.</p>
|
534
|
+
# `
|
535
|
+
#
|
536
|
+
# @option params [Integer] :expires
|
537
|
+
# The time in seconds until the requested session expires. This value
|
538
|
+
# can be between 300 (5 minutes) and 43200 (12 hours).
|
539
|
+
#
|
540
|
+
# When a session expires, no new calls to `GetDashManifest`,
|
541
|
+
# `GetMP4InitFragment`, or `GetMP4MediaFragment` can be made for that
|
542
|
+
# session.
|
543
|
+
#
|
544
|
+
# The default is 300 (5 minutes).
|
545
|
+
#
|
546
|
+
# @option params [Integer] :max_manifest_fragment_results
|
547
|
+
# The maximum number of fragments that are returned in the MPEG-DASH
|
548
|
+
# manifest.
|
549
|
+
#
|
550
|
+
# When the `PlaybackMode` is `LIVE`, the most recent fragments are
|
551
|
+
# returned up to this value. When the `PlaybackMode` is `ON_DEMAND`, the
|
552
|
+
# oldest fragments are returned, up to this maximum number.
|
553
|
+
#
|
554
|
+
# When there are a higher number of fragments available in a live
|
555
|
+
# MPEG-DASH manifest, video players often buffer content before starting
|
556
|
+
# playback. Increasing the buffer size increases the playback latency,
|
557
|
+
# but it decreases the likelihood that rebuffering will occur during
|
558
|
+
# playback. We recommend that a live MPEG-DASH manifest have a minimum
|
559
|
+
# of 3 fragments and a maximum of 10 fragments.
|
560
|
+
#
|
561
|
+
# The default is 5 fragments if `PlaybackMode` is `LIVE` or
|
562
|
+
# `LIVE_REPLAY`, and 1,000 if `PlaybackMode` is `ON_DEMAND`.
|
563
|
+
#
|
564
|
+
# The maximum value of 1,000 fragments corresponds to more than 16
|
565
|
+
# minutes of video on streams with 1-second fragments, and more than 2
|
566
|
+
# 1/2 hours of video on streams with 10-second fragments.
|
567
|
+
#
|
568
|
+
# @return [Types::GetDASHStreamingSessionURLOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
569
|
+
#
|
570
|
+
# * {Types::GetDASHStreamingSessionURLOutput#dash_streaming_session_url #dash_streaming_session_url} => String
|
571
|
+
#
|
572
|
+
# @example Request syntax with placeholder values
|
573
|
+
#
|
574
|
+
# resp = client.get_dash_streaming_session_url({
|
575
|
+
# stream_name: "StreamName",
|
576
|
+
# stream_arn: "ResourceARN",
|
577
|
+
# playback_mode: "LIVE", # accepts LIVE, LIVE_REPLAY, ON_DEMAND
|
578
|
+
# display_fragment_timestamp: "ALWAYS", # accepts ALWAYS, NEVER
|
579
|
+
# display_fragment_number: "ALWAYS", # accepts ALWAYS, NEVER
|
580
|
+
# dash_fragment_selector: {
|
581
|
+
# fragment_selector_type: "PRODUCER_TIMESTAMP", # accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
|
582
|
+
# timestamp_range: {
|
583
|
+
# start_timestamp: Time.now,
|
584
|
+
# end_timestamp: Time.now,
|
585
|
+
# },
|
586
|
+
# },
|
587
|
+
# expires: 1,
|
588
|
+
# max_manifest_fragment_results: 1,
|
589
|
+
# })
|
590
|
+
#
|
591
|
+
# @example Response structure
|
592
|
+
#
|
593
|
+
# resp.dash_streaming_session_url #=> String
|
594
|
+
#
|
595
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURL AWS API Documentation
|
596
|
+
#
|
597
|
+
# @overload get_dash_streaming_session_url(params = {})
|
598
|
+
# @param [Hash] params ({})
|
599
|
+
def get_dash_streaming_session_url(params = {}, options = {})
|
600
|
+
req = build_request(:get_dash_streaming_session_url, params)
|
601
|
+
req.send_request(options)
|
602
|
+
end
|
603
|
+
|
257
604
|
# Retrieves an HTTP Live Streaming (HLS) URL for the stream. You can
|
258
605
|
# then open the URL in a browser or media player to view the stream
|
259
606
|
# contents.
|
260
607
|
#
|
261
|
-
#
|
608
|
+
# Both the `StreamName` and the `StreamARN` parameters are optional, but
|
609
|
+
# you must specify either the `StreamName` or the `StreamARN` when
|
610
|
+
# invoking this API operation.
|
262
611
|
#
|
263
612
|
# An Amazon Kinesis video stream has the following requirements for
|
264
613
|
# providing data through HLS:
|
265
614
|
#
|
266
|
-
# * The media must contain h.264 encoded video and, optionally,
|
267
|
-
# encoded audio. Specifically, the codec
|
268
|
-
# `V_MPEG/ISO/AVC
|
269
|
-
# `A_AAC`.
|
615
|
+
# * The media must contain h.264 or h.265 encoded video and, optionally,
|
616
|
+
# AAC encoded audio. Specifically, the codec ID of track 1 should be
|
617
|
+
# `V_MPEG/ISO/AVC` (for h.264) or `V_MPEG/ISO/HEVC` (for h.265).
|
618
|
+
# Optionally, the codec ID of track 2 should be `A_AAC`.
|
270
619
|
#
|
271
620
|
# * Data retention must be greater than 0.
|
272
621
|
#
|
273
622
|
# * The video track of each fragment must contain codec private data in
|
274
|
-
# the Advanced Video Coding (AVC) for H.264 format
|
275
|
-
# specification ISO/IEC 14496-15][1]). For information
|
276
|
-
# stream data to a given format, see [NAL Adaptation
|
623
|
+
# the Advanced Video Coding (AVC) for H.264 format or HEVC for H.265
|
624
|
+
# format ([MPEG-4 specification ISO/IEC 14496-15][1]). For information
|
625
|
+
# about adapting stream data to a given format, see [NAL Adaptation
|
626
|
+
# Flags][2].
|
277
627
|
#
|
278
628
|
# * The audio track (if present) of each fragment must contain codec
|
279
629
|
# private data in the AAC format ([AAC specification ISO/IEC
|
280
630
|
# 13818-7][3]).
|
281
631
|
#
|
282
632
|
# Kinesis Video Streams HLS sessions contain fragments in the fragmented
|
283
|
-
# MPEG-4 form (also called fMP4 or CMAF)
|
284
|
-
#
|
285
|
-
#
|
286
|
-
# specification][4].
|
633
|
+
# MPEG-4 form (also called fMP4 or CMAF) or the MPEG-2 form (also called
|
634
|
+
# TS chunks, which the HLS specification also supports). For more
|
635
|
+
# information about HLS fragment types, see the [HLS specification][4].
|
287
636
|
#
|
288
637
|
# The following procedure shows how to use HLS with Kinesis Video
|
289
638
|
# Streams:
|
@@ -390,7 +739,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
390
739
|
# sharing it. For connection limits, see [Kinesis Video Streams
|
391
740
|
# Limits][7].
|
392
741
|
#
|
393
|
-
# * A Kinesis video stream can have a maximum of
|
742
|
+
# * A Kinesis video stream can have a maximum of ten active HLS
|
394
743
|
# streaming sessions. If a new session is created when the maximum
|
395
744
|
# number of sessions is already active, the oldest (earliest created)
|
396
745
|
# session is closed. The number of active `GetMedia` connections on a
|
@@ -398,6 +747,11 @@ module Aws::KinesisVideoArchivedMedia
|
|
398
747
|
# number of active HLS sessions does not count against the active
|
399
748
|
# `GetMedia` connection limit.
|
400
749
|
#
|
750
|
+
# <note markdown="1"> The maximum limits for active HLS and MPEG-DASH streaming sessions
|
751
|
+
# are independent of each other.
|
752
|
+
#
|
753
|
+
# </note>
|
754
|
+
#
|
401
755
|
# </note>
|
402
756
|
#
|
403
757
|
# You can monitor the amount of data that the media player consumes by
|
@@ -411,6 +765,27 @@ module Aws::KinesisVideoArchivedMedia
|
|
411
765
|
# For more information about HLS, see [HTTP Live Streaming][10] on the
|
412
766
|
# [Apple Developer site][11].
|
413
767
|
#
|
768
|
+
# If an error is thrown after invoking a Kinesis Video Streams archived
|
769
|
+
# media API, in addition to the HTTP status code and the response body,
|
770
|
+
# it includes the following pieces of information:
|
771
|
+
#
|
772
|
+
# * `x-amz-ErrorType` HTTP header – contains a more specific error type
|
773
|
+
# in addition to what the HTTP status code provides.
|
774
|
+
#
|
775
|
+
# * `x-amz-RequestId` HTTP header – if you want to report an issue to
|
776
|
+
# AWS, the support team can better diagnose the problem if given the
|
777
|
+
# Request Id.
|
778
|
+
#
|
779
|
+
# Both the HTTP status code and the ErrorType header can be utilized to
|
780
|
+
# make programmatic decisions about whether errors are retry-able and
|
781
|
+
# under what conditions, as well as provide information on what actions
|
782
|
+
# the client programmer might need to take in order to successfully try
|
783
|
+
# again.
|
784
|
+
#
|
785
|
+
# For more information, see the **Errors** section at the bottom of
|
786
|
+
# this
|
787
|
+
# topic, as well as [Common Errors][12].
|
788
|
+
#
|
414
789
|
#
|
415
790
|
#
|
416
791
|
# [1]: https://www.iso.org/standard/55980.html
|
@@ -424,6 +799,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
424
799
|
# [9]: https://aws.amazon.com/pricing/
|
425
800
|
# [10]: https://developer.apple.com/streaming/
|
426
801
|
# [11]: https://developer.apple.com
|
802
|
+
# [12]: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html
|
427
803
|
#
|
428
804
|
# @option params [String] :stream_name
|
429
805
|
# The name of the stream for which to retrieve the HLS master playlist
|
@@ -438,9 +814,9 @@ module Aws::KinesisVideoArchivedMedia
|
|
438
814
|
# You must specify either the `StreamName` or the `StreamARN`.
|
439
815
|
#
|
440
816
|
# @option params [String] :playback_mode
|
441
|
-
# Whether to retrieve live or archived, on-demand data.
|
817
|
+
# Whether to retrieve live, live replay, or archived, on-demand data.
|
442
818
|
#
|
443
|
-
# Features of the
|
819
|
+
# Features of the three types of sessions include the following:
|
444
820
|
#
|
445
821
|
# * <b> <code>LIVE</code> </b>\: For sessions of this type, the HLS
|
446
822
|
# media playlist is continually updated with the latest fragments as
|
@@ -461,6 +837,20 @@ module Aws::KinesisVideoArchivedMedia
|
|
461
837
|
#
|
462
838
|
# </note>
|
463
839
|
#
|
840
|
+
# * <b> <code>LIVE_REPLAY</code> </b>\: For sessions of this type, the
|
841
|
+
# HLS media playlist is updated similarly to how it is updated for
|
842
|
+
# `LIVE` mode except that it starts by including fragments from a
|
843
|
+
# given start time. Instead of fragments being added as they are
|
844
|
+
# ingested, fragments are added as the duration of the next fragment
|
845
|
+
# elapses. For example, if the fragments in the session are two
|
846
|
+
# seconds long, then a new fragment is added to the media playlist
|
847
|
+
# every two seconds. This mode is useful to be able to start playback
|
848
|
+
# from when an event is detected and continue live streaming media
|
849
|
+
# that has not yet been ingested as of the time of the session
|
850
|
+
# creation. This mode is also useful to stream previously archived
|
851
|
+
# media without being limited by the 1,000 fragment limit in the
|
852
|
+
# `ON_DEMAND` mode.
|
853
|
+
#
|
464
854
|
# * <b> <code>ON_DEMAND</code> </b>\: For sessions of this type, the HLS
|
465
855
|
# media playlist contains all the fragments for the session, up to the
|
466
856
|
# number that is specified in `MaxMediaPlaylistFragmentResults`. The
|
@@ -469,7 +859,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
469
859
|
# typically displays a scrubber control for choosing the position in
|
470
860
|
# the playback window to display.
|
471
861
|
#
|
472
|
-
# In
|
862
|
+
# In all playback modes, if `FragmentSelectorType` is
|
473
863
|
# `PRODUCER_TIMESTAMP`, and if there are multiple fragments with the
|
474
864
|
# same start timestamp, the fragment that has the larger fragment number
|
475
865
|
# (that is, the newer fragment) is included in the HLS media playlist.
|
@@ -481,14 +871,16 @@ module Aws::KinesisVideoArchivedMedia
|
|
481
871
|
# The default is `LIVE`.
|
482
872
|
#
|
483
873
|
# @option params [Types::HLSFragmentSelector] :hls_fragment_selector
|
484
|
-
# The time range of the requested fragment
|
874
|
+
# The time range of the requested fragment and the source of the
|
485
875
|
# timestamps.
|
486
876
|
#
|
487
|
-
# This parameter is required if `PlaybackMode` is `ON_DEMAND
|
488
|
-
# parameter is optional if
|
489
|
-
# is
|
490
|
-
#
|
491
|
-
# both
|
877
|
+
# This parameter is required if `PlaybackMode` is `ON_DEMAND` or
|
878
|
+
# `LIVE_REPLAY`. This parameter is optional if PlaybackMode is` LIVE. If
|
879
|
+
# PlaybackMode is LIVE, the FragmentSelectorType can be set, but the
|
880
|
+
# TimestampRange should not be set. If PlaybackMode is ON_DEMAND or
|
881
|
+
# LIVE_REPLAY, both FragmentSelectorType and TimestampRange must be
|
882
|
+
# set.</p>
|
883
|
+
# `
|
492
884
|
#
|
493
885
|
# @option params [String] :container_format
|
494
886
|
# Specifies which format should be used for packaging the media.
|
@@ -504,23 +896,40 @@ module Aws::KinesisVideoArchivedMedia
|
|
504
896
|
# The default is `FRAGMENTED_MP4`.
|
505
897
|
#
|
506
898
|
# @option params [String] :discontinuity_mode
|
507
|
-
# Specifies when flags marking discontinuities between fragments
|
508
|
-
# added to the media playlists.
|
509
|
-
# HLSFragmentSelector is `SERVER_TIMESTAMP`, and `NEVER` when it is
|
510
|
-
# `PRODUCER_TIMESTAMP`.
|
899
|
+
# Specifies when flags marking discontinuities between fragments are
|
900
|
+
# added to the media playlists.
|
511
901
|
#
|
512
902
|
# Media players typically build a timeline of media content to play,
|
513
903
|
# based on the timestamps of each fragment. This means that if there is
|
514
|
-
# any overlap between fragments (as is typical if
|
515
|
-
# `SERVER_TIMESTAMP`), the media player
|
516
|
-
#
|
517
|
-
#
|
518
|
-
#
|
519
|
-
#
|
520
|
-
#
|
521
|
-
#
|
522
|
-
#
|
523
|
-
#
|
904
|
+
# any overlap or gap between fragments (as is typical if
|
905
|
+
# HLSFragmentSelector is set to `SERVER_TIMESTAMP`), the media player
|
906
|
+
# timeline will also have small gaps between fragments in some places,
|
907
|
+
# and will overwrite frames in other places. Gaps in the media player
|
908
|
+
# timeline can cause playback to stall and overlaps can cause playback
|
909
|
+
# to be jittery. When there are discontinuity flags between fragments,
|
910
|
+
# the media player is expected to reset the timeline, resulting in the
|
911
|
+
# next fragment being played immediately after the previous fragment.
|
912
|
+
#
|
913
|
+
# The following modes are supported:
|
914
|
+
#
|
915
|
+
# * `ALWAYS`\: a discontinuity marker is placed between every fragment
|
916
|
+
# in the HLS media playlist. It is recommended to use a value of
|
917
|
+
# `ALWAYS` if the fragment timestamps are not accurate.
|
918
|
+
#
|
919
|
+
# * `NEVER`\: no discontinuity markers are placed anywhere. It is
|
920
|
+
# recommended to use a value of `NEVER` to ensure the media player
|
921
|
+
# timeline most accurately maps to the producer timestamps.
|
922
|
+
#
|
923
|
+
# * `ON_DISCONTIUNITY`\: a discontinuity marker is placed between
|
924
|
+
# fragments that have a gap or overlap of more than 50 milliseconds.
|
925
|
+
# For most playback scenarios, it is recommended to use a value of
|
926
|
+
# `ON_DISCONTINUITY` so that the media player timeline is only reset
|
927
|
+
# when there is a significant issue with the media timeline (e.g. a
|
928
|
+
# missing fragment).
|
929
|
+
#
|
930
|
+
# The default is `ALWAYS` when HLSFragmentSelector is set to
|
931
|
+
# `SERVER_TIMESTAMP`, and `NEVER` when it is set to
|
932
|
+
# `PRODUCER_TIMESTAMP`.
|
524
933
|
#
|
525
934
|
# @option params [String] :display_fragment_timestamp
|
526
935
|
# Specifies when the fragment start timestamps should be included in the
|
@@ -543,8 +952,8 @@ module Aws::KinesisVideoArchivedMedia
|
|
543
952
|
# can be between 300 (5 minutes) and 43200 (12 hours).
|
544
953
|
#
|
545
954
|
# When a session expires, no new calls to `GetHLSMasterPlaylist`,
|
546
|
-
# `GetHLSMediaPlaylist`, `GetMP4InitFragment`,
|
547
|
-
# can be made for that session.
|
955
|
+
# `GetHLSMediaPlaylist`, `GetMP4InitFragment`, `GetMP4MediaFragment`, or
|
956
|
+
# `GetTSFragment` can be made for that session.
|
548
957
|
#
|
549
958
|
# The default is 300 (5 minutes).
|
550
959
|
#
|
@@ -563,8 +972,8 @@ module Aws::KinesisVideoArchivedMedia
|
|
563
972
|
# playback. We recommend that a live HLS media playlist have a minimum
|
564
973
|
# of 3 fragments and a maximum of 10 fragments.
|
565
974
|
#
|
566
|
-
# The default is 5 fragments if `PlaybackMode` is `LIVE
|
567
|
-
# `PlaybackMode` is `ON_DEMAND`.
|
975
|
+
# The default is 5 fragments if `PlaybackMode` is `LIVE` or
|
976
|
+
# `LIVE_REPLAY`, and 1,000 if `PlaybackMode` is `ON_DEMAND`.
|
568
977
|
#
|
569
978
|
# The maximum value of 1,000 fragments corresponds to more than 16
|
570
979
|
# minutes of video on streams with 1-second fragments, and more than 2
|
@@ -579,7 +988,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
579
988
|
# resp = client.get_hls_streaming_session_url({
|
580
989
|
# stream_name: "StreamName",
|
581
990
|
# stream_arn: "ResourceARN",
|
582
|
-
# playback_mode: "LIVE", # accepts LIVE, ON_DEMAND
|
991
|
+
# playback_mode: "LIVE", # accepts LIVE, LIVE_REPLAY, ON_DEMAND
|
583
992
|
# hls_fragment_selector: {
|
584
993
|
# fragment_selector_type: "PRODUCER_TIMESTAMP", # accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
|
585
994
|
# timestamp_range: {
|
@@ -588,7 +997,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
588
997
|
# },
|
589
998
|
# },
|
590
999
|
# container_format: "FRAGMENTED_MP4", # accepts FRAGMENTED_MP4, MPEG_TS
|
591
|
-
# discontinuity_mode: "ALWAYS", # accepts ALWAYS, NEVER
|
1000
|
+
# discontinuity_mode: "ALWAYS", # accepts ALWAYS, NEVER, ON_DISCONTINUITY
|
592
1001
|
# display_fragment_timestamp: "ALWAYS", # accepts ALWAYS, NEVER
|
593
1002
|
# expires: 1,
|
594
1003
|
# max_media_playlist_fragment_results: 1,
|
@@ -626,9 +1035,31 @@ module Aws::KinesisVideoArchivedMedia
|
|
626
1035
|
# megabytes per second (or 200 megabits per second) during a
|
627
1036
|
# `GetMediaForFragmentList` session.
|
628
1037
|
#
|
1038
|
+
# If an error is thrown after invoking a Kinesis Video Streams archived
|
1039
|
+
# media API, in addition to the HTTP status code and the response body,
|
1040
|
+
# it includes the following pieces of information:
|
1041
|
+
#
|
1042
|
+
# * `x-amz-ErrorType` HTTP header – contains a more specific error type
|
1043
|
+
# in addition to what the HTTP status code provides.
|
1044
|
+
#
|
1045
|
+
# * `x-amz-RequestId` HTTP header – if you want to report an issue to
|
1046
|
+
# AWS, the support team can better diagnose the problem if given the
|
1047
|
+
# Request Id.
|
1048
|
+
#
|
1049
|
+
# Both the HTTP status code and the ErrorType header can be utilized to
|
1050
|
+
# make programmatic decisions about whether errors are retry-able and
|
1051
|
+
# under what conditions, as well as provide information on what actions
|
1052
|
+
# the client programmer might need to take in order to successfully try
|
1053
|
+
# again.
|
1054
|
+
#
|
1055
|
+
# For more information, see the **Errors** section at the bottom of
|
1056
|
+
# this
|
1057
|
+
# topic, as well as [Common Errors][2].
|
1058
|
+
#
|
629
1059
|
#
|
630
1060
|
#
|
631
1061
|
# [1]: https://docs.aws.amazon.com/cli/latest/reference/
|
1062
|
+
# [2]: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html
|
632
1063
|
#
|
633
1064
|
# @option params [required, String] :stream_name
|
634
1065
|
# The name of the stream from which to retrieve fragment media.
|
@@ -678,9 +1109,31 @@ module Aws::KinesisVideoArchivedMedia
|
|
678
1109
|
#
|
679
1110
|
# </note>
|
680
1111
|
#
|
1112
|
+
# If an error is thrown after invoking a Kinesis Video Streams archived
|
1113
|
+
# media API, in addition to the HTTP status code and the response body,
|
1114
|
+
# it includes the following pieces of information:
|
1115
|
+
#
|
1116
|
+
# * `x-amz-ErrorType` HTTP header – contains a more specific error type
|
1117
|
+
# in addition to what the HTTP status code provides.
|
1118
|
+
#
|
1119
|
+
# * `x-amz-RequestId` HTTP header – if you want to report an issue to
|
1120
|
+
# AWS, the support team can better diagnose the problem if given the
|
1121
|
+
# Request Id.
|
1122
|
+
#
|
1123
|
+
# Both the HTTP status code and the ErrorType header can be utilized to
|
1124
|
+
# make programmatic decisions about whether errors are retry-able and
|
1125
|
+
# under what conditions, as well as provide information on what actions
|
1126
|
+
# the client programmer might need to take in order to successfully try
|
1127
|
+
# again.
|
1128
|
+
#
|
1129
|
+
# For more information, see the **Errors** section at the bottom of
|
1130
|
+
# this
|
1131
|
+
# topic, as well as [Common Errors][2].
|
1132
|
+
#
|
681
1133
|
#
|
682
1134
|
#
|
683
1135
|
# [1]: https://docs.aws.amazon.com/cli/latest/reference/
|
1136
|
+
# [2]: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html
|
684
1137
|
#
|
685
1138
|
# @option params [required, String] :stream_name
|
686
1139
|
# The name of the stream from which to retrieve a fragment list.
|
@@ -751,7 +1204,7 @@ module Aws::KinesisVideoArchivedMedia
|
|
751
1204
|
params: params,
|
752
1205
|
config: config)
|
753
1206
|
context[:gem_name] = 'aws-sdk-kinesisvideoarchivedmedia'
|
754
|
-
context[:gem_version] = '1.
|
1207
|
+
context[:gem_version] = '1.20.0'
|
755
1208
|
Seahorse::Client::Request.new(handlers, context)
|
756
1209
|
end
|
757
1210
|
|