def get_segment_output_path(output_path, muxing_output_path):
    """
    Returns the output path for a stream segment.
    """
    segment_path = muxing_output_path
    substr = muxing_output_path[0:len(output_path)]

    if substr == output_path:
        return muxing_output_path[len(output_path):]

    return segment_path