FFMpeg 无意中删除了视频流

FFMpeg 无意中删除了视频流

我使用以下 ffmpeg 命令缩小视频。但令人惊讶的是,输出没有任何视频流,只有音频输出。

ffmpeg -y -i "input.mov" -c:v libx264 -vf scale=640:252 -c:a aac "output.mp4"

以下是示例输入文件:输入.mov

附言:注意到输入视频中的以下值Mediainfo似乎很奇怪。

  1. 总时长为,3min44s但视频流时长为1ms
  2. 总体比特率为,268 kb/s但视频流比特率为16.7 Gb/s
  3. 视频帧率异常高5616000 fps

奇怪的是,FFMpeg 的输出日志指示输出(Stream #0:0)中有视频流,但实际上没有。可以在播放输出时以及在Mediainfo生成的输出上运行来检查。

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x12b7040b0] st: 1 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x12b7040b0] st: 1 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/input.mov':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2022-08-21T23:05:50.000000Z
  Duration: 00:03:44.64, start: 0.000000, bitrate: 267 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 2048x808, 25 fps, 25 tbn (default)
    Metadata:
      creation_time   : 2022-08-21T23:05:50.000000Z
      handler_name    : L-SMASH Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2022-08-21T23:04:31.000000Z
      handler_name    : L-SMASH Audio Handler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x11b60cbc0] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x11b60cbc0] profile High, level 2.1, 4:2:0, 8-bit
[libx264 @ 0x11b60cbc0] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/Users/output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.3.100
  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x252, q=2-31, 25 fps, 12800 tbn (default)
    Metadata:
      creation_time   : 2022-08-21T23:05:50.000000Z
      handler_name    : L-SMASH Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.3.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      creation_time   : 2022-08-21T23:04:31.000000Z
      handler_name    : L-SMASH Audio Handler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.3.100 aac
frame=    0 fps=0.0 q=0.0 Lsize=    1836kB time=00:03:44.61 bitrate=  67.0kbits/s speed=96.5x    
video:0kB audio:1794kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.339867%
[aac @ 0x11b60dd00] Qavg: 8288.993

问:输出中没有视频流的原因是什么?如何修复?我的目标是获得完全相同的视频,只是缩小到提到的尺寸。

相关内容