MrVideo
29th September 2017, 07:04
Background: Need to recode H.264/4:2:2 video to H.264/4:2:0 video
Source test video is here (http://vidiot.com/CW-H264-test-good-170924-422.ts). Approx 100MB
Script that is run (cygwin XP-64 xterm):
x264 --demuxer lavf --input-csp i420 --input-res 1920x1080 --fps 29.97 \
--profile high --level 4.0 --bitrate 8000 --ref 4 \
--deblock 1:-1:-1 --me umh --subme 10 --psy-rd 1.00:0.15 --merange 24 \
--trellis 2 --deadzone-inter 21 --deadzone-intra 11 --fast-pskip \
--threads 12 --slices 4 --nr 0 --bframes 3 --b-pyramid strict \
--b-adapt 2 --b-bias 0 --direct auto --weightp 0 --keyint 30 \
--min-keyint 1 --scenecut 40 --rc-lookahead 60 --ratetol 1.0 \
--qcomp 0.60 --qpmin 10 --qpmax 51 --qpstep 4 --cplxblur 20.0 \
--qblur 0.5 --vbv-maxrate 16000 --vbv-bufsize 16000 \
--ipratio 1.40 --bluray-compat --open-gop --tff --sar 1:1 \
--output 0001_output.h264 CW-H264-test-good-170924-422.ts
Resulting output:
[h264 @ 038d41a0] SPS unavailable in decode_picture_timing
[h264 @ 038d41a0] non-existing PPS 0 referenced
[h264 @ 038d41a0] SPS unavailable in decode_picture_timing
[h264 @ 038d41a0] non-existing PPS 0 referenced
[h264 @ 038d41a0] decode_slice_header error
[h264 @ 038d41a0] no frame!
{repeat 51 more times}
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[h264 @ 003fe3a0] Missing reference picture, default is 2147483647
[h264 @ 003fe3a0] Missing reference picture, default is 2147483647
[h264 @ 003fe3a0] Missing reference picture, default is 65428
[h264 @ 003fe3a0] Missing reference picture, default is 65428
lavf [info]: 1920x1080i 1:1 @ 30000/1001 fps (cfr)
resize [warning]: converting from yuv422p to yuv420p
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
x264 [info]: profile High, level 4.0
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
x264 [info]: frame I:46 Avg QP:10.37 size: 16633
x264 [info]: frame P:328 Avg QP:11.80 size: 436
x264 [info]: frame B:936 Avg QP:16.14 size: 211
x264 [info]: consecutive B-frames: 2.7% 1.7% 13.5% 82.1%
x264 [info]: mb I I16..4: 74.5% 23.1% 2.4%
x264 [info]: mb P I16..4: 0.5% 0.1% 0.0% P16..4: 0.8% 0.0% 0.0% 0.0% 0.0% skip:98.5%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.9% 0.1% 0.0% direct: 0.0% skip:99.0% L0:41.0% L1:57.9% BI: 1.1%
x264 [info]: final ratefactor: -26.55
x264 [info]: field mbs: intra: 0.0% inter:0.0% skip:0.0%
x264 [info]: 8x8 transform intra:22.9% inter:46.2%
x264 [info]: direct mvs spatial:99.4% temporal:0.6%
x264 [info]: coded y,uvDC,uvAC intra: 2.0% 3.6% 3.2% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 93% 6% 0% 0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 74% 1% 26% 0% 0% 0% 0% 0% 0%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 23% 23% 2% 2% 3% 1% 2% 2%
x264 [info]: i8c dc,h,v,p: 83% 7% 10% 0%
x264 [info]: ref P L0: 77.0% 22.9% 0.1%
x264 [info]: ref B L0: 95.0% 5.0%
x264 [info]: ref B L1: 94.9% 5.1%
x264 [info]: kb/s:202.38
encoded 1310 frames, 38.35 fps, 202.38 kb/s
The --input-csp can be i422. It doesn't make a difference.
The output is on 1MB and black. It should be ~61% smaller than the original.
Any help in getting this working will be appreciated.
Source test video is here (http://vidiot.com/CW-H264-test-good-170924-422.ts). Approx 100MB
Script that is run (cygwin XP-64 xterm):
x264 --demuxer lavf --input-csp i420 --input-res 1920x1080 --fps 29.97 \
--profile high --level 4.0 --bitrate 8000 --ref 4 \
--deblock 1:-1:-1 --me umh --subme 10 --psy-rd 1.00:0.15 --merange 24 \
--trellis 2 --deadzone-inter 21 --deadzone-intra 11 --fast-pskip \
--threads 12 --slices 4 --nr 0 --bframes 3 --b-pyramid strict \
--b-adapt 2 --b-bias 0 --direct auto --weightp 0 --keyint 30 \
--min-keyint 1 --scenecut 40 --rc-lookahead 60 --ratetol 1.0 \
--qcomp 0.60 --qpmin 10 --qpmax 51 --qpstep 4 --cplxblur 20.0 \
--qblur 0.5 --vbv-maxrate 16000 --vbv-bufsize 16000 \
--ipratio 1.40 --bluray-compat --open-gop --tff --sar 1:1 \
--output 0001_output.h264 CW-H264-test-good-170924-422.ts
Resulting output:
[h264 @ 038d41a0] SPS unavailable in decode_picture_timing
[h264 @ 038d41a0] non-existing PPS 0 referenced
[h264 @ 038d41a0] SPS unavailable in decode_picture_timing
[h264 @ 038d41a0] non-existing PPS 0 referenced
[h264 @ 038d41a0] decode_slice_header error
[h264 @ 038d41a0] no frame!
{repeat 51 more times}
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[h264 @ 003fe3a0] Missing reference picture, default is 2147483647
[h264 @ 003fe3a0] Missing reference picture, default is 2147483647
[h264 @ 003fe3a0] Missing reference picture, default is 65428
[h264 @ 003fe3a0] Missing reference picture, default is 65428
lavf [info]: 1920x1080i 1:1 @ 30000/1001 fps (cfr)
resize [warning]: converting from yuv422p to yuv420p
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
x264 [info]: profile High, level 4.0
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
[mpegts @ 003f53a0] PES packet size mismatch
x264 [info]: frame I:46 Avg QP:10.37 size: 16633
x264 [info]: frame P:328 Avg QP:11.80 size: 436
x264 [info]: frame B:936 Avg QP:16.14 size: 211
x264 [info]: consecutive B-frames: 2.7% 1.7% 13.5% 82.1%
x264 [info]: mb I I16..4: 74.5% 23.1% 2.4%
x264 [info]: mb P I16..4: 0.5% 0.1% 0.0% P16..4: 0.8% 0.0% 0.0% 0.0% 0.0% skip:98.5%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.9% 0.1% 0.0% direct: 0.0% skip:99.0% L0:41.0% L1:57.9% BI: 1.1%
x264 [info]: final ratefactor: -26.55
x264 [info]: field mbs: intra: 0.0% inter:0.0% skip:0.0%
x264 [info]: 8x8 transform intra:22.9% inter:46.2%
x264 [info]: direct mvs spatial:99.4% temporal:0.6%
x264 [info]: coded y,uvDC,uvAC intra: 2.0% 3.6% 3.2% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 93% 6% 0% 0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 74% 1% 26% 0% 0% 0% 0% 0% 0%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 23% 23% 2% 2% 3% 1% 2% 2%
x264 [info]: i8c dc,h,v,p: 83% 7% 10% 0%
x264 [info]: ref P L0: 77.0% 22.9% 0.1%
x264 [info]: ref B L0: 95.0% 5.0%
x264 [info]: ref B L1: 94.9% 5.1%
x264 [info]: kb/s:202.38
encoded 1310 frames, 38.35 fps, 202.38 kb/s
The --input-csp can be i422. It doesn't make a difference.
The output is on 1MB and black. It should be ~61% smaller than the original.
Any help in getting this working will be appreciated.