# Live Stream V1 API - Class Google::Cloud::Video::LiveStream::V1::SegmentSettings (v2.7.0)

2.7.0 (latest) 2.6.0 2.5.1 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.3.0 1.2.0 1.1.1 1.0.0 0.9.0 0.8.2 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Live Stream V1 API class Google::Cloud::Video::LiveStream::V1::SegmentSettings.

Segment settings for `fmp4` and `ts`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #segment_duration

    def segment_duration() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Duration)) --- Duration of the segments in seconds. The default is `6s`. Note that `segmentDuration` must be greater than or equal to [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"), and `segmentDuration` must be divisible by [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"). Valid range is \[2s, 20s\].


  All [mux_streams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Manifest#Google__Cloud__Video__LiveStream__V1__Manifest_mux_streams_instance_ "Google::Cloud::Video::LiveStream::V1::Manifest#mux_streams (method)") in
  the same manifest must have the same segment duration.

### #segment_duration=

    def segment_duration=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Duration)) --- Duration of the segments in seconds. The default is `6s`. Note that `segmentDuration` must be greater than or equal to [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"), and `segmentDuration` must be divisible by [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"). Valid range is \[2s, 20s\].


  All [mux_streams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Manifest#Google__Cloud__Video__LiveStream__V1__Manifest_mux_streams_instance_ "Google::Cloud::Video::LiveStream::V1::Manifest#mux_streams (method)") in
  the same manifest must have the same segment duration.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Duration)) --- Duration of the segments in seconds. The default is `6s`. Note that `segmentDuration` must be greater than or equal to [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"), and `segmentDuration` must be divisible by [gop_duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-VideoStream-H264CodecSettings#Google__Cloud__Video__LiveStream__V1__VideoStream__H264CodecSettings_gop_duration_instance_ "Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration (method)"). Valid range is \[2s, 20s\].


  All [mux_streams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Manifest#Google__Cloud__Video__LiveStream__V1__Manifest_mux_streams_instance_ "Google::Cloud::Video::LiveStream::V1::Manifest#mux_streams (method)") in
  the same manifest must have the same segment duration.