xpra icon
Bug tracker and wiki

Changes between Version 14 and Version 15 of Encodings/x264


Ignore:
Timestamp:
04/07/20 09:20:19 (8 months ago)
Author:
Antoine Martin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Encodings/x264

    v14 v15  
    11{{{#!div class="box"
    22= x264 Encoder =
    3 The x264 encoding supports many options and tunings. It is the default encoding used when it is available because it offers the best performance and compression out of the box, unless you have [/wiki/Encodings/nvenc NVENC].
    4 Hopefully, this will one day be superseded by x265 support (#445), vp9 (#464) or daala (#454). Until then, it is the best encoding you can use with xpra.
     3The x264 encoder supports many options.
     4H264 is the default encoding used when it is available because it offers the best performance and compression out of the box, unless you have [/wiki/Encodings/nvenc NVENC].
     5
     6Hopefully, this will one day be superseded by AV1 (#1668), until then, it is the best encoding you can use with xpra. (see also: vp9 #464)
    57
    68[[BR]]
    79
    810Quality/speed and minimum quality/speed can be set via the command line or via the tray menu.
    9 Note that even when using the x264 encoding, some small screen updates may get sent as png or rgb24 to save time/bandwidth (not encoding a full frame).
     11Note that even when using the x264 encoding, some small screen updates may get sent as webp, png or even just plain RGB to save time/bandwidth (not avoid encoding a full video frame).
    1012
    1113[[BR]]
    1214Recent versions of x264 support {{{RGB}}} pixels directly as input, which removes the need for a [/wiki/CSC CSC] step on the server, and the [/wiki/ClientRendering/OpenGL OpenGL rendering] in the client also handles {{{RGB}}} data directly - which allows for an even faster forwarding of pixels to the client's screen.
    13 `Note: at lower quality settings, either automatically or manually selected, a [/wiki/CSC CSC] step may be introduced to reduce bandwidth.
     15`Note: at lower quality settings, either automatically or manually selected, a [/wiki/CSC CSC] step may be introduced to reduce bandwidth by downsampling the input to the encoder.
    1416}}}
    1517
     
    2224For encoding support (server), you only need the {{{x264}}} library and headers installed.
    2325
    24 For decoding support (client), you need the [http://www.ffmpeg.org/ ffmpeg] or [http://libav.org/ libav] library and headers installed.
     26For decoding support (client), you need the [http://www.ffmpeg.org/ ffmpeg] library and headers installed.
    2527
    26 `Please note:` the {{{libav}}} fork of ffmpeg requires a number of [/browser/xpra/trunk/src/patches patches] to be applied to the source for compatibility - failure to apply them will result in crashes.
    27 
    28 Unless you have also installed [/wiki/Encodings/nvenc nvenc], {{{x264}}} will be automatically used when you select the {{{h264}}} encoding. Alternatively, you can use the {{{--video-encoders=x264}}} option to ensure that {{{x264}}} is the only video encoder loaded in the server.
     28Unless you have also installed [/wiki/Encodings/nvenc nvenc], {{{x264}}} will be automatically used when you select the `h264` or `auto` encodings. Alternatively, you can use the {{{--video-encoders=x264}}} option to ensure that {{{x264}}} is the only video encoder loaded in the server.
    2929}}}
    3030
     
    8989== Ideas for future Work ==
    9090
    91 * finding the actual encoder dimension limits, which are currently hardcoded since there are no values in the header files: creating encoding contexts is pretty cheap, so we should be able to detect the limit by trial and error
    9291* better tuning: most default options are targeted at video
    93 * detect application profile ({{{xterm}}} vs {{{mplayer}}} vs {{{browser}}}) and tune settings
    9492* motion algorithm improvements:
    9593 * tweak motion range (see [http://mewiki.project357.com/wiki/X264_Settings#merange merange])
     
    9795 * write one where we can feed the information ourselves (assuming we do get it somehow)
    9896* tune {{{input-range}}} (see [http://mewiki.project357.com/wiki/X264_Settings#input-range X264 Settings: input-range]
    99 * allow intra frames when dealing with high fps: buffer one frame, we must schedule a timeout to ensure the buffered frames do get sent. (and force an IDR frame to flush)
    100 
    10197etc..
    10298}}}