at 22.05-pre 988 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: 2 3let 4 # Download Big Buck Bunny example, licensed under CC Attribution 3.0. 5 testMkv = pkgs.fetchurl { 6 url = "https://github.com/Matroska-Org/matroska-test-files/blob/cf0792be144ac470c4b8052cfe19bb691993e3a2/test_files/test1.mkv?raw=true"; 7 sha256 = "1hfxbbgxwfkzv85pvpvx55a72qsd0hxjbm9hkl5r3590zw4s75h9"; 8 name = "test1.mkv"; 9 }; 10 11in 12{ 13 name = "handbrake"; 14 15 meta = { 16 maintainers = with pkgs.lib.maintainers; [ ]; 17 }; 18 19 machine = { pkgs, ... }: { 20 environment.systemPackages = with pkgs; [ handbrake ]; 21 }; 22 23 testScript = '' 24 # Test MP4 and MKV transcoding. Since this is a short clip, transcoding typically 25 # only takes a few seconds. 26 start_all() 27 28 machine.succeed("HandBrakeCLI -i ${testMkv} -o test.mp4 -e x264 -q 20 -B 160") 29 machine.succeed("test -e test.mp4") 30 machine.succeed("HandBrakeCLI -i ${testMkv} -o test.mkv -e x264 -q 20 -B 160") 31 machine.succeed("test -e test.mkv") 32 ''; 33})