Home > encode, x264, x264-bin > x264 rev2409 tMod

x264 rev2409 tMod

17th March 2014, Monday Leave a comment Go to comments

Sources on GitHub: https://github.com/astrataro/x264_tMod,
and on BitBucket: https://bitbucket.org/astrataro/x264_tmod.

Ad: new binary host is http://tmod.nmm-hd.org.

Downloadx264_rev2409_tMod.7z

Updates:
Only regular updates as always. Find more details on official x264-devel mail-list.
Nothing changed in tMod, except for some minor patch updates for x264 plain branch.

Edited on UTC 11:30 17 Mar 2014:
fixed a bug (patch/audio-support) that Matroska video length was not written after encoding, causing total length not available in MediaInfo or other players and editors. Thanks to reekilynn for reporting.

Edited on UTC 06:00 18 Mar 2014:
Automatically invoke AutoLoadPlugins() if available when using avs demuxer to open non-avs scripts. For AviSynth+. Patch from BugMaster.

Categories: encode, x264, x264-bin
  1. john mike
    17th March 2014, Monday at 11,22am GMT+0000

    Thanks as usual. I always waiting for your build 🙂

  2. 21st March 2014, Friday at 07,25pm GMT+0000

    Hi there,

    I am trying to make tMod on Ubuntu 12.04, and ffms and lavf refuse to show up.

    I googled, and it said that I need to compile ffmpeg to fix this problem.

    According to Ubuntu compile guide of ffmpeg, a “lib264” is in the guide.

    So…I am a little confused how I can combine this ffmpeg and tMod together, so we can use ffms and lavf in tMod… Any hint of how to do that?

    Thanks in advance.

    Beining
    ACICFG

    • 1st April 2014, Tuesday at 02,22am GMT+0000

      Building ffmpeg for x264’s lavf/ffms support does not require libx264, as x264 use lavf/ffms for demuxing and decoding, not for encoding.

      If you’d like to build *full* version of both ffmpeg and x264, try to:
      1. build and install ffmpeg without further encoding libraries — you don’t need libx264 so don’t specify --enable-libx264
      2. build and install ffms ( if you need it in your x264 )
      3. build and install x264 with libavcodec/libavformat/libswscale/libffms2/… — by default x264 will be built with them as long as you don’t use --disable-lavf --disable-ffms, if those libraries were not found, try to use PKG_CONFIG_PATH=xxxxxx to indicate pkg-config path. On Ubuntu it’s normally not needed.
      4. build ffmpeg again, with --enable-libx264 this time.

      P.S. if you build ffmpeg with libx264-tMod, you need to make some modification on ffmpeg. I wrote this patch quite a while ago, but it may not suit for current ffmpeg any more as I didn’t build ffmpeg with x264 for quite a long time:

      diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
      index 35c0030..d5f89da 100644
      --- a/libavcodec/libx264.c
      +++ b/libavcodec/libx264.c
      @@ -41,6 +41,7 @@ typedef struct X264Context {
           char *preset;
           char *tune;
           char *profile;
      +    char *device;
           char *level;
           int fastfirstpass;
           char *wpredp;
      @@ -365,8 +366,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
           if (x4->nal_hrd >= 0)
               x4->params.i_nal_hrd = x4->nal_hrd;
       
      -    if (x4->profile)
      -        if (x264_param_apply_profile(&x4->params, x4->profile) < 0) {
      +    if (x4->profile || x4->device)
      +        if (x264_param_apply_profile(&x4->params, x4->profile, x4->device) < 0) {
                   int i;
                   av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile);
                   av_log(avctx, AV_LOG_INFO, "Possible profiles:");
      @@ -475,9 +476,9 @@ static const AVOption options[] = {
           { "crf_max",       "In CRF mode, prevents VBV from lowering quality beyond this point.",OFFSET(crf_max), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, VE },
           { "qp",            "Constant quantization parameter rate control method",OFFSET(cqp),        AV_OPT_TYPE_INT,    { .i64 = -1 }, -1, INT_MAX, VE },
           { "aq-mode",       "AQ method",                                       OFFSET(aq_mode),       AV_OPT_TYPE_INT,    { .i64 = -1 }, -1, INT_MAX, VE, "aq_mode"},
      -    { "none",          NULL,                              0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_NONE},         INT_MIN, INT_MAX, VE, "aq_mode" },
      -    { "variance",      "Variance AQ (complexity mask)",   0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_VARIANCE},     INT_MIN, INT_MAX, VE, "aq_mode" },
      -    { "autovariance",  "Auto-variance AQ (experimental)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" },
      +    { "none",          NULL,                              0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_NONE},         INT_MIN, INT_MAX, VE, "aq_mode" },
      +    { "variance",      "Variance AQ (complexity mask)",   0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_MIX},          INT_MIN, INT_MAX, VE, "aq_mode" },
      +    { "autovariance",  "Auto-variance AQ (experimental)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOMIX},      INT_MIN, INT_MAX, VE, "aq_mode" },
           { "aq-strength",   "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), AV_OPT_TYPE_FLOAT, {.dbl = -1}, -1, FLT_MAX, VE},
           { "psy",           "Use psychovisual optimizations.",                 OFFSET(psy),           AV_OPT_TYPE_INT,    { .i64 = -1 }, -1, 1, VE },
           { "psy-rd",        "Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.", OFFSET(psy_rd), AV_OPT_TYPE_STRING,  {0 }, 0, 0, VE},
      --
      
  3. 26th March 2014, Wednesday at 02,27pm GMT+0000

    can’t download, only page of jibberish appears.

    • 1st April 2014, Tuesday at 02,09am GMT+0000

      DL well here though

  4. tophf
    30th March 2014, Sunday at 01,20pm GMT+0000

    Got a question: since your avs4x264mod can open mov/mp4 without indexing them first via LSMASHVideoSource(), why don’t you include this awesome feature in your x264 builds?

    Currently the only way is somewhat messy: a temporary avs script with LSMASHVideoSource needs to be created and then piped with avs4x264mod. The other option *would be* to use x264_64_tMod –demuxer lavf but unfortunately it doesn’t work with 100-200GB lossless mp4/mov files produced via x264_64_tMod –fragments –no-remux, it only sees ~100frames even if –frames #### option is specified.

    • 1st April 2014, Tuesday at 02,08am GMT+0000

      tMod invokes LSMASHVideoSource for mov/mp4 if you use --demuxer avs:
      Image and video hosting by TinyPic

      Actually lite version does this by default as it doesn’t contain lavf/ffms.

      • tophf
        1st April 2014, Tuesday at 09,15pm GMT+0000

        thanks, but this isn’t direct, it will use avisynth which autoloads lots of plugins and stuff, thus wasting OS memory and time. I mean why isn’t it possible to statically build with lsmashworks included?

  5. aaron
    31st March 2014, Monday at 04,54pm GMT+0000

    trying to compile for OSX with numerous errors. Do you have a compiled OSX version?

  6. aaron
    1st April 2014, Tuesday at 07,39pm GMT+0000

    Thank you for the Binary download links. The problem I seem to have with those binaries is that they are linked against a home-brew version of FFMPEG (and an older one at that). Do you know of a build that is not?

    • cnbeining
      1st April 2014, Tuesday at 07,41pm GMT+0000

      Well…..I will probably redo that later today and see whether it works or not.

    • cnbeining
      2nd April 2014, Wednesday at 02,34am GMT+0000

      Well….I think I am the second person in the history who decided to build x264 binary and decided to make them public…. And both of these 2 persons are in the same comment area…

      Whatever, check the Github for updates. This time I unlinked FFmpeg from Homebrew, and used a standalone binary of FFmpeg. Hope this would make a difference…

      • aaron
        2nd April 2014, Wednesday at 03,45am GMT+0000

        I really appreciate the time and effort you guys put into this. Thanks again!

  7. jpsdr
    16th April 2014, Wednesday at 09,06am GMT+0000

    Hello. I’ve just discovered this specific build, and i’m very interested by it. I’ve until now make my own build including 2 patchs, but i’ve seen they’re allready in your release. And, as i’m encoding animes, i’m of course very interested by all the new patches. But, for my personnal use, i’m also modifying one very little thing (allowing weightp=2 with blu-ray). So, i’m using turtoise git. Once i’ve clone your github repository, created my own personnal custom build branch, how can i compile your 2 differents versions (little and ffmpeg) ? I’m currently using to compile the x264 official realease the method described on doom10 (msys + mingw versions provided by komisar).

    • jpsdr
      16th April 2014, Wednesday at 04,38pm GMT+0000

      Hum… Not even able to compile, error on lsmash_importer.h… Will try disabling lsmash.

      • 17th April 2014, Thursday at 03,47pm GMT+0000

        lite version is pure x264 with l-smash, and no ffmpeg/libav/ffms linked in; while full version is compiled with those packages. there’s no difference in source code. you can build full version with doom10’s guide, or lite version by simply not compile ffmpeg/libav.

        btw, the only hacky thing for building tmod is compiling l-smash library. Though it’s not difficult by patching l-smash with this patch.

  8. jpsdr
    18th April 2014, Friday at 09,04am GMT+0000

    Thank for your answer. I’ve been able to compile disabling l-smash and all ffmpeg/audio/etc… As i’m doing only either mkv or raw h264 and without audio, allways from an avisynth script, what i’ve got is fine for me.
    I’m only interested in the new aq method patches. Do you have by any chance any feedback on them, or any “user manual” ? I’ve no idea how they should be used. Is it either aq2 or aq3 ? Can they be used together ? What parameters are advice for each kind of footage ? If used, is it intended to be with also aq-mode ? If yes 1, 2 or even 3 ? Are they more efficient on 8bit and finaly not very interesting on 10bit ? I’ve a lot of questions i’m unable to find answers. Apparently these patches were made by japanese people to improve anime quality encode. Good, it’s what i’m looking for. As people took and spend time to make them, i intend to believe they are interesting, but, it’s so much easy to screw things when you don’t realy know how to use theim, that you may finaly wrongly discard theim thinking they don’t improve quality, or even they give worse result.

  9. 22nd April 2014, Tuesday at 03,53am GMT+0000

    Hi, it seems to have issues on i586 machine

    [ 30s] filters/video/x86/yadif_sse_template.c: In function ‘filter_line_sse2’:
    [ 30s] filters/video/x86/yadif_sse_template.c:234:9: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
    [ 30s] filters/video/x86/yadif_sse_template.c:242:9: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
    [ 30s] filters/video/x86/yadif_sse_template.c:234:9: error: ‘asm’ operand has impossible constraints
    [ 30s] filters/video/x86/yadif_sse_template.c:234:9: error: ‘asm’ operand has impossible constraints
    [ 30s] filters/video/x86/yadif_sse_template.c:242:9: error: ‘asm’ operand has impossible constraints
    [ 30s] filters/video/x86/yadif_sse_template.c:242:9: error: ‘asm’ operand has impossible constraints

    I can’t find anywhere to report this to you….so…

  10. Bana
    29th May 2014, Thursday at 01,12am GMT+0000

    Hello,
    I’m trying to patch libx264.c for building ffmpeg with tMod, I added the modifications from your patch but I’ve the following error:

    libavcodec/libx264.c: In function ‘X264_init’:
    libavcodec/libx264.c:420:41: error: incompatible types when assigning to type ‘int[3]’ from type ‘int’
    libavcodec/libx264.c:422:41: error: incompatible types when assigning to type ‘int[3]’ from type ‘int’
    CC libavcodec/loco.o
    CC libavcodec/lossless_videodsp.o
    make: *** [libavcodec/libx264.o] Erreur 1

    Any help would be much appreciated. 🙂 Cheers and thank you.

  11. Bana
    29th May 2014, Thursday at 08,36am GMT+0000

    Thx for removing my previous reply! :\
    Thx for your help, very sweet.

    • Bana
      29th May 2014, Thursday at 08,38am GMT+0000

      Sorry, I wasn’t able to view my first reply. Dunno why. ^^’
      You can ignore the 2nd reply.
      ps: I’m still waiting for help, of course. 😀

  12. Aaron
    14th July 2014, Monday at 12,10am GMT+0000

    on Ubuntu 14 (64 bit) I’ve compiled l-smash and on make I get an AVI output error. So I disabled avi-output and now i get the following:

    mp4_lsmash.c:(.text+0x139f): undefined reference to `mp4sys_amr_create_damr’
    collect2: error: ld returned 1 exit status
    make: *** [x264] Error 1

    any suggestions on compiling for Ubuntu 14/64bit?

    • 15th July 2014, Tuesday at 01,13am GMT+0000

      I haven’t updated codes for the new l-smash API, so please use the versions of libs no later than the ones in the documents of provided windows binaries. They are proved to work. I need to spare some time to do the API updates.

  13. Jona
    13th August 2014, Wednesday at 06,43pm GMT+0000

    Thank you for this great build of x264. I was wondering if you can add a patch to prevent the computer from going to sleep while in the middle of encoding. More information can be found here https://www.doom9.org/showthread.php?t=169713

    Thank you!

  1. No trackbacks yet.

Leave a reply to 06_taro Cancel reply