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.

123 lines
3.5 KiB

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