diff -Naur mythtv-0.27-build-old/mythtv/external/FFmpeg/libavcodec/libx264.c mythtv-0.27-build-new/mythtv/external/FFmpeg/libavcodec/libx264.c
old
|
new
|
|
289 | 289 | x4->params.rc.f_pb_factor = avctx->b_quant_factor; |
290 | 290 | x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; |
291 | 291 | if (x4->preset || x4->tune) |
| 292 | av_log(avctx, AV_LOG_INFO, "x264 setting preset/tune to: %s/%s.\n", x4->preset, x4->tune); |
292 | 293 | if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) { |
293 | 294 | int i; |
294 | 295 | av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", x4->preset, x4->tune); |
diff -Naur mythtv-0.27-build-old/mythtv/libs/libmythtv/avformatwriter.cpp mythtv-0.27-build-new/mythtv/libs/libmythtv/avformatwriter.cpp
old
|
new
|
|
545 | 545 | av_opt_set_int(c, "mixed-refs", 1, 0); |
546 | 546 | av_opt_set_int(c, "8x8dct", 0, 0); |
547 | 547 | av_opt_set_int(c, "weightb", 0, 0); |
| 548 | |
| 549 | const char* preset = m_EncodingPreset.toStdString().c_str(); |
| 550 | av_opt_set(c->priv_data, "preset", preset, 0); |
| 551 | const char* tune = m_EncodingTune.toStdString().c_str(); |
| 552 | av_opt_set(c->priv_data, "tune", tune, 0); |
548 | 553 | } |
549 | 554 | |
550 | 555 | if(m_ctx->oformat->flags & AVFMT_GLOBALHEADER) |
diff -Naur mythtv-0.27-build-old/mythtv/libs/libmythtv/filewriterbase.h mythtv-0.27-build-new/mythtv/libs/libmythtv/filewriterbase.h
old
|
new
|
|
40 | 40 | void SetAudioFormat(AudioFormat f) { m_audioFormat = f; } |
41 | 41 | void SetThreadCount(int count) { m_encodingThreadCount = count; } |
42 | 42 | void SetTimecodeOffset(long long o) { m_startingTimecodeOffset = o; } |
| 43 | void SetEncodingPreset(QString preset) { m_EncodingPreset = preset; } |
| 44 | void SetEncodingTune(QString tune) { m_EncodingTune = tune; } |
43 | 45 | |
44 | 46 | long long GetFramesWritten(void) const { return m_framesWritten; } |
45 | 47 | long long GetTimecodeOffset(void) const { return m_startingTimecodeOffset; } |
… |
… |
|
67 | 69 | int m_encodingThreadCount; |
68 | 70 | long long m_framesWritten; |
69 | 71 | long long m_startingTimecodeOffset; |
| 72 | QString m_EncodingPreset; |
| 73 | QString m_EncodingTune; |
70 | 74 | }; |
71 | 75 | |
72 | 76 | #endif |
diff -Naur mythtv-0.27-build-old/mythtv/programs/mythtranscode/transcode.cpp mythtv-0.27-build-new/mythtv/programs/mythtranscode/transcode.cpp
old
|
new
|
|
556 | 556 | avfw->SetKeyFrameDist(30); |
557 | 557 | } |
558 | 558 | |
559 | | avfw->SetThreadCount( |
560 | | gCoreContext->GetNumSetting("HTTPLiveStreamThreads", 2)); |
| 559 | int threads = gCoreContext->GetNumSetting("HTTPLiveStreamThreads", 2); |
| 560 | QString preset = gCoreContext->GetSetting("HTTPLiveStreamPreset", "medium"); |
| 561 | QString tune = gCoreContext->GetSetting("HTTPLiveStreamTune", "film"); |
| 562 | |
| 563 | LOG(VB_GENERAL, LOG_NOTICE, |
| 564 | QString("x264 HLS using: %1 threads, '%2' profile and '%3' tune") |
| 565 | .arg(threads).arg(preset).arg(tune)); |
| 566 | |
| 567 | avfw->SetThreadCount(threads); |
| 568 | avfw->SetEncodingPreset(preset); |
| 569 | avfw->SetEncodingTune(tune); |
561 | 570 | |
562 | 571 | if (avfw2) |
563 | 572 | avfw2->SetThreadCount(1); |