Suppot x265 and L-SMASH, and fix color space.
Fix chapter related code for x265 and refactor.
Fix minor audio / chapter lag issue.

The duration extraction logic on previous implementation was incorrect.
However, it was not a critical issue thanks to the property of TV programs.
Change the default CRF value to keep a consistency with x264.

Note: Compared from the perspective of PSNR.