]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
libav: transcode in HEVC
authorlekma <lekmalek@gmail.com>
Wed, 30 Sep 2015 15:17:19 +0000 (17:17 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 1 Oct 2015 13:06:50 +0000 (15:06 +0200)
- better latency for default settings

src/plumbing/transcoding.c

index aa401774bc76122e7a9ac5df63e93065e5cf50ac..f69dccbd7031a6b0e7ba99c139c3cd8572e253ab 100644 (file)
@@ -1204,13 +1204,14 @@ transcoder_stream_video(transcoder_t *t, transcoder_stream_t *ts, th_pkt_t *pkt)
       octx->pix_fmt        = PIX_FMT_YUV420P;
       octx->flags         |= CODEC_FLAG_GLOBAL_HEADER;
 
-      av_dict_set(&opts, "preset",    "superfast",       0);
-      av_dict_set(&opts, "tune",      "fastdecode",      0);
-      av_dict_set(&opts, "crf",       "18",              0);
-      // decrease latency as much as possible
-      av_dict_set(&opts, "x265_opts", "bframes=0",       0);
-      av_dict_set(&opts, "x265_opts", ":rc-lookahead=0", AV_DICT_APPEND);
-      av_dict_set(&opts, "x265_opts", ":scenecut=0",     AV_DICT_APPEND);
+      av_dict_set(&opts, "preset",    "ultrafast",        0);
+      av_dict_set(&opts, "tune",      "fastdecode",       0);
+      av_dict_set(&opts, "crf",       "18",               0);
+      // the following is equivalent to tune=zerolatency for presets: ultra/superfast
+      av_dict_set(&opts, "x265_opts", "bframes=0",        0);
+      av_dict_set(&opts, "x265_opts", ":rc-lookahead=0",  AV_DICT_APPEND);
+      av_dict_set(&opts, "x265_opts", ":scenecut=0",      AV_DICT_APPEND);
+      av_dict_set(&opts, "x265_opts", ":frame-threads=1", AV_DICT_APPEND);
 
       break;