Enhance building x264.exe
hydra3333 opened this issue · 0 comments
hydra3333 commented
To add .mp4 container output by x264.exe, I wonder if you would perhaps consider adding a few things ?
I gather that when built from source, x264.exe can
- input various container formats if built with "lavf support" (from ffmpeg).
- output various container formats eg if built with "L-SMASH support" (from L-SMASH-WORKS) https://github.com/HolyWu/L-SMASH-Works
eg from it's help:
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (yes).
or libav* formats if compiled with lavf support (yes) or ffms support
(no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC or L-SMASH support (lsmash)
Output bit depth: 8/10
If it's of any use, here's my .py files
{
'repo_type' : 'git',
'url' : 'https://code.videolan.org/videolan/x264.git',
'configure_options' : '--host={target_host} --enable-static --cross-prefix={cross_prefix_bare} --prefix={output_prefix}/x264_git.installed --enable-strip --bit-depth=all --extra-cflags="-DLIBXML_STATIC" --extra-cflags="-DGLIB_STATIC_COMPILATION" ',
'env_exports' : {
'PKGCONFIG' : 'pkg-config',
},
'depends_on' : [
'libffmpeg', 'liblsw', # 2019.12.13 HolyWu's lsw does not need avresample as it uses libswresample
],
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'x264' },
}
{ # used by liblsw and in turn product x264
'repo_type' : 'git',
'url' : 'https://github.com/hydra3333/l-smash', # 2019.12.13 mine is patched #'https://github.com/l-smash/l-smash.git',
'env_exports' : {
'PKGCONFIG' : 'pkg-config',
},
'configure_options':
'--prefix={target_prefix} '
'--cross-prefix={cross_prefix_bare} '
'--extra-libs="-lssp" '
,
'build_options': 'install-lib',
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'libl-smash' },
}
{ # use holywu fork of L-SMASH-Works, it's more frequently updated
'repo_type' : 'git',
'url' : 'https://github.com/HolyWu/L-SMASH-Works.git', # 2019.11.19 swap to HolyWu's fork as it seems more updated
'depth_git' : 0,
#'branch' : 'a2fd2e0c625a33b2f1af356689f2091bb677c9e0',
'env_exports' : {
'PKGCONFIG' : 'pkg-config',
},
'conf_system' : 'meson',
'build_system' : 'ninja',
'source_subfolder' : 'VapourSynth/build',
'run_post_patch' : [
'sed -i.BAK \'s;<VapourSynth.h>;"VapourSynth.h";g\' "../lsmashsource.h"',
'sed -i.BAK "s;vapoursynth_dep =;includes = include_directories(\'../include\')\\n\\nvapoursynth_dep =;g" "../meson.build"',
'sed -i.BAK \'s;dependencies : deps,;dependencies : deps,\\ninclude_directories : includes,;g\' "../meson.build"',
],
'configure_options' :
'--prefix={target_prefix} '
'--libdir={target_prefix}/lib '
#'--extra-libs="-lssp" '
'-D__USE_MINGW_ANSI_STDIO=1 '
'--default-library=static '
'--backend=ninja '
'--buildtype=release '
'--cross-file={meson_env_file} ./ ..'
,
'depends_on' : ['vapoursynth_libs', 'libffmpeg', 'libl-smash'],
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'liblsw' },
}