cdz
5th June 2012, 10:18
So, I'm still slightly new to the world of video encoding.
I've been trying to convert some raw yuy2 with x264, which results in a slightly darker output.
This is probably because I convert it to rgb24 before feeding it to x264. But what csp should I really use?
Using mencoder atm, with -vf format=rgb24, and x264 with --demuxer raw --input-csp rgb.
I'm using the 10bit version and output to i422, lossless
Results attached.
The system converted the images from png -- but the results are still visible.
First image is from the raw file.
Mencoder opts:
-nosound -ovc raw -of rawvideo -vf format=rgb32 -frames 1
x264 opts:
--preset placebo --crf 0 --input-res 1920x1080 --input-csp rgb --output-csp i422 --demuxer raw --verbose
Original file:
Video
ID : 0
Format : YUV
Codec ID : YUY2
Codec ID/Info : YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel
Duration : 1s 0ms
Bit rate : 995 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Compression mode : Lossless
Bits/(Pixel*Frame) : 16.000
Stream size : 119 MiB (100%)
Encoded file:
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 120
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=tesa / subme=11 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=0.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Thanks!
I've been trying to convert some raw yuy2 with x264, which results in a slightly darker output.
This is probably because I convert it to rgb24 before feeding it to x264. But what csp should I really use?
Using mencoder atm, with -vf format=rgb24, and x264 with --demuxer raw --input-csp rgb.
I'm using the 10bit version and output to i422, lossless
Results attached.
The system converted the images from png -- but the results are still visible.
First image is from the raw file.
Mencoder opts:
-nosound -ovc raw -of rawvideo -vf format=rgb32 -frames 1
x264 opts:
--preset placebo --crf 0 --input-res 1920x1080 --input-csp rgb --output-csp i422 --demuxer raw --verbose
Original file:
Video
ID : 0
Format : YUV
Codec ID : YUY2
Codec ID/Info : YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel
Duration : 1s 0ms
Bit rate : 995 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Compression mode : Lossless
Bits/(Pixel*Frame) : 16.000
Stream size : 119 MiB (100%)
Encoded file:
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 120
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=tesa / subme=11 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=0.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Thanks!