Audio ffmpeg检测mp3远程音频何时更改
我正在通过Audio ffmpeg检测mp3远程音频何时更改,audio,ffmpeg,Audio,Ffmpeg,我正在通过ffmpeg下载某个数据源上的mp3: function (fpath, opath, sampleRate) { var self = this; // defaults sampleRate = sampleRate || '44100'; var loglevel = self.logger.isDebug() ? 'debug' : 'warning'; return new Promise((resolve, re
ffmpeg
下载某个数据源上的mp3:
function (fpath, opath, sampleRate) {
var self = this;
// defaults
sampleRate = sampleRate || '44100';
var loglevel = self.logger.isDebug() ? 'debug' : 'warning';
return new Promise((resolve, reject) => {
const args = [
'-y',
'-loglevel', loglevel,
'-i', fpath,
'-ar', sampleRate,
'-acodec', 'pcm_s16le',
opath
];
const opts = {
cwd: self._options.tempDir
};
cp.spawn('ffmpeg', args, opts)
.on('message', msg => self.logger.info(msg))
.on('error', reject)
.on('close', resolve);
});
}
数据源会不时稍微更改此音频文件。是否有一种方法可以让ffmpeg
-对于给定的url-检查音频文件是否已更改,而不下载整个文件
我一直在尝试使用
curl-I
作为基本检查,但我不确定这是否是适用于mp3音频文件的正确方法。ffprobe-print_格式json URL
添加
-显示\u条目
您只能选择所需的信息,即您认为适合决定是否有更改的信息