小编use*_*478的帖子

文件名 JS 中的时间戳

我想在 XML 文件从位置 A 复制到 B 时为其添加时间戳。

const fs = require('fs');

// destination.txt will be created or overwritten by default.
fs.copyFile('\\\\IP\\FOLDER\\FILE.xml', 'c:\\FOLDER\\FILE.xml', (err) => {
  if (err) throw err;
  console.log('OK! Copy FILE.xml');
});
Run Code Online (Sandbox Code Playgroud)

副本有效,但我不知道如何添加时间戳。

javascript timestamp

7
推荐指数
1
解决办法
1万
查看次数

ffprobe/ffmpg 静音检测命令

我正在研究流静音检测。它正在 ffmpeg 中执行以下命令:

ffmpeg -i http://mystream.com/stream -af silencedetect=n=-50dB:d=0.5 -f null - 2> log.txt
Run Code Online (Sandbox Code Playgroud)

我想获得日志文件的 json 输出。“ffprobe”中有一个 json 选项,但silencedetect=n=-50dB:d=0.5不起作用。

帮助!

干杯!

json ffmpeg ffprobe

3
推荐指数
1
解决办法
3668
查看次数

nodejs 将 console.log 打印到 http

我在 NodeJS 中制作了一个具有多种条件的脚本。我想使用 NodeJS 服务器将 console.log 导出/打印到网页。

function myfunction() {
    app('Some text', 'ALERT!', function(err, remaining) {
        if (err) throw err;
        console.log('Some text.');
Run Code Online (Sandbox Code Playgroud)

这可能吗?我到处找。

非常感谢!

http node.js console.log

3
推荐指数
1
解决办法
6823
查看次数

标签 统计

console.log ×1

ffmpeg ×1

ffprobe ×1

http ×1

javascript ×1

json ×1

node.js ×1

timestamp ×1