如何摆脱卡住的 ffmpeg“pts 没有值”错误

如何摆脱卡住的 ffmpeg“pts 没有值”错误

我正在尝试将 Sony Vegas 的 AVC 文件转换为 MP4 文件,以便在 DaVinci Resolve(不支持 .avc)中使用。因为我不想花几个小时重新编码视频,所以我想使用该-copy codecs选项。但是,它给了我“pts 没有值”错误。我读过互联网上的其他帖子,包括这个网站上的一个帖子,他们都建议使用-fflags +genpts。然而,这并不能解决问题。我尝试使用的当前输入是:

ffmpeg -fflags +genpts -i camcord.avc -codec copy camcord.mp4

输出结果如下:

ffmpeg version N-81831-g97e7f03 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-fre
i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enab
le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-lib
soxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --ena
ble-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 60.101 / 57. 60.101
  libavformat    57. 51.102 / 57. 51.102
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, h264, from 'camcord.avc':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1200k tbn, 47.95 tbc
Output #0, mp4, to 'camcord2.mp4':
  Metadata:
    encoder         : Lavf57.51.102
    Stream #0:0: Video: h264 (High) ([33][0][0][0] / 0x0021), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1200k tbn, 1200k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 000000000292f9a0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000000000292f9a0] pts has no value
    Last message repeated 167 times

我检查了输出文件,它似乎播放得很好。这是否意味着 pts 错误应该仍然存在并且可以安全地忽略?

相关内容