UNPKG

node-red-contrib-viseo-ffmpeg

Version:

VISEO Bot Maker - FFMPEG

77 lines (69 loc) 3.04 kB
<script type="text/javascript"> RED.nodes.registerType('ffmpeg-command',{ category: '🖼️_image', color: '#97d397', defaults: { name: { value: undefined }, output: { value: undefined }, outputType: { value: "msg"}, cmd: { value: undefined }, cmdType: { value: "str"}, spawn: { value: "false"} }, inputs: 1, outputs: 1, icon: "ffmpeg.png", align: "left", paletteLabel: 'ffmpeg', label: function() { return this.name || "ffmpeg"; }, oneditprepare: function() { $("#node-input-output").typedInput({ default: 'msg', types: ['msg'], typeField: $("#node-input-outputType") }); $("#node-input-cmd").typedInput({ default: 'str', types: ['str','msg','global'], typeField: $("#node-input-cmdType") }); } }); </script> <script type="text/x-red" data-template-name="ffmpeg-command"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <br> <b>Command parameters</b> <div class="form-row"> <br> <label for="node-input-cmd"><i class="fa fa-terminal"></i> Command</label> <input type="text" id="node-input-cmd" placeholder="Command line" style="width:70%;"> <input type="hidden" id="node-input-cmdType"> </div> <div class="form-row"> <label for="node-input-output"><i class="fa fa-sign-out"></i> Output</label> <input type="text" id="node-input-output" placeholder="payload" style="width:70%;"> <input type="hidden" id="node-input-outputType"> </div> <div class="form-row"> <label for="node-input-spawn"></label> <select id="node-input-spawn" style="width:70%"> <option value="false">When the command is complete - exec mode</option> <option value="true">while the command is running - spawn mode</option> </select> </div> </script> <style> h4, h3 { font-weight: bold; } </style> <script type="text/x-red" data-help-name="ffmpeg-command"> <p>Allows to use the command line utility 'ffmpeg' in order to convert or maniupulate audio files.</p> <h3>Details</h3> <p>Properties</p> <dl class="message-properties"> <dt>Command <span class="property-type">string</span></dt> <dd>command line (without the key word 'ffmpeg')</dd> <dt>Output <span class="property-type">string</span></dt> <dd>where to store the results</dd> </dl> <h3>References</h3> <ul> <li><a href="https://www.ffmpeg.org/ffmpeg.html">FFMPEG </a> - documentation</li> <li><a href="https://github.com/NGRP/node-red-contrib-viseo/">VISEO BotMaker</a> - the nodes github repository</li> </ul> </script>