{"action":"created","issue":{"url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/209","repository_url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers","labels_url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/209/comments","events_url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/209/events","html_url":"https://github.com/rdp/ffmpeg-windows-build-helpers/issues/209","id":211246845,"number":209,"title":"Successfully built x265 multi-bit depth but....","user":{"login":"Lazinezz","id":25685667,"avatar_url":"https://avatars2.githubusercontent.com/u/25685667?v=3","gravatar_id":"","url":"https://api.github.com/users/Lazinezz","html_url":"https://github.com/Lazinezz","followers_url":"https://api.github.com/users/Lazinezz/followers","following_url":"https://api.github.com/users/Lazinezz/following{/other_user}","gists_url":"https://api.github.com/users/Lazinezz/gists{/gist_id}","starred_url":"https://api.github.com/users/Lazinezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lazinezz/subscriptions","organizations_url":"https://api.github.com/users/Lazinezz/orgs","repos_url":"https://api.github.com/users/Lazinezz/repos","events_url":"https://api.github.com/users/Lazinezz/events{/privacy}","received_events_url":"https://api.github.com/users/Lazinezz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-03-01T23:54:27Z","updated_at":"2017-03-10T04:07:43Z","closed_at":null,"body":"Hi,\r\n   I managed to succesfully build multi-bit depth x265 using ur build script,\r\nx265 [info]: HEVC encoder version 2.3+17-6e348252e902\r\nx265 [info]: build info [Windows][GCC 6.3.0][64 bit] 8bit+10bit+12bit\r\n\r\n,but my apologies cos i had to modify ur script abit.If u dont mind, could you help to simplify it or do what is needed,i always use ur script to build ffmpeg cos its the best so far(atleast to me hehs) so here is what i modified in ur script..\r\n\r\n\r\nbuild_libx265() {\r\n  # the only one that uses mercurial, so there's some extra initial junk in this method... XXX needs some cleanup :|\r\n  local checkout_dir=x265\r\n  if [[ $high_bitdepth == \"y\" ]]; then\r\n    checkout_dir=x265_high_bitdepth_10\r\n  fi\r\n\r\n  if [[ $prefer_stable = \"n\" ]]; then\r\n    local old_hg_version\r\n    if [[ -d $checkout_dir ]]; then\r\n      cd $checkout_dir\r\n      if [[ $git_get_latest = \"y\" ]]; then\r\n        echo \"doing hg pull -u x265\"\r\n        old_hg_version=`hg --debug id -i`\r\n        hg pull -u || exit 1\r\n        hg update || exit 1 # guess you need this too if no new changes are brought down [what the...]\r\n      else\r\n        echo \"not doing hg pull x265\"\r\n        old_hg_version=`hg --debug id -i`\r\n      fi\r\n    else\r\n      echo \"doing hg clone x265\"\r\n      hg clone https://bitbucket.org/multicoreware/x265 $checkout_dir || exit 1\r\n      cd $checkout_dir\r\n      old_hg_version=none-yet\r\n    fi\r\n    cd source\r\n\r\n    # hg checkout 9b0c9b # no longer needed, but once was...left here so I know how :)\r\n\r\n    local new_hg_version=`hg --debug id -i`  \r\n    if [[ \"$old_hg_version\" != \"$new_hg_version\" ]]; then\r\n      echo \"got upstream hg changes, forcing rebuild...x265\"\r\n      rm -f already*\r\n    else\r\n      echo \"still at hg $new_hg_version x265\"\r\n    fi\r\n  else\r\n    # prefer_stable == \"y\" TODO clean this up...\r\n    local old_hg_version\r\n    if [[ -d $checkout_dir ]]; then\r\n      cd $checkout_dir\r\n      if [[ $git_get_latest = \"y\" ]]; then\r\n        echo \"doing hg pull -u x265\"\r\n        old_hg_version=`hg --debug id -i`\r\n        hg pull -u || exit 1\r\n        hg update || exit 1 # guess you need this too if no new changes are brought down [what the...]\r\n      else\r\n        echo \"not doing hg pull x265\"\r\n        old_hg_version=`hg --debug id -i`\r\n      fi\r\n    else\r\n      echo \"doing hg clone x265\"\r\n      hg clone https://bitbucket.org/multicoreware/x265 $checkout_dir || exit 1\r\n      cd $checkout_dir\r\n      old_hg_version=none-yet\r\n      create_build_dir\r\n      local build_root\r\n      build_root=\"$(pwd)\"\r\n      mkdir -p {8,10,12}bit\r\n    fi\r\n    cd 12bit\r\n\r\n    # hg checkout 9b0c9b # no longer needed, but once was...\r\n\r\n    local new_hg_version=`hg --debug id -i`  \r\n    if [[ \"$old_hg_version\" != \"$new_hg_version\" ]]; then\r\n      echo \"got upstream hg changes, forcing rebuild...x265\"\r\n      rm -f already*\r\n    else\r\n      echo \"still at hg $new_hg_version x265\"\r\n    fi\r\n  fi\r\n  \r\n  local cmake_params=\"-DENABLE_SHARED=OFF\"\r\n  if [[ $high_bitdepth == \"y\" ]]; then\r\n    cmake_params=\"$cmake_params -DHIGH_BIT_DEPTH=ON\" # Enable 10 bits (main10) and 12 bits (???) per pixels profiles.\r\n    if [ \"$bits_target\" = \"32\" ]; then\r\n      cmake_params=\"$cmake_params -DENABLE_ASSEMBLY=OFF\" # apparently required or build fails\r\n    fi\r\n  fi\r\n\r\n  #if [ \"$bits_target\" = \"32\" ]; then\r\n    cmake_params=\"$cmake_params -DWINXP_SUPPORT:BOOL=TRUE\" # enable windows xp support apparently\r\n  #fi\r\n\r\n  do_cmake \"$cmake_params ../source -DHIGH_BIT_DEPTH:BOOL=ON -DMAIN12:BOOL=ON -DENABLE_SHARED:BOOL=OFF -DEXPORT_C_API:BOOL=OFF -DENABLE_CLI:BOOL=OFF\"\r\n  do_make\r\n  cp libx265.a ../8bit/libx265_main12.a\r\n  cd ..\r\n\r\n  cd 10bit\r\n  do_cmake \"$cmake_params ../source -DHIGH_BIT_DEPTH:BOOL=ON -DMAIN10:BOOL=ON -DENABLE_SHARED:BOOL=OFF -DEXPORT_C_API:BOOL=OFF -DENABLE_CLI:BOOL=OFF\"\r\n  do_make\r\n  cp libx265.a ../8bit/libx265_main10.a\r\n  cd ..\r\n\r\n  cd 8bit\r\n  do_cmake \"$cmake_params ../source -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT:BOOL=ON -DLINKED_12BIT:BOOL=ON -DEXTRA_LIB=libx265_main10.a;libx265_main12.a\"\r\n  do_make\r\n  mv libx265.a libx265_main.a\r\n  ar -M <<EOF\r\nCREATE libx265.a\r\nADDLIB libx265_main.a\r\nADDLIB libx265_main10.a\r\nADDLIB libx265_main12.a\r\nSAVE\r\nEND\r\nEOF\r\n  do_make_install\r\n  cd ../..\r\n}\r\n\r\nthanks so much."},"comment":{"url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/comments/285568233","html_url":"https://github.com/rdp/ffmpeg-windows-build-helpers/issues/209#issuecomment-285568233","issue_url":"https://api.github.com/repos/rdp/ffmpeg-windows-build-helpers/issues/209","id":285568233,"user":{"login":"rzcat","id":4834177,"avatar_url":"https://avatars1.githubusercontent.com/u/4834177?v=3","gravatar_id":"","url":"https://api.github.com/users/rzcat","html_url":"https://github.com/rzcat","followers_url":"https://api.github.com/users/rzcat/followers","following_url":"https://api.github.com/users/rzcat/following{/other_user}","gists_url":"https://api.github.com/users/rzcat/gists{/gist_id}","starred_url":"https://api.github.com/users/rzcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzcat/subscriptions","organizations_url":"https://api.github.com/users/rzcat/orgs","repos_url":"https://api.github.com/users/rzcat/repos","events_url":"https://api.github.com/users/rzcat/events{/privacy}","received_events_url":"https://api.github.com/users/rzcat/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T04:07:43Z","updated_at":"2017-03-10T04:07:43Z","body":"@Lazinezz Replacing that line with yours still leads to error\r\n```shell\r\n[ 61%] Built target common\r\n[ 83%] Built target encoder\r\n[ 85%] Built target x265-static\r\n[ 86%] Linking CXX executable x265.exe\r\nlibx265.a: error adding symbols: Archive has no index; run ranlib to add one\r\ncollect2: error: ld returned 1 exit status\r\nCMakeFiles/cli.dir/build.make:360: recipe for target 'x265.exe' failed\r\nmake[2]: *** [x265.exe] Error 1\r\nCMakeFiles/Makefile2:137: recipe for target 'CMakeFiles/cli.dir/all' failed\r\nmake[1]: *** [CMakeFiles/cli.dir/all] Error 2\r\nMakefile:127: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n```\r\n\r\n@rdp there're tons of ott android box here in China, and they are really cheap, with the market growing rapidly. the cpu of mine is Amlogic S905, this can decode hevc x265 10bit up to 4k, and the price is about RMB200+(about USD30+) for a S905/S905X box, with 2G/16G+WiFi(2.4/5)+Bluetooth+GigabitLan....(well it may sound like an ad -_-)\r\nAnd the compression, size of a video encoded in x265 10bit is just about half the size of x264 based on the same picture quality i could accept, that can save **A LOT** HDD space. Having a multi-bitdepth-lib x265 encoder would be handy in different situations.\r\nhttp://www.msystem.waw.pl/x265/ has 8+10+12 multilib versions of x265 already. to be frank, i only need 8+10 for now."}}
{"actor":{"display_login":"rzcat"}}