gpt4 book ai didi

ffmpeg 将 .mkv 转换为 .264

转载 作者:行者123 更新时间:2023-12-04 23:09:06 25 4
gpt4 key购买 nike

我想将 .mkv 转换为 .264。
我尝试使用ffmpeg来做到这一点:

ffmpeg -i input.mkv -vcodec copy -acodec copy output.264

它可以正常工作,但是当我尝试使用 ffplay 播放 output.264 时:
ffplay -f h264 -i output.264

ffplay 响应是:
ffplay version N-75924-gd25c033 Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
libavutil 55. 3.100 / 55. 3.100
libavcodec 57. 5.100 / 57. 5.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 11.100 / 6. 11.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
[h264 @ 03972220] sps_id 24 out of rangeq= 0KB sq= 0B f=0/0
[h264 @ 03972220] missing picture in access unit with size 12836207
[h264 @ 03972220] data partitioning is not implemented. Update your FFmpeg versi
on to the newest one from Git. If the problem still occurs, it means that your f
ile has a feature which has not been implemented.
[h264 @ 03972220] If you want to help, upload a sample of this file to ftp://upl
oad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-deve
l@ffmpeg.org)
[h264 @ 03972220] data partitioning is not implemented. Update your FFmpeg versi
on to the newest one from Git. If the problem still occurs, it means that your f
ile has a feature which has not been implemented.
[h264 @ 03972220] If you want to help, upload a sample of this file to ftp://upl
oad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-deve
l@ffmpeg.org)
[h264 @ 03972220] sps_id 24 out of range
[h264 @ 03972220] data partitioning is not implemented. Update your FFmpeg versi
on to the newest one from Git. If the problem still occurs, it means that your f
ile has a feature which has not been implemented.
[h264 @ 03972220] If you want to help, upload a sample of this file to ftp://upl
oad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-deve
l@ffmpeg.org)
[h264 @ 03972220] no frame!
[h264 @ 039696e0] Stream #0: not enough frames to estimate rate; consider increa
sing probesize
[h264 @ 039696e0] decoding for stream 0 failed
[h264 @ 039696e0] Could not find codec parameters for stream 0 (Video: h264, non
e): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Contagion.264: could not find codec parameters

如何修复它并将 .mkv 正确转换为 .264?

最佳答案

您不能将音轨放入原始 H.264文件,您需要使用 h264_mp4toannexb比特流过滤器将流转换为附件 B 格式:
ffmpeg -i input.mkv -c:v copy -an -bsf:v h264_mp4toannexb out.264
比特流过滤器无需重新编码即可工作。

关于ffmpeg 将 .mkv 转换为 .264,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33100530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com