首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将.mkv转换为.264

将.mkv转换为.264
EN

Stack Overflow用户
提问于 2015-10-13 10:38:45
回答 1查看 1.9K关注 0票数 0

我想把.mkv转换成.264。我试着用ffmpeg:

代码语言:javascript
复制
ffmpeg -i input.mkv -vcodec copy -acodec copy output.264

它工作正常,但当我尝试使用ffplay播放output.264时:

代码语言:javascript
复制
ffplay -f h264 -i output.264

对此的回应是:

代码语言:javascript
复制
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?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-13 10:59:08

您不能将音频轨道放入原始的H.264文件中,需要使用h264_mp4toannexb位流筛选器将流转换为附件B格式:

ffmpeg -i input.mkv -c:v copy -an -bsf:v h264_mp4toannexb out.264

比特流过滤器工作不需要重新编码。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33100530

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档