0
I compiled libx264 in 10 bit mode and compiled ffmpeg against it. On windows BTW. It seems when I encode a video with my ffmpeg, my Windows Media Player with ffdshow codec is unable to play the video. I used the default x264 colorspace "yuv420p10le". Ffdshow reports output colorspace as "P010" when playing it and I can't get a video output. Other 10bit videos do play well with Ffdshow reporting the output colorspace as "YV12". I used the following parameters for libx264: CC=cl ./configure --disable-cli --enable-static --host=mingw64 --bit-depth=10
and the following parameters for 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
I used the following command to convert: ffmpeg -i Input.mkv -vcodec h264 -an -sn Output.mkv
This is my ffmpeg output:
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
Is there some option I need to add while performing the conversion or during the build phase?
Use
ffmpeg
for encoding instead ofx264
. – Ipor Sircer – 2017-01-08T22:48:18.7331@IporSircer - the OP is using ffmpeg to encode. To the OP, show the command you used. – Gyan – 2017-01-09T05:02:38.070
I used the following command:
ffmpeg -i Input.mkv -vcodec h264 -an -sn Out.mkv
– Trinopoty – 2017-01-09T07:03:05.553Looks ok. YV12 is YUV 4:2:0 8-bit. Confirm those other videos are actually 10-bit. Try playback with VLC or Potplayer. – Gyan – 2017-01-09T07:33:12.133
VLC is able to play my video just fine. Also, VLC does report my other videos as "Planar YUV 4:2:0 10bit LE". I'm guessing ffdshow is doing something weird with them and converting to 8bit? If so, it should be able to do the same with my videos but it does not. PS: My converted videos also report "Planar YUV 4:2:0 10bit LE" in VLC. – Trinopoty – 2017-01-09T07:54:23.993
I'm not entirely sure of the problem but, I modified ffdshow configuration a bit and now I'm able to get a video output. I disabled P010 and ffdshow now outputs YV12. – Trinopoty – 2017-01-09T09:13:49.687