ffmpeg - 这两个视频有什么区别?

标签 ffmpeg fluent-ffmpeg mediainfo

我正在使用 fluent-ffmpeg调整视频大小。

我无法弄清楚发生了什么。我有 2 个视频文件,一个有效,另一个无效。我一直在淘mediainfo两个文件的输出,检查差异但不是 filesize , duration等没有区别(相同的 codecformatwidth/heightframe rate 等)

Here's两个文件的链接。

我一直在使用输入流将这些视频文件读入 fluent-ffmpeg,如下所示:

await new Promise((resolve, reject) => {
    ffmpeg(file.stream)
      .output(path)
      .size('426x240')
      .on('start', function() {
          console.log('started');
      })
      .on('error', function(err) {
          console.log('An error occurred: ' + err.message);
      })
      .on('progress', function(progress) {
          console.log('... frames: ' + progress.frames);
      })
      .on('end', function() {
        console.log('Finished processing');
        resolve();
      })
      .run();
});

工作文件打印:
started
... frames: 86
... frames: 107
Finished processing

但非工作文件似乎没有任何框架,并打印:
started
... frames: 0
Finished processing

知道有什么问题吗?

正在执行的 ffmpeg 命令:
ffmpeg -i pipe:0 -y -filter:v scale=w=426:h=240 uploads/works.mp4

最佳答案

I've been scouring the mediainfo outputs of both files, checking for discrepancies but other than filesize, duration etc. there's no difference



确实如此,但仅限于完整模式。试试mediainfo -f在文件上,您会看到:
IsStreamable                             : Yes

对于工作文件,以及
IsStreamable                             : No

对于非工作文件。

此处的“否”表示输入需要支持查找(标题在末尾,播放器需要查找结束以解析标题,然后返回开始以解析数据)。

关于ffmpeg - 这两个视频有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52689718/

相关文章:

ffmpeg - H.264 - 识别图像的访问单元

node.js - fluent-ffmpeg display_aspect_ratio 没有改变

c# - MediaInfo 在 C# 中动态检查 AudioStreams

ffmpeg 管道到 mediainfo

FFmpeg concat 创建损坏的视频部分(提供媒体信息)

ffmpeg - 我们可以使用 -vf 和 -filter :a with -filter_complex

ubuntu - 处理输入时发现 ubuntu 上的 ffmpeg/avconv 无效数据

ffmpeg - 在ffmpeg流上添加水印

node.js - 我需要将音频和视频流与流利的ffmpeg结合起来

javascript - 在 fluent ffmpeg 复杂过滤器中使用 aloop 和 amix