Tooling for managing asset compression, storage, and retrieval
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
3.4 KiB

5 years ago
5 years ago
  1. {
  2. "concurrency": 0,
  3. "profiles": {
  4. "default": {
  5. "jpeg": {
  6. "processors": ["cjpeg"],
  7. "extensions": [
  8. "jpg",
  9. "jpeg"
  10. ],
  11. "outputExtension": "jpg",
  12. "command": "cjpeg -optimize -quality 90 -progressive -outfile {{output_file}} {{input_file}}"
  13. },
  14. "png": {
  15. "processors": ["optipng"],
  16. "extensions": [
  17. "png"
  18. ],
  19. "outputExtension": "png",
  20. "command": "optipng -o2 -strip all -out {{output_file}} {{input_file}}"
  21. },
  22. "video": {
  23. "processors": ["ffmpeg"],
  24. "extensions": [
  25. "mp4",
  26. "webm"
  27. ],
  28. "outputExtension": "webm",
  29. "command": "ffmpeg -hide_banner -loglevel panic -i {{input_file}} -c:v libvpx -crf 10 {{output_file}}"
  30. },
  31. "audio": {
  32. "processors": ["ffmpeg", "opusenc"],
  33. "extensions": [
  34. "wav",
  35. "mp3"
  36. ],
  37. "outputExtension": "ogg",
  38. "command": "ffmpeg -hide_banner -loglevel panic -i {{input_file}} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {{output_file}}"
  39. }
  40. },
  41. "placebo": {
  42. "jpeg": {
  43. "processors": ["cp"],
  44. "extensions": [
  45. "jpg",
  46. "jpeg"
  47. ],
  48. "outputExtension": "jpg",
  49. "preserveInputExtension": true,
  50. "command": "cp {{input_file}} {{output_file}}"
  51. },
  52. "png": {
  53. "processors": ["cp"],
  54. "extensions": [
  55. "png"
  56. ],
  57. "outputExtension": "png",
  58. "preserveInputExtension": true,
  59. "command": "cp {{input_file}} {{output_file}}"
  60. },
  61. "video": {
  62. "processors": ["cp"],
  63. "extensions": [
  64. "mp4",
  65. "webm"
  66. ],
  67. "outputExtension": "mp4",
  68. "preserveInputExtension": true,
  69. "command": "cp {{input_file}} {{output_file}}"
  70. },
  71. "audio": {
  72. "processors": ["cp"],
  73. "extensions": [
  74. "wav",
  75. "mp3"
  76. ],
  77. "outputExtension": "ogg",
  78. "preserveInputExtension": true,
  79. "command": "cp {{input_file}} {{output_file}}"
  80. }
  81. },
  82. "aggressive": {
  83. "jpeg": {
  84. "processors": ["ffmpeg", "cjpeg"],
  85. "extensions": [
  86. "jpg",
  87. "jpeg"
  88. ],
  89. "outputExtension": "jpg",
  90. "command": "export FILE={{output_file}} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {{input_file}} -vf scale=-1:720 ${TEMP_FILE} && cjpeg -optimize -quality 75 -progressive -outfile {{output_file}} ${TEMP_FILE} && rm ${TEMP_FILE}"
  91. },
  92. "png": {
  93. "processors": ["optipng"],
  94. "extensions": [
  95. "png"
  96. ],
  97. "outputExtension": "png",
  98. "command": "optipng -o2 -strip all -out {{output_file}} {{input_file}}"
  99. },
  100. "video": {
  101. "processors": ["ffmpeg"],
  102. "extensions": [
  103. "mp4",
  104. "webm"
  105. ],
  106. "outputExtension": "webm",
  107. "command": "ffmpeg -hide_banner -loglevel panic -i {{input_file}} -vf scale=-1:720 -c:v libvpx -crf 16 {{output_file}}"
  108. },
  109. "audio": {
  110. "processors": ["ffmpeg", "opusenc"],
  111. "extensions": [
  112. "wav",
  113. "mp3"
  114. ],
  115. "outputExtension": "ogg",
  116. "command": "ffmpeg -hide_banner -loglevel panic -i {{input_file}} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {{output_file}}"
  117. }
  118. }
  119. }
  120. }