Use libopus for ffmpeg

This commit is contained in:
asonix 2023-03-09 21:29:56 -06:00
parent c6e2ef52c8
commit cc314c37a6
5 changed files with 9 additions and 20 deletions

View File

@ -21,6 +21,7 @@ max_height = 10000
max_area = 40000000 max_area = 40000000
max_file_size = 40 max_file_size = 40
enable_silent_video = true enable_silent_video = true
enable_full_video = true
filters = ['blur', 'crop', 'identity', 'resize', 'thumbnail'] filters = ['blur', 'crop', 'identity', 'resize', 'thumbnail']
skip_validate_imports = false skip_validate_imports = false
cache_duration = 168 cache_duration = 168

View File

@ -27,6 +27,10 @@
default = dev; default = dev;
}; };
devShell = pkgs.callPackage ./shell.nix { }; devShell = with pkgs; mkShell {
nativeBuildInputs = [ cargo cargo-outdated cargo-zigbuild clippy gcc protobuf rust-analyzer rustc rustfmt ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
}); });
} }

View File

@ -161,11 +161,11 @@ enable_full_video = false
## Optional: set the default video codec ## Optional: set the default video codec
# environment variable: PICTRS__MEDIA__VIDEO_CODEC # environment variable: PICTRS__MEDIA__VIDEO_CODEC
# default: h264 # default: vp9
# #
# available options: av1, h264, h265, vp8, vp9 # available options: av1, h264, h265, vp8, vp9
# this setting does nothing if video is not enabled # this setting does nothing if video is not enabled
video_codec = "h264" video_codec = "vp9"
## Optional: set the default audio codec ## Optional: set the default audio codec
# environment variable: PICTRS__MEDIA__AUDIO_CODEC # environment variable: PICTRS__MEDIA__AUDIO_CODEC

View File

@ -1,16 +0,0 @@
{ pkgs
, mkShell
, cargo
, clippy
, gcc
, protobuf
, rust-analyzer
, rustc
, rustfmt
}:
mkShell {
nativeBuildInputs = [ cargo clippy gcc protobuf rust-analyzer rustc rustfmt ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}

View File

@ -310,7 +310,7 @@ impl AudioCodec {
const fn to_ffmpeg_codec(self) -> &'static str { const fn to_ffmpeg_codec(self) -> &'static str {
match self { match self {
Self::Aac => "aac", Self::Aac => "aac",
Self::Opus => "opus", Self::Opus => "libopus",
Self::Vorbis => "vorbis", Self::Vorbis => "vorbis",
} }
} }