ffmpeg 神秘地增加了启动延迟

ffmpeg 神秘地增加了启动延迟

在将 MP4 转换为 TS 时,我发现 FFmpeg 添加了输入文件似乎不具备的“开始”延迟。对于我的输入,ffprobe 显示:

ffprobe version N-57943-g7b76976 Copyright (c) 2007-2013 the FFmpeg developers
  built on Nov  6 2013 14:00:40 with gcc 4.4.5 (Debian 4.4.5-8)
  configuration: --enable-libx264 --enable-gpl
  libavutil      52. 52.100 / 52. 52.100
  libavcodec     55. 41.100 / 55. 41.100
  libavformat    55. 21.100 / 55. 21.100
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.102 /  3. 90.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4-in-7A8FEADA-5EA6-11E3-AD13-4DD2258FBC88.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2013-11-08 15:15:12
  Duration: 00:00:11.56, start: 0.000000, bitrate: 2994 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 2807 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2013-11-08 15:15:12
      handler_name    : ?Mainconcept Video Media Handler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2013-11-08 15:15:12
      handler_name    : #Mainconcept MP4 Sound Media Handler

但是使用 FFmpeg 处理时:

ffmpeg -i '/tmp/test-no-qp.C2162DFC-6297-11E3-A68D-05E505A3FB93/output.mp4-in-7A8FEADA-5EA6-11E3-AD13-4DD2258FBC88.mp4' -s 1920x1080 -preset ultrafast -f mpegts -c:v libx264 -qp:v 18

我得到了额外的启动延迟:

(Snipping the same headers from the input side)
Input #0, mpegts, from 'output.mp4-out-7A8FEADA-5EA6-11E3-AD13-4DD2258FBC88.mp4':
  Duration: 00:00:11.55, start: 1.400000, bitrate: 1985 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s

时长似乎也进行了调整,但我并没有要求进行调整。我该如何消除它?我做了什么导致出现这种效果?我的 FFmpeg 行还有其他问题吗?

(FFmpeg版本和上面的ffprobe相同)

相关内容