Speed-up HLS transcode by specifying the x264 preset and tune

Multimedia / MythTV - Warpme [o2.pl] - 21 February 2014 11:21 UTC

x264 lib has capability to tune performance/quality for given deployment scenario. This patch allows user to select preset & tune for achieving desired speed-qualty compromise. Original MythTV code is using defaults preset/tune: "medium/". Setting preset to "ultrafast" and tune to "movie" gives me hard-to-notice-difference picture and 35-37% transcoding speedup. On 3220T (IVB i3, 35W) transcode 3-5Mb/s 1080i@50 movie is approx 30-35% faster than realtime while default settings give me 90-95% of realtime. User preset/tune change is arranged exactly the same like with transcode threads.

x264 available presets are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo

Available tunes are: film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency

2dbf1f3 Speed-up HLS transcode by specifying the x264 preset and tune
mythtv/external/FFmpeg/libavcodec/libx264.c | 1 +
mythtv/libs/libmythtv/avformatwriter.cpp | 5 +++++
mythtv/libs/libmythtv/filewriterbase.h | 4 ++++
mythtv/programs/mythtranscode/transcode.cpp | 13 +++++++++++--
4 files changed, 21 insertions(+), 2 deletions(-)

Upstream: github.com

  • Share