首页 > 解决方案 > ffmpeg,使用 gpu 降低 fps - 缓冲的数据包过多

问题描述

我正在尝试降低大量视频的 fps。不幸的是,我对ffmpeg没有太多经验

这是我当前的命令,它是多个帖子的混合体。在这一点上,猜测工作比其他任何事情都多

ffmpeg \
  -y -hwaccel_output_format cuda -hwaccel_device 0 -hwaccel cuvid -c:v mpeg2_cuvid \
  -i myinput.mp4 -r 25 -c:v hevc_nvenc-b:v 128K -strict -2 -movflags faststart \ 
  /workspace/videos/24fps_trial2/rat1-control2.mp4 -c:v hevc_nvenc

它的要点只是我试图降低 fps 并使用硬件加速,因为我的数据集很大

我得到的信息是

Trailing option(s) found in the command: may be ignored.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x453a100] decoding for stream 0 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x453a100] Could not find codec parameters for stream 0 (Video: mpeg2video (hvc1 / 0x31637668), none(tv), 2704x1520, 59946 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/workspace/gs/Rat Controls Jan 2020 /Rat 1 Control 2 .MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2020-01-07T09:45:34.000000Z
    firmware        : HD7.01.01.70.00
  Duration: 00:01:49.63, start: 0.000000, bitrate: 60202 kb/s
    Stream #0:0(eng): Video: mpeg2video (hvc1 / 0x31637668), none(tv), 2704x1520, 59946 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 120k tbc (default)
    Metadata:
      creation_time   : 2020-01-07T09:45:34.000000Z
      handler_name    : GoPro H.265
      encoder         : GoPro H.265 encoder
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2020-01-07T09:45:34.000000Z
      handler_name    : GoPro AAC
    Stream #0:2(eng): Data: bin_data (gpmd / 0x646D7067), 29 kb/s (default)
    Metadata:
      creation_time   : 2020-01-07T09:45:34.000000Z
      handler_name    : GoPro MET
    Stream #0:3(eng): Data: none (fdsc / 0x63736466), 21 kb/s (default)
    Metadata:
      creation_time   : 2020-01-07T09:45:34.000000Z
      handler_name    : GoPro SOS
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> hevc (hevc_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Too many packets buffered for output stream 0:1.
[aac @ 0x45bf880] Qavg: 746.362
[aac @ 0x45bf880] 2 frames left in the queue on closing
Conversion failed!

标签: videoffmpeg

解决方案


推荐阅读