Opened 5 years ago

Closed 5 years ago

#12055 closed Patch - Feature (fixed)

HLS transcode speed-up by enabling to tune x264 preset/tune

Reported by: warpme@… Owned by: stuartm
Priority: major Milestone: 0.28
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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. Oryginal MythTV code is using defaults preset/tune: "medium/<null>". 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. E.g. to change preset from default 'medium' to 'ultrafast', run mysql clinet in terminal and issue:

INSERT settings ( value, data, hostname ) VALUES ( 'HTTPLiveStreamPreset', 'ultrafast', NULL);  

To change preset, issue:

UPDATE settings SET data = 'medium' WHERE value = 'HTTPLiveStreamPreset';

x264 available presets are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo To change tune from default 'null' to 'film', run mysql client in terminal and issue:

INSERT settings ( value, data, hostname ) VALUES ( 'HTTPLiveStreamTune', 'movie', NULL);

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

Attachments (1)

0259-ticket12xxx-hls-add-preset-tune.patch (3.8 KB) - added by warpme@… 5 years ago.
patch to transcoder speed-up

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by warpme@…

patch to transcoder speed-up

comment:1 Changed 5 years ago by stuartm

Milestone: unknown0.28
Owner: set to stuartm
Priority: minormajor
Status: newaccepted
Type: Bug Report - GeneralPatch - Feature
Version: UnspecifiedMaster Head

comment:2 Changed 5 years ago by Warpme <warpme@…>

Resolution: fixed
Status: acceptedclosed

In 2dbf1f382236c2001683a74f9f6fe7fc46a89412/mythtv:

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

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/<null>". 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

Signed-off-by: Stuart Morgan <smorgan@…>

Fixes #12055

Note: See TracTickets for help on using tickets.