experimental SVG-based video rendering engine made for music videos. React to MIDI or arbitrary signals from your DAW through "probe" VSTs
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

🚧 No shelling out for video encoding too

+608 -21
+3
.cargo/config.toml
··· 1 1 [alias] 2 2 xtask = "run --package xtask --release --" 3 + 4 + # [target.x86_64-pc-windows-gnu] 5 + # linker = "C:\\msys64\\mingw64\\bin\\gcc.exe"
+540 -1
Cargo.lock
··· 153 153 source = "registry+https://github.com/rust-lang/crates.io-index" 154 154 checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 155 155 dependencies = [ 156 - "hermit-abi", 156 + "hermit-abi 0.1.19", 157 157 "libc", 158 158 "winapi", 159 159 ] ··· 186 186 checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 187 187 188 188 [[package]] 189 + name = "bindgen" 190 + version = "0.70.1" 191 + source = "registry+https://github.com/rust-lang/crates.io-index" 192 + checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" 193 + dependencies = [ 194 + "bitflags 2.8.0", 195 + "cexpr", 196 + "clang-sys", 197 + "itertools", 198 + "proc-macro2", 199 + "quote", 200 + "regex", 201 + "rustc-hash", 202 + "shlex", 203 + "syn 2.0.98", 204 + ] 205 + 206 + [[package]] 189 207 name = "bitflags" 190 208 version = "1.3.2" 191 209 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 272 290 ] 273 291 274 292 [[package]] 293 + name = "cexpr" 294 + version = "0.6.0" 295 + source = "registry+https://github.com/rust-lang/crates.io-index" 296 + checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 297 + dependencies = [ 298 + "nom", 299 + ] 300 + 301 + [[package]] 275 302 name = "cfg-if" 276 303 version = "1.0.0" 277 304 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 307 334 checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" 308 335 309 336 [[package]] 337 + name = "clang-sys" 338 + version = "1.8.1" 339 + source = "registry+https://github.com/rust-lang/crates.io-index" 340 + checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 341 + dependencies = [ 342 + "glob", 343 + "libc", 344 + "libloading", 345 + ] 346 + 347 + [[package]] 310 348 name = "clap-sys" 311 349 version = "0.3.0" 312 350 source = "git+https://github.com/robbert-vdh/clap-sys.git?branch=feature%2Fcstr-macro#523a5f8a8dd021ec99e7d6e0c0ebe7741a3da9d4" ··· 477 515 ] 478 516 479 517 [[package]] 518 + name = "displaydoc" 519 + version = "0.2.5" 520 + source = "registry+https://github.com/rust-lang/crates.io-index" 521 + checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 522 + dependencies = [ 523 + "proc-macro2", 524 + "quote", 525 + "syn 2.0.98", 526 + ] 527 + 528 + [[package]] 480 529 name = "docopt" 481 530 version = "1.1.1" 482 531 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 539 588 ] 540 589 541 590 [[package]] 591 + name = "ffmpeg-next" 592 + version = "7.1.0" 593 + source = "registry+https://github.com/rust-lang/crates.io-index" 594 + checksum = "da02698288e0275e442a47fc12ca26d50daf0d48b15398ba5906f20ac2e2a9f9" 595 + dependencies = [ 596 + "bitflags 2.8.0", 597 + "ffmpeg-sys-next", 598 + "libc", 599 + ] 600 + 601 + [[package]] 602 + name = "ffmpeg-sys-next" 603 + version = "7.1.0" 604 + source = "registry+https://github.com/rust-lang/crates.io-index" 605 + checksum = "2bc3234d0a4b2f7d083699d0860c6c9dd83713908771b60f94a96f8704adfe45" 606 + dependencies = [ 607 + "bindgen", 608 + "cc", 609 + "libc", 610 + "num_cpus", 611 + "pkg-config", 612 + "vcpkg", 613 + ] 614 + 615 + [[package]] 542 616 name = "flate2" 543 617 version = "1.0.35" 544 618 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 581 655 "slotmap", 582 656 "tinyvec", 583 657 "ttf-parser", 658 + ] 659 + 660 + [[package]] 661 + name = "form_urlencoded" 662 + version = "1.2.1" 663 + source = "registry+https://github.com/rust-lang/crates.io-index" 664 + checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 665 + dependencies = [ 666 + "percent-encoding", 584 667 ] 585 668 586 669 [[package]] ··· 623 706 checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 624 707 625 708 [[package]] 709 + name = "glob" 710 + version = "0.3.2" 711 + source = "registry+https://github.com/rust-lang/crates.io-index" 712 + checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 713 + 714 + [[package]] 626 715 name = "goblin" 627 716 version = "0.6.1" 628 717 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 675 764 ] 676 765 677 766 [[package]] 767 + name = "hermit-abi" 768 + version = "0.3.9" 769 + source = "registry+https://github.com/rust-lang/crates.io-index" 770 + checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 771 + 772 + [[package]] 678 773 name = "hound" 679 774 version = "3.5.1" 680 775 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 733 828 ] 734 829 735 830 [[package]] 831 + name = "icu_collections" 832 + version = "1.5.0" 833 + source = "registry+https://github.com/rust-lang/crates.io-index" 834 + checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 835 + dependencies = [ 836 + "displaydoc", 837 + "yoke", 838 + "zerofrom", 839 + "zerovec", 840 + ] 841 + 842 + [[package]] 843 + name = "icu_locid" 844 + version = "1.5.0" 845 + source = "registry+https://github.com/rust-lang/crates.io-index" 846 + checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 847 + dependencies = [ 848 + "displaydoc", 849 + "litemap", 850 + "tinystr", 851 + "writeable", 852 + "zerovec", 853 + ] 854 + 855 + [[package]] 856 + name = "icu_locid_transform" 857 + version = "1.5.0" 858 + source = "registry+https://github.com/rust-lang/crates.io-index" 859 + checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 860 + dependencies = [ 861 + "displaydoc", 862 + "icu_locid", 863 + "icu_locid_transform_data", 864 + "icu_provider", 865 + "tinystr", 866 + "zerovec", 867 + ] 868 + 869 + [[package]] 870 + name = "icu_locid_transform_data" 871 + version = "1.5.0" 872 + source = "registry+https://github.com/rust-lang/crates.io-index" 873 + checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 874 + 875 + [[package]] 876 + name = "icu_normalizer" 877 + version = "1.5.0" 878 + source = "registry+https://github.com/rust-lang/crates.io-index" 879 + checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 880 + dependencies = [ 881 + "displaydoc", 882 + "icu_collections", 883 + "icu_normalizer_data", 884 + "icu_properties", 885 + "icu_provider", 886 + "smallvec", 887 + "utf16_iter", 888 + "utf8_iter", 889 + "write16", 890 + "zerovec", 891 + ] 892 + 893 + [[package]] 894 + name = "icu_normalizer_data" 895 + version = "1.5.0" 896 + source = "registry+https://github.com/rust-lang/crates.io-index" 897 + checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 898 + 899 + [[package]] 900 + name = "icu_properties" 901 + version = "1.5.1" 902 + source = "registry+https://github.com/rust-lang/crates.io-index" 903 + checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 904 + dependencies = [ 905 + "displaydoc", 906 + "icu_collections", 907 + "icu_locid_transform", 908 + "icu_properties_data", 909 + "icu_provider", 910 + "tinystr", 911 + "zerovec", 912 + ] 913 + 914 + [[package]] 915 + name = "icu_properties_data" 916 + version = "1.5.0" 917 + source = "registry+https://github.com/rust-lang/crates.io-index" 918 + checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 919 + 920 + [[package]] 921 + name = "icu_provider" 922 + version = "1.5.0" 923 + source = "registry+https://github.com/rust-lang/crates.io-index" 924 + checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 925 + dependencies = [ 926 + "displaydoc", 927 + "icu_locid", 928 + "icu_provider_macros", 929 + "stable_deref_trait", 930 + "tinystr", 931 + "writeable", 932 + "yoke", 933 + "zerofrom", 934 + "zerovec", 935 + ] 936 + 937 + [[package]] 938 + name = "icu_provider_macros" 939 + version = "1.5.0" 940 + source = "registry+https://github.com/rust-lang/crates.io-index" 941 + checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 942 + dependencies = [ 943 + "proc-macro2", 944 + "quote", 945 + "syn 2.0.98", 946 + ] 947 + 948 + [[package]] 949 + name = "idna" 950 + version = "1.0.3" 951 + source = "registry+https://github.com/rust-lang/crates.io-index" 952 + checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 953 + dependencies = [ 954 + "idna_adapter", 955 + "smallvec", 956 + "utf8_iter", 957 + ] 958 + 959 + [[package]] 960 + name = "idna_adapter" 961 + version = "1.2.0" 962 + source = "registry+https://github.com/rust-lang/crates.io-index" 963 + checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" 964 + dependencies = [ 965 + "icu_normalizer", 966 + "icu_properties", 967 + ] 968 + 969 + [[package]] 736 970 name = "image-webp" 737 971 version = "0.1.3" 738 972 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 833 1067 checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 834 1068 835 1069 [[package]] 1070 + name = "libloading" 1071 + version = "0.8.6" 1072 + source = "registry+https://github.com/rust-lang/crates.io-index" 1073 + checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 1074 + dependencies = [ 1075 + "cfg-if", 1076 + "windows-targets 0.52.5", 1077 + ] 1078 + 1079 + [[package]] 836 1080 name = "libm" 837 1081 version = "0.2.11" 838 1082 source = "registry+https://github.com/rust-lang/crates.io-index" 839 1083 checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" 1084 + 1085 + [[package]] 1086 + name = "litemap" 1087 + version = "0.7.4" 1088 + source = "registry+https://github.com/rust-lang/crates.io-index" 1089 + checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" 840 1090 841 1091 [[package]] 842 1092 name = "lock_api" ··· 864 1114 ] 865 1115 866 1116 [[package]] 1117 + name = "matrixmultiply" 1118 + version = "0.3.9" 1119 + source = "registry+https://github.com/rust-lang/crates.io-index" 1120 + checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" 1121 + dependencies = [ 1122 + "autocfg", 1123 + "rawpointer", 1124 + ] 1125 + 1126 + [[package]] 867 1127 name = "measure_time" 868 1128 version = "0.9.0" 869 1129 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 903 1163 ] 904 1164 905 1165 [[package]] 1166 + name = "minimal-lexical" 1167 + version = "0.2.1" 1168 + source = "registry+https://github.com/rust-lang/crates.io-index" 1169 + checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1170 + 1171 + [[package]] 906 1172 name = "miniz_oxide" 907 1173 version = "0.7.2" 908 1174 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 931 1197 ] 932 1198 933 1199 [[package]] 1200 + name = "ndarray" 1201 + version = "0.16.1" 1202 + source = "registry+https://github.com/rust-lang/crates.io-index" 1203 + checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" 1204 + dependencies = [ 1205 + "matrixmultiply", 1206 + "num-complex", 1207 + "num-integer", 1208 + "num-traits", 1209 + "portable-atomic", 1210 + "portable-atomic-util", 1211 + "rawpointer", 1212 + ] 1213 + 1214 + [[package]] 934 1215 name = "nih_log" 935 1216 version = "0.3.1" 936 1217 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 999 1280 ] 1000 1281 1001 1282 [[package]] 1283 + name = "nom" 1284 + version = "7.1.3" 1285 + source = "registry+https://github.com/rust-lang/crates.io-index" 1286 + checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1287 + dependencies = [ 1288 + "memchr", 1289 + "minimal-lexical", 1290 + ] 1291 + 1292 + [[package]] 1293 + name = "num-complex" 1294 + version = "0.4.6" 1295 + source = "registry+https://github.com/rust-lang/crates.io-index" 1296 + checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 1297 + dependencies = [ 1298 + "num-traits", 1299 + ] 1300 + 1301 + [[package]] 1002 1302 name = "num-conv" 1003 1303 version = "0.1.0" 1004 1304 source = "registry+https://github.com/rust-lang/crates.io-index" 1005 1305 checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1006 1306 1007 1307 [[package]] 1308 + name = "num-integer" 1309 + version = "0.1.46" 1310 + source = "registry+https://github.com/rust-lang/crates.io-index" 1311 + checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1312 + dependencies = [ 1313 + "num-traits", 1314 + ] 1315 + 1316 + [[package]] 1008 1317 name = "num-traits" 1009 1318 version = "0.2.19" 1010 1319 source = "registry+https://github.com/rust-lang/crates.io-index" 1011 1320 checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1012 1321 dependencies = [ 1013 1322 "autocfg", 1323 + ] 1324 + 1325 + [[package]] 1326 + name = "num_cpus" 1327 + version = "1.16.0" 1328 + source = "registry+https://github.com/rust-lang/crates.io-index" 1329 + checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1330 + dependencies = [ 1331 + "hermit-abi 0.3.9", 1332 + "libc", 1014 1333 ] 1015 1334 1016 1335 [[package]] ··· 1133 1452 checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" 1134 1453 1135 1454 [[package]] 1455 + name = "pin-project-lite" 1456 + version = "0.2.16" 1457 + source = "registry+https://github.com/rust-lang/crates.io-index" 1458 + checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1459 + 1460 + [[package]] 1461 + name = "pkg-config" 1462 + version = "0.3.31" 1463 + source = "registry+https://github.com/rust-lang/crates.io-index" 1464 + checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" 1465 + 1466 + [[package]] 1136 1467 name = "plain" 1137 1468 version = "0.2.3" 1138 1469 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1158 1489 checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" 1159 1490 1160 1491 [[package]] 1492 + name = "portable-atomic-util" 1493 + version = "0.2.4" 1494 + source = "registry+https://github.com/rust-lang/crates.io-index" 1495 + checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" 1496 + dependencies = [ 1497 + "portable-atomic", 1498 + ] 1499 + 1500 + [[package]] 1161 1501 name = "powerfmt" 1162 1502 version = "0.2.0" 1163 1503 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1228 1568 version = "0.5.2" 1229 1569 source = "registry+https://github.com/rust-lang/crates.io-index" 1230 1570 checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" 1571 + 1572 + [[package]] 1573 + name = "rawpointer" 1574 + version = "0.2.1" 1575 + source = "registry+https://github.com/rust-lang/crates.io-index" 1576 + checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" 1231 1577 1232 1578 [[package]] 1233 1579 name = "rayon" ··· 1323 1669 ] 1324 1670 1325 1671 [[package]] 1672 + name = "rgb2yuv420" 1673 + version = "0.2.3" 1674 + source = "registry+https://github.com/rust-lang/crates.io-index" 1675 + checksum = "4cf3ad431593a2bb204ed1c609814aa9f95b169f8cef6b811b03261097f2453b" 1676 + 1677 + [[package]] 1326 1678 name = "ring" 1327 1679 version = "0.17.9" 1328 1680 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1361 1713 checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1362 1714 1363 1715 [[package]] 1716 + name = "rustc-hash" 1717 + version = "1.1.0" 1718 + source = "registry+https://github.com/rust-lang/crates.io-index" 1719 + checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1720 + 1721 + [[package]] 1364 1722 name = "rustls" 1365 1723 version = "0.23.23" 1366 1724 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1547 1905 "measure_time", 1548 1906 "midly", 1549 1907 "nanoid", 1908 + "ndarray", 1550 1909 "nih_plug", 1551 1910 "once_cell", 1552 1911 "rand", 1553 1912 "resvg", 1913 + "rgb2yuv420", 1554 1914 "roxmltree 0.19.0", 1555 1915 "rust-analyzer", 1556 1916 "serde", ··· 1563 1923 "tiny-skia", 1564 1924 "tiny_http", 1565 1925 "ureq", 1926 + "video-rs", 1566 1927 "wasm-bindgen", 1567 1928 "web-sys", 1568 1929 ] ··· 1620 1981 checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" 1621 1982 1622 1983 [[package]] 1984 + name = "stable_deref_trait" 1985 + version = "1.2.0" 1986 + source = "registry+https://github.com/rust-lang/crates.io-index" 1987 + checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1988 + 1989 + [[package]] 1623 1990 name = "strict-num" 1624 1991 version = "0.1.1" 1625 1992 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1701 2068 ] 1702 2069 1703 2070 [[package]] 2071 + name = "synstructure" 2072 + version = "0.13.1" 2073 + source = "registry+https://github.com/rust-lang/crates.io-index" 2074 + checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 2075 + dependencies = [ 2076 + "proc-macro2", 2077 + "quote", 2078 + "syn 2.0.98", 2079 + ] 2080 + 2081 + [[package]] 1704 2082 name = "termcolor" 1705 2083 version = "1.4.1" 1706 2084 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1801 2179 ] 1802 2180 1803 2181 [[package]] 2182 + name = "tinystr" 2183 + version = "0.7.6" 2184 + source = "registry+https://github.com/rust-lang/crates.io-index" 2185 + checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 2186 + dependencies = [ 2187 + "displaydoc", 2188 + "zerovec", 2189 + ] 2190 + 2191 + [[package]] 1804 2192 name = "tinyvec" 1805 2193 version = "1.8.1" 1806 2194 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1850 2238 ] 1851 2239 1852 2240 [[package]] 2241 + name = "tracing" 2242 + version = "0.1.41" 2243 + source = "registry+https://github.com/rust-lang/crates.io-index" 2244 + checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2245 + dependencies = [ 2246 + "pin-project-lite", 2247 + "tracing-attributes", 2248 + "tracing-core", 2249 + ] 2250 + 2251 + [[package]] 2252 + name = "tracing-attributes" 2253 + version = "0.1.28" 2254 + source = "registry+https://github.com/rust-lang/crates.io-index" 2255 + checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 2256 + dependencies = [ 2257 + "proc-macro2", 2258 + "quote", 2259 + "syn 2.0.98", 2260 + ] 2261 + 2262 + [[package]] 2263 + name = "tracing-core" 2264 + version = "0.1.33" 2265 + source = "registry+https://github.com/rust-lang/crates.io-index" 2266 + checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 2267 + dependencies = [ 2268 + "once_cell", 2269 + ] 2270 + 2271 + [[package]] 1853 2272 name = "ttf-parser" 1854 2273 version = "0.24.1" 1855 2274 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1955 2374 ] 1956 2375 1957 2376 [[package]] 2377 + name = "url" 2378 + version = "2.5.4" 2379 + source = "registry+https://github.com/rust-lang/crates.io-index" 2380 + checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 2381 + dependencies = [ 2382 + "form_urlencoded", 2383 + "idna", 2384 + "percent-encoding", 2385 + ] 2386 + 2387 + [[package]] 1958 2388 name = "usvg" 1959 2389 version = "0.44.0" 1960 2390 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1988 2418 checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 1989 2419 1990 2420 [[package]] 2421 + name = "utf16_iter" 2422 + version = "1.0.5" 2423 + source = "registry+https://github.com/rust-lang/crates.io-index" 2424 + checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 2425 + 2426 + [[package]] 2427 + name = "utf8_iter" 2428 + version = "1.0.4" 2429 + source = "registry+https://github.com/rust-lang/crates.io-index" 2430 + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2431 + 2432 + [[package]] 1991 2433 name = "utf8parse" 1992 2434 version = "0.2.2" 1993 2435 source = "registry+https://github.com/rust-lang/crates.io-index" 1994 2436 checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1995 2437 1996 2438 [[package]] 2439 + name = "vcpkg" 2440 + version = "0.2.15" 2441 + source = "registry+https://github.com/rust-lang/crates.io-index" 2442 + checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2443 + 2444 + [[package]] 1997 2445 name = "version_check" 1998 2446 version = "0.9.4" 1999 2447 source = "registry+https://github.com/rust-lang/crates.io-index" 2000 2448 checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2449 + 2450 + [[package]] 2451 + name = "video-rs" 2452 + version = "0.10.3" 2453 + source = "registry+https://github.com/rust-lang/crates.io-index" 2454 + checksum = "9c9f6df3b49d862ea35d2c509801ee64983f2169ea02e3a8642e69ce2230e47c" 2455 + dependencies = [ 2456 + "ffmpeg-next", 2457 + "ndarray", 2458 + "tracing", 2459 + "url", 2460 + ] 2001 2461 2002 2462 [[package]] 2003 2463 name = "vst3-com" ··· 2316 2776 ] 2317 2777 2318 2778 [[package]] 2779 + name = "write16" 2780 + version = "1.0.0" 2781 + source = "registry+https://github.com/rust-lang/crates.io-index" 2782 + checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 2783 + 2784 + [[package]] 2785 + name = "writeable" 2786 + version = "0.5.5" 2787 + source = "registry+https://github.com/rust-lang/crates.io-index" 2788 + checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 2789 + 2790 + [[package]] 2319 2791 name = "xmlwriter" 2320 2792 version = "0.1.0" 2321 2793 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2329 2801 ] 2330 2802 2331 2803 [[package]] 2804 + name = "yoke" 2805 + version = "0.7.5" 2806 + source = "registry+https://github.com/rust-lang/crates.io-index" 2807 + checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" 2808 + dependencies = [ 2809 + "serde", 2810 + "stable_deref_trait", 2811 + "yoke-derive", 2812 + "zerofrom", 2813 + ] 2814 + 2815 + [[package]] 2816 + name = "yoke-derive" 2817 + version = "0.7.5" 2818 + source = "registry+https://github.com/rust-lang/crates.io-index" 2819 + checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" 2820 + dependencies = [ 2821 + "proc-macro2", 2822 + "quote", 2823 + "syn 2.0.98", 2824 + "synstructure", 2825 + ] 2826 + 2827 + [[package]] 2828 + name = "zerofrom" 2829 + version = "0.1.5" 2830 + source = "registry+https://github.com/rust-lang/crates.io-index" 2831 + checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" 2832 + dependencies = [ 2833 + "zerofrom-derive", 2834 + ] 2835 + 2836 + [[package]] 2837 + name = "zerofrom-derive" 2838 + version = "0.1.5" 2839 + source = "registry+https://github.com/rust-lang/crates.io-index" 2840 + checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" 2841 + dependencies = [ 2842 + "proc-macro2", 2843 + "quote", 2844 + "syn 2.0.98", 2845 + "synstructure", 2846 + ] 2847 + 2848 + [[package]] 2332 2849 name = "zeroize" 2333 2850 version = "1.8.1" 2334 2851 source = "registry+https://github.com/rust-lang/crates.io-index" 2335 2852 checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 2853 + 2854 + [[package]] 2855 + name = "zerovec" 2856 + version = "0.10.4" 2857 + source = "registry+https://github.com/rust-lang/crates.io-index" 2858 + checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 2859 + dependencies = [ 2860 + "yoke", 2861 + "zerofrom", 2862 + "zerovec-derive", 2863 + ] 2864 + 2865 + [[package]] 2866 + name = "zerovec-derive" 2867 + version = "0.10.3" 2868 + source = "registry+https://github.com/rust-lang/crates.io-index" 2869 + checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 2870 + dependencies = [ 2871 + "proc-macro2", 2872 + "quote", 2873 + "syn 2.0.98", 2874 + ] 2336 2875 2337 2876 [[package]] 2338 2877 name = "zune-core"
+6 -1
Cargo.toml
··· 22 22 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 23 23 24 24 [dependencies] 25 - nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", features = ["assert_process_allocs"] } 25 + nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", features = [ 26 + "assert_process_allocs", 27 + ] } 26 28 anyhow = "1.0.81" 27 29 chrono = "0.4.23" 28 30 docopt = "1.1.1" ··· 61 63 measure_time = "0.9.0" 62 64 env_logger = "0.11.6" 63 65 log = "0.4.26" 66 + video-rs = { version = "0.10.3", features = ["ndarray"] } 67 + ndarray = "0.16.1" 68 + rgb2yuv420 = "0.2.3" 64 69 65 70 66 71 [dev-dependencies]
+31 -8
src/canvas.rs
··· 4 4 use itertools::Itertools as _; 5 5 use measure_time::info_time; 6 6 use rand::Rng; 7 + use rgb2yuv420::convert_rgb_to_yuv420p; 7 8 8 9 use crate::{ 9 10 layer::Layer, objects::Object, random_color, Angle, Color, ColorMapping, ColoredObject, ··· 418 419 self.remove_background() 419 420 } 420 421 421 - // previous_frame_at gives path to the previously rendered frame, which allows to copy on cache hits instead of having to re-write bytes again 422 - pub fn render_to_png( 423 - &mut self, 424 - at: &str, 425 - resolution: u32, 426 - previous_frame_at: Option<&str>, 427 - ) -> anyhow::Result<()> { 428 - info_time!("render_to_png"); 422 + pub fn resolution_to_size(&self, resolution: u32) -> (u32, u32) { 429 423 let aspect_ratio = self.aspect_ratio(); 430 424 let (height, width) = if aspect_ratio > 1.0 { 431 425 // landscape: resolution is width ··· 434 428 // portrait: resolution is height 435 429 ((resolution as f32 / aspect_ratio) as u32, resolution) 436 430 }; 431 + } 437 432 433 + // previous_frame_at gives path to the previously rendered frame, which allows to copy on cache hits instead of having to re-write bytes again 434 + pub fn render_to_png( 435 + &mut self, 436 + at: &str, 437 + resolution: u32, 438 + previous_frame_at: Option<&str>, 439 + ) -> anyhow::Result<()> { 440 + info_time!("render_to_png"); 441 + let (width, height) = self.resolution_to_size(resolution); 438 442 if let Some(previous_frame_at) = previous_frame_at { 439 443 match self.render_to_pixmap(width, height)? { 440 444 None => { ··· 616 620 self.png_render_cache = Some(new_svg_contents); 617 621 618 622 Ok(Some(pixmap)) 623 + } 624 + 625 + pub fn render_to_hwc_frame(&mut self, resolution: u32) -> anyhow::Result<video_rs::Frame> { 626 + info_time!("render_to_hwc_frame"); 627 + let (width, height) = self.resolution_to_size(resolution); 628 + let pixmap = self.render_to_pixmap_no_cache(width, height)?; 629 + let rgb_pixels: [u8] = pixmap 630 + .pixels() 631 + .iter() 632 + .map(|pixel| [pixel.red(), pixel.green(), pixel.blue()]) 633 + .flatten() 634 + .collect(); 635 + 636 + Ok(video_rs::Frame::from(convert_rgb_to_yuv420p( 637 + &rgb_pixels, 638 + width, 639 + height, 640 + tiny_skia::BYTES_PER_PIXEL, 641 + ))) 619 642 } 620 643 621 644 fn usvg_tree_to_pixmap(
+28 -11
src/video.rs
··· 10 10 use chrono::{DateTime, NaiveDateTime}; 11 11 use indicatif::{ProgressBar, ProgressIterator}; 12 12 use measure_time::info_time; 13 + use video_rs::Time; 13 14 14 15 use crate::{ 15 16 sync::SyncData, ··· 48 49 pub duration_override: Option<usize>, 49 50 pub start_rendering_at: usize, 50 51 pub progress_bar: indicatif::ProgressBar, 52 + encoder: Option<video_rs::Encoder>, 51 53 } 52 54 53 55 pub struct Hook<C> { ··· 114 116 duration_override: None, 115 117 start_rendering_at: 0, 116 118 progress_bar: setup_progress_bar(0, ""), 119 + encoder: None, 117 120 } 121 + } 122 + 123 + fn setup_encoder(&self, output_path: String) -> Self { 124 + self.encoder = video_rs::Encoder::new( 125 + output_path, 126 + video_rs::encode::Settings::preset_h264_yuv420p( 127 + self.initial_canvas.width(), 128 + self.initial_canvas.height(), 129 + true, 130 + ), 131 + ) 118 132 } 119 133 120 134 pub fn sync_audio_with(self, sync_data_path: &str) -> Self { ··· 611 625 } 612 626 613 627 if context.frame != previous_rendered_frame { 614 - canvas.render_to_png( 615 - &self.frame_output_path(context.frame), 616 - self.resolution, 617 - Some(&self.frame_output_path(previous_rendered_frame)), 628 + // canvas.render_to_png( 629 + // &self.frame_output_path(context.frame), 630 + // self.resolution, 631 + // Some(&self.frame_output_path(previous_rendered_frame)), 632 + // )?; 633 + self.encoder.expect("Encoder was not initialized").encode( 634 + &canvas.render_to_hwc_frame(self.resolution), 635 + Time::from_secs_f64(context.ms as f64 * 1e-3), 618 636 )?; 637 + 619 638 written_frames_count += 1; 620 639 621 640 previous_rendered_beat = context.beat; ··· 632 651 633 652 pub fn render(&self, output_file: String) -> Result<()> { 634 653 info_time!("render"); 635 - // Ensure ffmpeg is installed 636 - if !is_binary_installed("ffmpeg") { 637 - panic!("ffmpeg is not installed. Please install it."); 638 - } 639 654 640 - create_dir_all(self.frames_output_directory)?; 641 - remove_dir_all(self.frames_output_directory)?; 642 - create_dir(self.frames_output_directory)?; 655 + // create_dir_all(self.frames_output_directory)?; 656 + // remove_dir_all(self.frames_output_directory)?; 657 + // create_dir(self.frames_output_directory)?; 643 658 create_dir_all(Path::new(&output_file).parent().unwrap())?; 659 + 660 + self.setup_encoder(output_file); 644 661 645 662 self.progress_bar.set_position(0); 646 663 self.progress_bar.set_prefix("Rendering");