{"_id":"@cofenster/nexrender-action-encode-assets","_rev":"1-364bfa134af827e169a025732ac1b122","name":"@cofenster/nexrender-action-encode-assets","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@cofenster/nexrender-action-encode-assets","author":{"name":"cofenster"},"version":"1.0.0","main":"index.js","ffmpeg-static":{"version":"b4.2.2","url":"https://github.com/eugeneware/ffmpeg-static"},"publishConfig":{"access":"public"},"dependencies":{"date-fns":"^1.30.1","glob":"^7.1.6","node-fetch":"^2.6.0","node-fetch-progress":"^1.0.2"},"description":"Encode all videos found by wildcard to a specified format using built-in ffmpeg utility. You don't need to have ffmpeg installed on your system.","_id":"@cofenster/nexrender-action-encode-assets@1.0.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-HAvKZIga+81qoTnIQPDrUlgvsctlRi8+7seZlBcEvn12m3hcGQlQI1Fa2bal3VhYDHvb/X8ZwUqtvvriNSibCw==","shasum":"d94eb7fd3895da9825c4a292c1573113756d0d82","tarball":"https://registry.npmjs.org/@cofenster/nexrender-action-encode-assets/-/nexrender-action-encode-assets-1.0.0.tgz","fileCount":9,"unpackedSize":8435595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe60YyCRA9TVsSAnZWagAAJxkP/287GL7e7R4vkKnqxdyR\nNNpa2EP0v81BZ1NPZM4DwKHws5JZHVCCxpzdG97z9buD0pDN+v/9DQUzmBFU\npLDKm+PiT/LHY/1OGpqYVjNsLyjK5vAQ83Xgz6a+48XJXbe08xtPZ6til0YG\nw24kP9C42T6lDf02GCOWMzwVNQH2ifS0o9yemvkzY1IfbWmJe8fn0BK0wuUI\npFGwJuukWwy7PhkOaE/55YZglOaxKlZmCvExwatXTXPzBu6h9G7WTA3Ft8Uf\npk5l9NYbVQpHRv0ITsDv+G/9ximdKxRTCphaHv19Wna523RDnC1gupTOwUxI\nkCt6Y41VVgjRsdhW+5dbiKeXY/mlUJFp+cAUW6Ssv7tzQocr4PXfcuk8vSNw\nAL/lt9+1XtX4p4Yx+OiUI+vedXsVuXecflWxzX0N7hE9AYZijPP2irid+0W6\nd/hVWUZmzFU+2Zxnvfa0XikW5enQf8eqVhxdaW3cb5C4wQCv/stY4uHz9/qN\nCslvicQceIP/8zj0wDZEh4V1CEJY0oklm3PfijOJe711UXy5773Wzxcr1aTQ\nU73xe0eY0qBefSWUgFsRU9+WcxqvMYlxTqA3SeGh6Z2zy3Oje62VheVgKDzc\nqMWQz/PzN9M48iXKiat5VUHq5w+WBu6m3AJh3VayXDfKQJ83Ne8VgY0GzXfH\nQftU\r\n=1cnZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3LU2QNO9zm5RlI1ZYqBBDkACDScswFCo88IyMlI8AWAiEA77uiA6STzQf8FHPBDojrtzXiXARAX1+oiWdP0Lf/01U="}]},"maintainers":[{"name":"cofenster","email":"finn@cofenster.com"}],"_npmUser":{"name":"cofenster","email":"finn@cofenster.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nexrender-action-encode-assets_1.0.0_1592477233863_0.941095459791093"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-18T10:47:13.828Z","1.0.0":"2020-06-18T10:47:14.254Z","modified":"2022-04-05T00:10:25.663Z"},"maintainers":[{"name":"cofenster","email":"finn@cofenster.com"}],"description":"Encode all videos found by wildcard to a specified format using built-in ffmpeg utility. You don't need to have ffmpeg installed on your system.","author":{"name":"cofenster"},"readme":"# Action: Encode\n\nEncode all videos found by wildcard to a specified format using built-in ffmpeg utility. You don't need to have ffmpeg installed on your system.\n\n## Installation\n\nIf you are using [binary](https://github.com/inlife/nexrender/releases) version of the nexrender,\nthere is no need to install the module, it is **included** in the binary build.\n\n```\nnpm i @nexrender/action-encode -g\n```\n\n## Usage\n\nWhen creating your render job provide this module as one of the `postrender` actions:\n\n```json\n// job.json\n{\n    \"actions\": {\n        \"postrender\": [\n            {\n                \"module\": \"@nexrender/action-encode\",\n                \"output\": \"foobar.mp4\",\n                \"ffmpeg\": \"../ffmpeg\",\n                \"preset\": \"mp4\",\n                \"params\": {\"-vcodec\": \"libx264\", \"-r\": 25}\n            }\n        ]\n    }\n}\n```\n\n## Information\n\n* `output` is a path on your system where result will be saved to, can be either relative or absulte path.\n* `input` optional argument, path or wildcard of the file(s) you want to encode, can be either relative or absulte path. Defaults to current job output video file.\n* `ffmpeg` optional argument, path to load the ffmpeg module from or save to if none found. can be absolute or ralative to workpath.\n* `preset` optional argument, if provided will be used as a preset for the renderer, if not, will take input directly from params\n* `params` optional argument, object containing additional params that will be provided to the ffmpeg binary\n\n## Presets\n\nThere are a couple of default presets included with the build. You can provide `params` field to override any of the values there.\n\n### mp4\n\n```js\n{\n    '-acodec': 'aac',\n    '-ab': '128k',\n    '-ar': '44100',\n    '-vcodec': 'libx264',\n    '-r': '25',\n}\n```\n\n### ogg\n\n```js\n{\n    '-acodec': 'libvorbis',\n    '-ab': '128k',\n    '-ar': '44100',\n    '-vcodec': 'libtheora',\n    '-r': '25',\n}\n```\n\n### webm\n\n```js\n{\n    '-acodec': 'libvorbis',\n    '-ab': '128k',\n    '-ar': '44100',\n    '-vcodec': 'libvpx',\n    '-b': '614400',\n    '-aspect': '16:9',\n}\n```\n\n### mp3\n\n```js\n{\n    '-acodec': 'libmp3lame',\n    '-ab': '128k',\n    '-ar': '44100',\n\n}\n```\n\n### m4a\n\n```js\n{\n    '-acodec': 'aac',\n    '-ab': '64k',\n    '-ar': '44100',\n    '-strict': '-2',\n}\n```\n\n### gif\n\n```js\n{\n    '-i': input,\n    \"-ss\": '61.0',\n    \"-t\": '2.5',\n    \"-filter_complex\": `[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse`,\n}\n```\n","readmeFilename":"readme.md"}