You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: split.rs
    path of file: ./repos/Av1an/av1an-core/src
    
    the code of the file until where you have to start completion: use std::fs::File;
use std::io::prelude::*;
use std::io::BufReader;
use std::path::Path;
use std::process::{Command, Stdio};
use std::string::ToString;

use anyhow::Context;
use serde::{Deserialize, Serialize};

use crate::scenes::Scene;

pub fn segment(input: impl AsRef<Path>, temp: impl AsRef<Path>, segments: &[usize]) {
  let input = input.as_ref();
  let temp = temp.as_ref();
  let mut cmd = Command::new("ffmpeg");

  cmd.stdout(Stdio::piped());
  cmd.stderr(Stdio::piped());

  cmd.args(["-hide_banner", "-y", "-i"]);
  cmd.arg(input);
  cmd.args([
    "-map",
    "0:V:0",
    "-an",
    "-c",
    "copy",
    "-avoid_negative_ts",
    "1",
    "-vsync",
    "0",
  ]);

  if segments.is_empty() {
    let split_path = Path::new(temp).join("split").join("0.mkv");
    let split_str = split_path.to_str().unwrap();
    cmd.arg(split_str);
  } else {
    let segments_to_st
    
  fn test_extra_split_preserves_zone_overrides() {
    let total_frames = 2000;
    let split_size = 130;
    let done = extra_splits(
      &[
        Scene {
          start_frame: 0,
          end_frame: 150,
          zone_overrides: None,
        },
        Scene {
          start_frame: 150,
          end_frame: 460,
          zone_overrides: None,
        },
        Scene {
          start_frame: 460,
          end_frame: 728,
          zone_overrides: Some(ZoneOptions {
            encoder: Encoder::rav1e,
            passes: 1,
            extra_splits_len: Some(50),
            min_scene_len: 12,
            photon_noise: None,
            video_params: into_vec!["--speed", "8"],
          }),
        },
        Scene {
          start_frame: 728,
          end_frame: 822,
          zone_overrides: None,
        },
        Scene {
          start_frame: 822,
          end_frame: 876,
          zone_overrides: None,
        },
        Scene {
          start_frame: 876,
          end_frame: 890,
          zone_overrides: None,
        },
        Scene {
          start_frame: 890,
          end_frame: 1100,
          zone_overrides: None,
        },
        Scene {
          start_frame: 1100,
          end_frame: 1399,
          zone_overrides: None,
        },
        Scene {
          start_frame: 1399,
          end_frame: 1709,
          zone_overrides: Some(ZoneOptions {
            encoder: Encoder::rav1e,
            passes: 1,
            extra_splits_len: Some(split_size),
            min_scene_len: 12,
            photon_noise: None,
            video_params: into_vec!["--speed", "3"],
          }),
        },
        Scene {
          start_frame: 1709,
          end_frame: 2000,
          zone_overrides: None,
        },
      ],
      total_frames,
      split_size,
    );
    let expected_split_locations = [
      0, 75, 150, 253, 356, 460, 504, 549, 594, 638, 683, 728, 822, 876, 890, 995, 1100, 1199,
      1299, 1399, 1502, 1605, 1709, 1806, 1903,
    ];

    for (i, scene) in done.into_iter().enumerate() {
      assert_eq!(scene.start_frame, expected_split_locations[i]);
      match scene.start_frame {
        460..=727 => {
          assert!(scene.zone_overrides.is_some());
          let overrides = scene.zone_overrides.unwrap();
          assert_eq!(
            overrides.video_params,
            vec!["--speed".to_owned(), "8".to_owned()]
          );
        }
        1399..=1708 => {
          assert!(scene.zone_overrides.is_some());
          let overrides = scene.zone_overrides.unwrap();
          assert_eq!(
            overrides.video_params,
            vec!["--speed".to_owned(), "3".to_owned()]
          );
        }
        _ => {
          assert!(scene.zone_overrides.is_none());
        }
      }
    }
  }