### Development Setup Commands Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Development setup: install dependencies, build debug binary, run tests, format code, and lint with clippy. ```bash make deps # Install dependencies make debug # Build debug version make test # Run tests make fmt # Format code make clippy # Lint ``` -------------------------------- ### Example ffdash config.toml Source: https://github.com/bcherb2/ffdash/blob/main/README.md Example configuration file showing startup and defaults sections. The startup section controls whether encoding starts automatically and whether to scan on launch. The defaults section sets the default encoding profile and the number of concurrent encode jobs. ```toml [startup] autostart = false # Wait for manual start scan_on_launch = true # Scan directory on launch [defaults] profile = "1080p Shrinker" # Default encoding profile max_workers = 1 # Concurrent encode jobs ``` -------------------------------- ### One-off override with --autostart Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Command-line example that overrides the default review-first behavior to start encoding immediately for a single run. The comment notes that normally you review first, but this batch is urgent. ```bash # Normally review first, but this batch is urgent: ffdash --autostart /path/to/videos ``` -------------------------------- ### Quick Build with make Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Quick build sequence: install dependencies, build release binary, install to /usr/local/bin, and verify with ffdash --help. ```bash # Install dependencies (Rust + FFmpeg) make deps # Build optimized binary make release # Install to /usr/local/bin sudo make install # Verify ffdash --help ``` -------------------------------- ### Custom Install Location with make install PREFIX Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Install to a custom prefix. Use PREFIX=$HOME/.local for user-local install without sudo, or PREFIX=/opt with sudo for system-wide install. ```bash # Install to ~/.local/bin (no sudo needed) make install PREFIX=$HOME/.local # Install to /opt/bin sudo make install PREFIX=/opt ``` -------------------------------- ### Troubleshooting: Permission denied on install Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Install with sudo to fix permission denied errors during installation. ```bash sudo make install ``` -------------------------------- ### Install both prerequisites automatically with make deps Source: https://github.com/bcherb2/ffdash/blob/main/README.md Automatically install both Rust and FFmpeg prerequisites. ```bash make deps ``` -------------------------------- ### Build ffdash from source Source: https://github.com/bcherb2/ffdash/blob/main/README.md Build ffdash from source and install it to /usr/local/bin. ```bash git clone https://github.com/bcherb2/ffdash.git cd ffdash make release sudo make install # Installs to /usr/local/bin ``` -------------------------------- ### Sample config.toml with startup and defaults Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Example configuration file showing the [startup] and [defaults] sections. autostart default is false, scan_on_launch default is true, profile default is "1080p Shrinker", and max_workers default is 1. Edit these values in your config to change behavior. ```toml [startup] # Automatically start encoding when TUI launches autostart = false # Scan for video files on launch (false = start with empty dashboard) scan_on_launch = true [defaults] # Default encoding profile profile = "1080p Shrinker" # Concurrent encoding jobs (1 = sequential) max_workers = 1 ``` -------------------------------- ### Install Rust 1.85+ with rustup Source: https://github.com/bcherb2/ffdash/blob/main/README.md Install Rust 1.85+ (edition 2024) using rustup, then verify the installed version. The rustc --version command should output 1.85.0 or higher. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source ~/.cargo/env rustc --version # Should show 1.85.0 or higher ``` -------------------------------- ### Verify ffdash installation Source: https://github.com/bcherb2/ffdash/blob/main/README.md Verify the installation: check FFmpeg configuration and display all available commands. ```bash ffdash check-ffmpeg # Verify FFmpeg is configured correctly ffdash --help # Show all commands ``` -------------------------------- ### Adding a Unit Test Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md A basic unit test example using the default configuration and asserting command output. ```rust #[test] fn test_my_feature() { let mut config = default_config(); config.my_setting = 42; let cmd = build_test_cmd(&config, "MyTest"); assert_cmd_contains(&cmd, "-my-flag 42"); } ``` -------------------------------- ### Install ffdash via package managers Source: https://github.com/bcherb2/ffdash/blob/main/README.md Install ffdash via package managers: Arch Linux AUR with yay, or macOS/Linux Homebrew with a custom tap. ```bash # Arch Linux (AUR) yay -S ffdash-bin # macOS or Linux (Homebrew) brew tap bcherb2/ffdash brew install ffdash ``` -------------------------------- ### Command-line overrides for startup and scan Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Command-line flags that override config file settings for a session. Use --autostart to start encoding immediately, --no-autostart to wait for manual start, --scan to scan on launch, and --no-scan to start with an empty dashboard. ```bash ffdash --autostart # Start encoding immediately ffdash --no-autostart # Wait for manual start ffdash --scan # Scan on launch ffdash --no-scan # Start with empty dashboard ``` -------------------------------- ### Troubleshooting: FFmpeg not found Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Install FFmpeg on Ubuntu/Debian via apt or on macOS via Homebrew. ```bash # Ubuntu/Debian sudo apt-get update && sudo apt-get install -y ffmpeg # macOS brew install ffmpeg ``` -------------------------------- ### Install FFmpeg with VP9/AV1 support Source: https://github.com/bcherb2/ffdash/blob/main/README.md Install FFmpeg with VP9/AV1 support (tested with v8.0) on Ubuntu/Debian or macOS/Linux via Homebrew. ```bash # Ubuntu/Debian sudo apt update && sudo apt install ffmpeg # macOS (or Linux with brew) brew install ffmpeg ``` -------------------------------- ### Additional FFmpeg arguments example Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Example of additional FFmpeg arguments you can enter in the 'Additional FFmpeg Args' field in the Config screen. Arguments are parsed with shell-style quoting, so quoted strings with spaces are preserved. ```bash -an -sn -metadata title="Test Encode" ``` -------------------------------- ### GitHub Actions Integration Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Example configuration for running integration and E2E tests within a GitHub Actions workflow. ```yaml - name: Run integration tests run: cargo test --test integration - name: Run E2E tests (requires FFmpeg) run: | sudo apt-get install -y ffmpeg cargo test --test integration ffmpeg_e2e ``` -------------------------------- ### ffdash TUI mode options Source: https://github.com/bcherb2/ffdash/blob/main/README.md Shows the default TUI mode command-line options. Use --autostart or --no-autostart to control encoding start, and --scan or --no-scan to control directory scanning on launch. ```bash ffdash [OPTIONS] [DIRECTORY] Options: --autostart Start encoding immediately after scan --no-autostart Wait for manual start (overrides config) --scan Scan directory on launch (overrides config) --no-scan Start with empty dashboard ``` -------------------------------- ### Troubleshooting: Rust not found Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Fix Rust not found after installation by sourcing the cargo environment or adding the cargo bin directory to PATH. ```bash source $HOME/.cargo/env # Or add to ~/.bashrc: export PATH="$HOME/.cargo/bin:$PATH" ``` -------------------------------- ### Fully automated workflow Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Configuration and command for a fully automated workflow. The config sets autostart to true and scan_on_launch to true. Running ffdash with a path scans and starts encoding immediately. ```toml [startup] autostart = true scan_on_launch = true ``` ```bash ffdash /path/to/videos # Scans and starts encoding immediately ``` -------------------------------- ### Build the binary locally Source: https://github.com/bcherb2/ffdash/blob/main/docker/README.md Compile the ffdash binary on the host before building the Docker image, since the image is runtime-only and lacks a dev toolchain. ```bash cargo build --release ``` -------------------------------- ### Generate default config with ffdash init-config Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Use this command to create a default config file at the platform-specific path shown in the docs (e.g., ~/.config/ffdash/config.toml on Linux/macOS). The output shows the path where the config is saved. ```bash ffdash init-config ``` -------------------------------- ### Run Docker with Intel/AMD VA-API Source: https://github.com/bcherb2/ffdash/blob/main/README.md Runs the Docker container with Intel/AMD VA-API hardware acceleration. Passes the /dev/dri device and mounts a videos directory. ```bash docker run -it --rm \ --device /dev/dri:/dev/dri \ -v /path/to/videos:/videos \ ffdash:latest ffdash /videos ``` -------------------------------- ### Build the Docker image with make Source: https://github.com/bcherb2/ffdash/blob/main/docker/README.md Builds the ffdash Docker image using the Makefile target. ```bash make docker-build ``` -------------------------------- ### ffdash utility commands Source: https://github.com/bcherb2/ffdash/blob/main/README.md Lists the utility subcommands for ffdash. Use check-ffmpeg to verify FFmpeg, check-vaapi to test VA-API support, init-config to manage config, probe for metadata, scan to list videos, dry-run to preview commands, and encode-one to encode only the first pending file. ```bash ffdash check-ffmpeg # Verify FFmpeg installation ffdash check-vaapi # Test VA-API hardware encoding support ffdash init-config # Create/show config file location ffdash probe FILE # Get video duration and metadata ffdash scan DIR # List detected video files ffdash dry-run FILE|DIR # Preview FFmpeg commands ffdash encode-one DIR # Encode only the first pending file ``` -------------------------------- ### Run ffdash with Intel/AMD VA-API Source: https://github.com/bcherb2/ffdash/blob/main/docker/README.md Runs the container with VA-API support by mapping /dev/dri, mounting the media directory, and exposing SSH on port 2223. ```bash docker run -it --rm \ --device /dev/dri:/dev/dri \ -v /mnt/user/media:/videos \ -p 2223:22 \ ghcr.io/YOUR_USERNAME/ffdash:latest ``` -------------------------------- ### Review before encoding (default) workflow Source: https://github.com/bcherb2/ffdash/blob/main/CONFIG.md Configuration and command for the default review-before-encoding workflow. The config sets autostart to false and scan_on_launch to true. Running ffdash with a path shows files and waits for you to press S. ```toml [startup] autostart = false scan_on_launch = true ``` ```bash ffdash /path/to/videos # Shows files, waits for you to press S ``` -------------------------------- ### Run all integration tests Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Command to run all integration tests in the integration test file. ```bash cargo test --test integration ``` -------------------------------- ### Run with output Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Command to run integration tests with output captured (--nocapture). ```bash cargo test --test integration -- --nocapture ``` -------------------------------- ### Troubleshooting: Build errors Source: https://github.com/bcherb2/ffdash/blob/main/BUILD.md Resolve build errors by updating Rust, cleaning build artifacts, and rebuilding the release binary. ```bash rustup update # Update Rust make clean # Clean build artifacts make release # Rebuild ``` -------------------------------- ### Basic ffdash CLI usage Source: https://github.com/bcherb2/ffdash/blob/main/README.md Basic command-line usage for launching the TUI, scanning a directory, and previewing FFmpeg commands without encoding. ```bash # Launch TUI and scan current directory ffdash # Launch TUI and scan a specific directory ffdash /path/to/videos # Preview FFmpeg commands without encoding ffdash dry-run /path/to/video.mp4 ``` -------------------------------- ### Verify hardware encoding support Source: https://github.com/bcherb2/ffdash/blob/main/README.md Verify hardware encoding support: check VA-API availability and list available VP9/AV1 encoders. ```bash ffdash check-vaapi # Intel/AMD VA-API ffmpeg -encoders | grep -E "vp9|av1" # List available VP9/AV1 encoders ``` -------------------------------- ### Run Docker with NVIDIA NVENC Source: https://github.com/bcherb2/ffdash/blob/main/README.md Runs the Docker container with NVIDIA NVENC hardware acceleration. Requires GPU access and sets NVIDIA_DRIVER_CAPABILITIES to include video. ```bash docker run -it --rm \ --gpus all \ -e NVIDIA_DRIVER_CAPABILITIES=compute,utility,video \ -v /path/to/videos:/videos \ ffdash:latest ffdash /videos ``` -------------------------------- ### Run ffdash with NVIDIA GPU Source: https://github.com/bcherb2/ffdash/blob/main/docker/README.md Runs the container with NVIDIA GPU support, setting the required driver capabilities for compute, utility, and video. ```bash docker run -it --rm \ --gpus all \ -e NVIDIA_DRIVER_CAPABILITIES=compute,utility,video \ -v /mnt/user/media:/videos \ -p 2223:22 \ ghcr.io/YOUR_USERNAME/ffdash:latest ``` -------------------------------- ### Run specific test module Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Commands to run specific test modules: ffmpeg_commands, profile_workflows, config_state, and ffmpeg_e2e. ```bash cargo test --test integration ffmpeg_commands cargo test --test integration profile_workflows cargo test --test integration config_state cargo test --test integration ffmpeg_e2e ``` -------------------------------- ### Adding an E2E Test Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md An end-to-end test that requires FFmpeg, creates a temporary test video, and verifies command execution success. ```rust #[test] fn e2e_test_my_feature() { require_ffmpeg!(); let temp_dir = TempDir::new().unwrap(); let input = create_test_video(&temp_dir); let output = temp_dir.path().join("output.webm"); let mut config = default_config(); config.my_setting = 42; let cmd = build_test_cmd(&config, "E2E_MyFeature"); let test_config = FfmpegTestConfig::default(); let result = run_ffmpeg_command_string(&cmd, &input, &output, &test_config) .expect("Failed to run FFmpeg"); assert_ffmpeg_success(&result, "My feature"); } ``` -------------------------------- ### FfmpegTestConfig struct Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Configuration struct for E2E tests, controlling max frames, max duration, timeout, and output cleanup. ```rust FfmpegTestConfig { max_frames: 5, // Encode only 5 frames max_duration_secs: 0.2, // Or 0.2 seconds timeout_secs: 10, // Command timeout keep_output: false, // Delete output files } ``` -------------------------------- ### Run specific test Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Commands to run a specific test by name, e.g., test_cq_mode_generates_crf_flag and e2e_test_cq_mode_with_ffmpeg. ```bash cargo test --test integration test_cq_mode_generates_crf_flag cargo test --test integration e2e_test_cq_mode_with_ffmpeg ``` -------------------------------- ### Validate FFmpeg encoders with ffmpeg -h encoder Source: https://github.com/bcherb2/ffdash/blob/main/README.md Use these commands to verify which FFmpeg encoders are available on your system. The output confirms support for software VP9 (libvpx-vp9), VA-API VP9, software AV1 (SVT-AV1), Intel Quick Sync AV1, NVIDIA NVENC AV1, and VA-API AV1. Run them before troubleshooting encoder selection issues. ```bash ffmpeg -h encoder=libvpx-vp9 # Software VP9 ffmpeg -h encoder=vp9_vaapi # VA-API VP9 # AV1 encoders ffmpeg -h encoder=libsvtav1 # Software AV1 (SVT-AV1) ffmpeg -h encoder=av1_qsv # Intel Quick Sync AV1 ffmpeg -h encoder=av1_nvenc # NVIDIA NVENC AV1 ffmpeg -h encoder=av1_vaapi # VA-API AV1 ``` -------------------------------- ### Adding a Property-Based Test Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Uses the proptest macro to verify feature behavior across a range of values. ```rust proptest! { #[test] fn proptest_my_feature(value in 0u32..=100) { let mut config = default_config(); config.my_setting = value; let cmd = build_test_cmd(&config, "PropTest"); assert_cmd_contains(&cmd, &format!("-my-flag {}", value)); } } ``` -------------------------------- ### Run E2E tests only Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md Command to run only the E2E tests (ffmpeg_e2e module). ```bash cargo test --test integration ffmpeg_e2e ``` -------------------------------- ### Skipping FFmpeg Tests Output Source: https://github.com/bcherb2/ffdash/blob/main/tests/README.md The console output displayed when E2E tests are skipped due to missing FFmpeg. ```text Skipping test: FFmpeg not available ``` -------------------------------- ### Set TERM for SSH TUI Source: https://github.com/bcherb2/ffdash/blob/main/README.md Sets the TERM variable to xterm-256color to fix TUI display issues over SSH. Ensure your terminal supports 256 colors. ```bash export TERM=xterm-256color ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.