1

我正在尝试使用 MediaConvert 对视频进行转码,但出现以下错误:

错误消息 Demuxer:[ReadPacketData 文件读取失败 - 文件末尾命中长度 [1105924]。文件被截断了吗?]

当我尝试运行 ffmpeg 命令以获取有关文件的信息时,我看到:

非单调增加 dts 到流中的复用器

我想知道 MediaConvert 中是否有可以更正时间戳的配置?

➜  Downloads ffmpeg -i 2254.webm -hide_banner -f null /dev/null

[h264 @ 0x7fce2c81d400] Increasing reorder buffer to 1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2254.webm':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: isomiso5hlsf
    creation_time   : 2021-02-17T19:33:56.000000Z
  Duration: 00:00:01.60, start: 0.000000, bitrate: 5535 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1280x720, 5644 kb/s, 27.95 fps, 29.92 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2021-02-17T19:33:56.000000Z
      handler_name    : Core Media Video
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 187 kb/s (default)
    Metadata:
      creation_time   : 2021-02-17T19:33:56.000000Z
      handler_name    : Core Media Audio
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to '/dev/null':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: isomiso5hlsf
    encoder         : Lavf58.45.100
    Stream #0:0(und): Video: wrapped_avframe, yuvj420p(progressive), 720x1280, q=2-31, 200 kb/s, 29.92 fps, 29.92 tbn, 29.92 tbc (default)
    Metadata:
      encoder         : Lavc58.91.100 wrapped_avframe
      creation_time   : 2021-02-17T19:33:56.000000Z
      handler_name    : Core Media Video
    Side data:
      displaymatrix: rotation of -0.00 degrees
    Stream #0:1(und): Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s (default)
    Metadata:
      creation_time   : 2021-02-17T19:33:56.000000Z
      handler_name    : Core Media Audio
      encoder         : Lavc58.91.100 pcm_s16le
[null @ 0x7fce2e008200] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 8
[null @ 0x7fce2e008200] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 31 >= 31
frame=   41 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.57 bitrate=N/A speed=19.9x    
video:21kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
4

1 回答 1

1

此时 MediaConvert 需要一个完全完整、带有时间戳的正确文件。无法在服务中的 demux 处更改 DTS 或 PTS 值。

在将该文件传递给 MediaConvert 时,您是否能够仅使用 ffmpeg 重新混合并获得相同的结果?

ffmpeg -i 2254.webm -c copy output.webm
于 2021-02-18T18:25:06.133 回答