Unverified Commit a6429723 authored by Alex James's avatar Alex James
Browse files

dash-mpd-cli: add mp4decrypt and MP4Box to wrapper $PATH

dash-mpd-cli defaults to using mp4decrypt from Bento4 for decrypting
streams, though it can also use Shaka Packager. Nixpkgs currently
patches dash-mpd-cli to default to using Shaka Packager and does not
include mp4decrypt in the binary wrapper's $PATH. Unfortunately some
streams may fail to decrypt with Shaka Packager. To better support the
--decryption-application option in dash-mpd-cli, add bento4 and gpac to
the binary wrapper's $PATH. Also drop the Shaka Packager patch to better
match the upstream behavior. MP4Box from GPAC is used for binary WebVTT
and MPEG-4 timed text (TX3G) subtitle conversion.
parent c7f27e33
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4,8 +4,10 @@
  rustPlatform,
  fetchFromGitHub,
  makeWrapper,
  bento4,
  protobuf,
  ffmpeg,
  gpac,
  libxslt,
  shaka-packager,
  nix-update-script,
@@ -31,10 +33,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
    hash = "sha256-Q8+HTDdeaqDroBZ1AS+jDxf0yq20jZ+raRCh7gEJYn8=";
  };

  patches = [
    ./use-shaka-by-default.patch
  ];

  cargoHash = "sha256-YnA/LTw9xCLSnNuFDXlsGzAiTdsst2uIDewuohkkgDU=";

  nativeBuildInputs = [
@@ -49,8 +47,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
    wrapProgram $out/bin/dash-mpd-cli \
      --prefix PATH : ${
        lib.makeBinPath [
          (lib.getBin ffmpeg)
          (lib.getBin libxslt)
          bento4
          ffmpeg
          gpac
          libxslt
          shaka-packager-wrapped
        ]
      }
+0 −12
Original line number Diff line number Diff line
diff --git a/src/main.rs b/src/main.rs
index f720d4c..a3c6c85 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -325,6 +325,7 @@ async fn main () -> Result<()> {
              .value_name("APP")
              .num_args(1)
              .value_parser(["mp4decrypt", "shaka"])
+             .default_value("shaka")
              .help("Application to use to decrypt encrypted media streams (either mp4decrypt or shaka)."))
         .arg(Arg::new("save-fragments")
              .long("save-fragments")