def _create_fmp4_muxing(encoding, output, output_path, stream): # type: (Encoding, Output, str, Stream) -> Fmp4Muxing """ Creates a fragmented TS muxing. This will generate segments with a given segment length for adaptive streaming. <p>API endpoint: https://bitmovin.com/docs/encoding/api-reference/all#/Encoding/PostEncodingEncodingsMuxingsFmp4ByEncodingId :param encoding: The encoding to add the muxing to :param output: The output that should be used for the muxing to write the segments to :param output_path: The output path where the fragmented segments will be written to :param stream: The stream that is associated with the muxing """ muxing_stream = MuxingStream(stream_id=stream.id) muxing = Fmp4Muxing(outputs=[ _build_encoding_output(output=output, output_path=output_path) ], segment_length=4.0, streams=[muxing_stream]) return bitmovin_api.encoding.encodings.muxings.fmp4.create( encoding_id=encoding.id, fmp4_muxing=muxing)
def _create_fmp4_muxing(encoding, stream): # type: (Encoding, Stream) -> Fmp4Muxing """ Creates a fragmented MP4 muxing. This will generate segments with a given segment length for adaptive streaming. <p>API endpoint: https://bitmovin.com/docs/encoding/api-reference/all#/Encoding/PostEncodingEncodingsMuxingsFmp4ByEncodingId @param encoding The encoding where to add the muxing to @param stream The stream that is associated with the muxing """ muxing = Fmp4Muxing(segment_length=4.0, streams=[MuxingStream(stream_id=stream.id)]) return bitmovin_api.encoding.encodings.muxings.fmp4.create( encoding_id=encoding.id, fmp4_muxing=muxing)