编译后的 ffmpeg 和 libx264 的播放问题

编译后的 ffmpeg 和 libx264 的播放问题

我以 10 位模式编译了 libx264,并针对它编译了 ffmpeg。顺便说一下,是在 Windows 上。似乎当我使用 ffmpeg 编码视频时,带有 ffdshow 编解码器的 Windows Media Player 无法播放视频。我使用了默认的 x264 色彩空间“yuv420p10le”。播放时,Ffdshow 将输出色彩空间报告为“P010”,我无法获得视频输出。其他 10 位视频播放良好,Ffdshow 将输出色彩空间报告为“YV12”。我对 libx264 使用了以下参数:CC=cl ./configure --disable-cli --enable-static --host=mingw64 --bit-depth=10对 ffmpeg 使用了以下参数:./configure --toolchain=msvc --arch=x86 --extra-ldflags="-LIBPATH:/d/ffmpeg/lib" --extra-cflags="-I/d/ffmpeg/headers" --enable-yasm --enable-asm --enable-static --disable-shared --enable-gpl --enable-version3 --enable-libx264

我使用以下命令进行转换:ffmpeg -i Input.mkv -vcodec h264 -an -sn Output.mkv

这是我的 ffmpeg 输出:

ffmpeg version N-83024-g95d9a85 Copyright (c) 2000-2017 the FFmpeg developers built with Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x64 configuration: --toolchain=msvc --arch=x86 --extra-ldflags='-LIBPATH:/d/ffmpeg/lib' --extra-cflags=-I/d/ffmpeg/headers --enable-yasm --enable-asm --enable-static --disable-shared --enable-gpl --enable-version3 --enable-libx264 libavutil 55. 43.100 / 55. 43.100 libavcodec 57. 71.100 / 57. 71.100 libavformat 57. 62.100 / 57. 62.100 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 68.100 / 6. 68.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100 Input #0, matroska,webm, from 'Input.mkv': Metadata: encoder : Haali DirectShow Matroska Muxer 1.11.288.0 creation_time : 2017-01-04T21:33:32.164000Z Duration: 00:24:10.19, start: 0.000000, bitrate: 162458 kb/s Stream #0:0(eng): Video: lagarith (LAGS / 0x5347414C), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1 k tbn, 1k tbc No pixel format specified, yuv420p10le for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. [libx264 @ 000000000046E260] using SAR=1/1 [libx264 @ 000000000046E260] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA4 FMA3 LZCNT BMI1 [libx264 @ 000000000046E260] profile High 10, level 4.0, 4:2:0 10-bit [libx264 @ 000000000046E260] 264 - core 148 r2744 b97ae06 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.vid eolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed _ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 looka head_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b _adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookah ead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, matroska, to 'Output.mkv': Metadata: encoder : Lavf57.62.100 Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23. 98 fps, 1k tbn, 23.98 tbc Metadata: encoder : Lavc57.71.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (lagarith (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame=34770 fps= 23 q=-1.0 Lsize= 339286kB time=00:24:10.07 bitrate=1916.7kbits/s speed=0.939x video:339026kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.076587% [libx264 @ 000000000046E260] frame I:761 Avg QP:29.18 size:156665 [libx264 @ 000000000046E260] frame P:10360 Avg QP:31.70 size: 16358 [libx264 @ 000000000046E260] frame B:23649 Avg QP:35.39 size: 2473 [libx264 @ 000000000046E260] consecutive B-frames: 6.9% 5.7% 4.2% 83.1% [libx264 @ 000000000046E260] mb I I16..4: 9.3% 77.8% 12.9% [libx264 @ 000000000046E260] mb P I16..4: 4.2% 8.8% 1.3% P16..4: 15.0% 3.7% 2.4% 0.0% 0.0% skip:64.6% [libx264 @ 000000000046E260] mb B I16..4: 0.2% 0.4% 0.1% B16..8: 10.4% 0.8% 0.1% direct: 0.4% skip:87.8% L0:45 .2% L1:53.0% BI: 1.8% [libx264 @ 000000000046E260] 8x8 transform intra:66.7% inter:79.7% [libx264 @ 000000000046E260] coded y,uvDC,uvAC intra: 48.9% 64.5% 31.3% inter: 3.4% 3.8% 0.2% [libx264 @ 000000000046E260] i16 v,h,dc,p: 29% 30% 8% 32% [libx264 @ 000000000046E260] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 28% 5% 7% 7% 7% 6% 6% [libx264 @ 000000000046E260] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 15% 18% 6% 9% 10% 7% 7% 4% [libx264 @ 000000000046E260] i8c dc,h,v,p: 58% 19% 17% 5% [libx264 @ 000000000046E260] Weighted P-Frames: Y:2.6% UV:2.3% [libx264 @ 000000000046E260] ref P L0: 71.1% 16.1% 12.7% 0.1% [libx264 @ 000000000046E260] ref B L0: 85.4% 10.6% 4.0% [libx264 @ 000000000046E260] ref B L1: 94.3% 5.7% [libx264 @ 000000000046E260] kb/s:1915.11

在执行转换或构建阶段我需要添加一些选项吗?

相关内容