File indexing completed on 2025-01-19 03:57:00
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2017-05-25 0007 * Description : a tool to generate video slideshow from images. 0008 * 0009 * SPDX-FileCopyrightText: 2017-2022 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "vidslidesettings.h" 0016 0017 // Qt includes 0018 0019 #include <QStandardPaths> 0020 0021 // KDE includes 0022 0023 #include <klocalizedstring.h> 0024 #include <kconfiggroup.h> 0025 0026 // Local includes 0027 0028 #include "digikam_globals.h" 0029 0030 namespace Digikam 0031 { 0032 0033 VidSlideSettings::VidSlideSettings() 0034 : selMode (IMAGES), 0035 transition (TransitionMngr::None), 0036 imgFrames (125), 0037 abitRate (64000), 0038 vbitRate (VBR12), 0039 vStandard (PAL), 0040 vType (BLUERAY), 0041 vCodec (X264), 0042 vFormat (MP4), 0043 vEffect (EffectMngr::None), 0044 conflictRule (FileSaveConflictBox::OVERWRITE), 0045 outputDir (QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)), 0046 outputPlayer (INTERNAL), 0047 equalize (false), 0048 strength (5), 0049 iface (nullptr) 0050 { 0051 } 0052 0053 VidSlideSettings::~VidSlideSettings() 0054 { 0055 } 0056 0057 void VidSlideSettings::readSettings(KConfigGroup& group) 0058 { 0059 selMode = (Selection)group.readEntry("SelMode", 0060 (int)IMAGES); 0061 imgFrames = group.readEntry("ImgFrames", 0062 125); 0063 vStandard = (VidStd)group.readEntry("VStandard", 0064 (int)PAL); 0065 vbitRate = (VidBitRate)group.readEntry("VBitRate", 0066 (int)VBR12); 0067 vCodec = (VidCodec)group.readEntry("VCodec", 0068 (int)X264); 0069 vType = (VidType)group.readEntry("VType", 0070 (int)BLUERAY); 0071 vFormat = (VidFormat)group.readEntry("VFormat", 0072 (int)MP4); 0073 vEffect = (EffectMngr::EffectType)group.readEntry("VEffect", 0074 (int)EffectMngr::None); 0075 abitRate = group.readEntry("ABitRate", 0076 64000); 0077 transition = (TransitionMngr::TransType)group.readEntry("Transition", 0078 (int)TransitionMngr::None); 0079 conflictRule = (FileSaveConflictBox::ConflictRule)group.readEntry("ConflictRule", 0080 (int)FileSaveConflictBox::OVERWRITE); 0081 outputDir = group.readEntry("OutputDir", 0082 QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); 0083 audioTrack = group.readEntry("AudioTrack", 0084 QString()); 0085 outputPlayer = (VidPlayer)group.readEntry("OutputPlayer", 0086 (int)INTERNAL); 0087 ffmpegPath = group.readEntry("FFmpegPath", 0088 defaultFFmpegSearchPaths().first()); 0089 equalize = group.readEntry("Equalize", 0090 false); 0091 strength = group.readEntry("Strength", 0092 5); 0093 } 0094 0095 void VidSlideSettings::writeSettings(KConfigGroup& group) 0096 { 0097 group.writeEntry("SelMode", (int)selMode); 0098 group.writeEntry("ImgFrames", imgFrames); 0099 group.writeEntry("VStandard", (int)vStandard); 0100 group.writeEntry("VBitRate", (int)vbitRate); 0101 group.writeEntry("VCodec", (int)vCodec); 0102 group.writeEntry("VType", (int)vType); 0103 group.writeEntry("VFormat", (int)vFormat); 0104 group.writeEntry("VEffect", (int)vEffect); 0105 group.writeEntry("Transition", (int)transition); 0106 group.writeEntry("ABitRate", abitRate); 0107 group.writeEntry("ConflictRule", (int)conflictRule); 0108 group.writeEntry("OutputDir", outputDir); 0109 group.writeEntry("AudioTrack", audioTrack); 0110 group.writeEntry("OutputPlayer", (int)outputPlayer); 0111 group.writeEntry("FFmpegPath", ffmpegPath); 0112 group.writeEntry("Equalize", equalize); 0113 group.writeEntry("Strength", strength); 0114 } 0115 0116 QSize VidSlideSettings::videoSize() const 0117 { 0118 return videoSizeFromType(vType); 0119 } 0120 0121 QSize VidSlideSettings::videoSizeFromType(VidType type) 0122 { 0123 QSize s; 0124 0125 switch (type) 0126 { 0127 case QVGA: 0128 { 0129 s = QSize(320, 180); 0130 break; 0131 } 0132 0133 case VCD1: 0134 { 0135 s = QSize(352, 240); 0136 break; 0137 } 0138 0139 case VCD2: 0140 { 0141 s = QSize(352, 288); 0142 break; 0143 } 0144 0145 case CVD1: 0146 { 0147 s = QSize(352, 480); 0148 break; 0149 } 0150 0151 case CVD2: 0152 { 0153 s = QSize(352, 576); 0154 break; 0155 } 0156 0157 case HVGA: 0158 { 0159 s = QSize(480, 270); 0160 break; 0161 } 0162 0163 case SVCD1: 0164 { 0165 s = QSize(480, 480); 0166 break; 0167 } 0168 0169 case SDTV1: 0170 { 0171 s = QSize(528, 480); 0172 break; 0173 } 0174 0175 case SDTV2: 0176 { 0177 s = QSize(544, 480); 0178 break; 0179 } 0180 0181 case EDTV1: 0182 { 0183 s = QSize(544, 576); 0184 break; 0185 } 0186 0187 case SVCD2: 0188 { 0189 s = QSize(480, 576); 0190 break; 0191 } 0192 0193 case EGA: 0194 { 0195 s = QSize(640, 350); 0196 break; 0197 } 0198 0199 case VGA: 0200 { 0201 s = QSize(640, 480); 0202 break; 0203 } 0204 0205 case SDTV3: 0206 { 0207 s = QSize(704, 480); 0208 break; 0209 } 0210 0211 case EDTV2: 0212 { 0213 s = QSize(704, 576); 0214 break; 0215 } 0216 0217 case DVD1: 0218 { 0219 s = QSize(720, 480); 0220 break; 0221 } 0222 0223 case DVD2: 0224 { 0225 s = QSize(720, 576); 0226 break; 0227 } 0228 0229 case WVGA: 0230 { 0231 s = QSize(800, 450); 0232 break; 0233 } 0234 0235 case SVGA: 0236 { 0237 s = QSize(800, 600); 0238 break; 0239 } 0240 0241 case DVGA: 0242 { 0243 s = QSize(960, 640); 0244 break; 0245 } 0246 0247 case XVGA: 0248 { 0249 s = QSize(1024, 576); 0250 break; 0251 } 0252 0253 case HDTV: 0254 { 0255 s = QSize(1280, 720); 0256 break; 0257 } 0258 0259 case WXGA1: 0260 { 0261 s = QSize(1280, 768); 0262 break; 0263 } 0264 0265 case WXGA2: 0266 { 0267 s = QSize(1280, 800); 0268 break; 0269 } 0270 0271 case SXGA: 0272 { 0273 s = QSize(1280, 1024); 0274 break; 0275 } 0276 0277 case SXGAPLUS: 0278 { 0279 s = QSize(1400, 1050); 0280 break; 0281 } 0282 0283 case WSXGA: 0284 { 0285 s = QSize(1440, 900); 0286 break; 0287 } 0288 0289 case UXGA: 0290 { 0291 s = QSize(1600, 1200); 0292 break; 0293 } 0294 0295 case HDPLUS: 0296 { 0297 s = QSize(1600, 900); 0298 break; 0299 } 0300 0301 case WSXGAPLUS: 0302 { 0303 s = QSize(1680, 1050); 0304 break; 0305 } 0306 0307 case WUXGA: 0308 { 0309 s = QSize(1920, 1200); 0310 break; 0311 } 0312 0313 case TXGA: 0314 { 0315 s = QSize(1920, 1440); 0316 break; 0317 } 0318 0319 case QXGA: 0320 { 0321 s = QSize(2048, 1536); 0322 break; 0323 } 0324 0325 case UWFHD: 0326 { 0327 s = QSize(2560, 1080); 0328 break; 0329 } 0330 0331 case WQHD: 0332 { 0333 s = QSize(2560, 1440); 0334 break; 0335 } 0336 0337 case WQXGA: 0338 { 0339 s = QSize(2560, 1600); 0340 break; 0341 } 0342 0343 case QSXGA: 0344 { 0345 s = QSize(2560, 2048); 0346 break; 0347 } 0348 0349 case QSXGAPLUS: 0350 { 0351 s = QSize(2800, 2100); 0352 break; 0353 } 0354 0355 case WQXGAPLUS: 0356 { 0357 s = QSize(3200, 1800); 0358 break; 0359 } 0360 0361 case WQSXGA: 0362 { 0363 s = QSize(3200, 2048); 0364 break; 0365 } 0366 0367 case QUXGA: 0368 { 0369 s = QSize(3200, 2400); 0370 break; 0371 } 0372 0373 case UHD4K: 0374 { 0375 s = QSize(3840, 2160); 0376 break; 0377 } 0378 0379 case WQUXGA: 0380 { 0381 s = QSize(3840, 2400); 0382 break; 0383 } 0384 0385 case HXGA: 0386 { 0387 s = QSize(4096, 3072); 0388 break; 0389 } 0390 0391 case UHD5K: 0392 { 0393 s = QSize(5120, 2880); 0394 break; 0395 } 0396 0397 case WHXGA: 0398 { 0399 s = QSize(5120, 3200); 0400 break; 0401 } 0402 0403 case HSXGA: 0404 { 0405 s = QSize(5120, 4096); 0406 break; 0407 } 0408 0409 case UHD6K: 0410 { 0411 s = QSize(6016, 3384); 0412 break; 0413 } 0414 0415 case WHSXGA: 0416 { 0417 s = QSize(6400, 4096); 0418 break; 0419 } 0420 0421 case HUXGA: 0422 { 0423 s = QSize(6400, 4800); 0424 break; 0425 } 0426 0427 case UHD8K: 0428 { 0429 s = QSize(7680, 4320); 0430 break; 0431 } 0432 0433 case WHUXGA: 0434 { 0435 s = QSize(7680, 4800); 0436 break; 0437 } 0438 0439 case UW10K: 0440 { 0441 s = QSize(10240, 4320); 0442 break; 0443 } 0444 0445 case UW16K: 0446 { 0447 s = QSize(15360, 8640); 0448 break; 0449 } 0450 0451 default: // BLUERAY 0452 { 0453 s = QSize(1920, 1080); 0454 break; 0455 } 0456 } 0457 0458 return s; 0459 } 0460 0461 bool VidSlideSettings::isVideoTVFormat(VidType type) 0462 { 0463 switch (type) 0464 { 0465 case VCD1: 0466 case VCD2: 0467 case CVD1: 0468 case CVD2: 0469 case SVCD1: 0470 case SDTV1: 0471 case SDTV2: 0472 case EDTV1: 0473 case SVCD2: 0474 case SDTV3: 0475 case EDTV2: 0476 case DVD1: 0477 case DVD2: 0478 case HDTV: 0479 case BLUERAY: 0480 case UHD4K: 0481 case UHD8K: 0482 { 0483 return true; 0484 } 0485 0486 default: 0487 { 0488 return false; 0489 } 0490 } 0491 } 0492 0493 QMap<VidSlideSettings::VidType, QString> VidSlideSettings::videoTypeNames() 0494 { 0495 QMap<VidType, QString> types; 0496 0497 types[QVGA] = i18nc("Video Type: QVGA", "QVGA - 320x180 - 16:9"); 0498 types[VCD1] = i18nc("Video Type: VCD1", "VCD - 352x240 - 7:5"); 0499 types[VCD2] = i18nc("Video Type: VCD2", "VCD - 352x288 - 6:5"); 0500 types[CVD1] = i18nc("Video Type: CVD1", "CVD - 352x480 - 4:3"); 0501 types[CVD2] = i18nc("Video Type: CVD2", "CVD - 352x576 - 16:9"); 0502 types[HVGA] = i18nc("Video Type: HVGA", "HVGA - 480x270 - 16:9"); 0503 types[SVCD1] = i18nc("Video Type: SVCD1", "SVCD - 480x480 - 1:1"); 0504 types[SDTV1] = i18nc("Video Type: SDTV1", "SDTV - 528x480 - 11:10"); 0505 types[SDTV2] = i18nc("Video Type: SDTV2", "SDTV - 544x480 - 17:15"); 0506 types[EDTV1] = i18nc("Video Type: EDTV1", "EDTV - 544x576 - 17:18"); 0507 types[SVCD2] = i18nc("Video Type: SVCD2", "SVCD - 480x576 - 5:6"); 0508 types[EGA] = i18nc("Video Type: EGA", "EGA - 640x350 - 16:9"); 0509 types[VGA] = i18nc("Video Type: VGA", "VGA - 640x480 - 4:3"); 0510 types[SDTV3] = i18nc("Video Type: SDTV3", "SDTV - 704x480 - 22:15"); 0511 types[EDTV2] = i18nc("Video Type: EDTV2", "EDTV - 704x576 - 11:9"); 0512 types[DVD1] = i18nc("Video Type: DVD", "DVD - 720x480 - 3:2"); 0513 types[DVD2] = i18nc("Video Type: DVD", "DVD - 720x576 - 5:4"); 0514 types[WVGA] = i18nc("Video Type: WVGA", "WVGA - 800x450 - 16:9"); 0515 types[SVGA] = i18nc("Video Type: SVGA", "SVGA - 800x600 - 4:3"); 0516 types[DVGA] = i18nc("Video Type: DVGA", "DVGA - 960x640 - 3:2"); 0517 types[XVGA] = i18nc("Video Type: XVGA", "XVGA - 1024x576 - 16:9"); 0518 types[HDTV] = i18nc("Video Type: HDTV", "HDTV - 1280x720 - 16:9"); 0519 types[WXGA1] = i18nc("Video Type: WXGA1", "WXGA - 1280x768 - 5:3"); 0520 types[WXGA2] = i18nc("Video Type: WXGA2", "WXGA - 1280x800 - 8:5"); 0521 types[SXGA] = i18nc("Video Type: SXGA", "SXGA - 1280x1024 - 5:4"); 0522 types[SXGAPLUS] = i18nc("Video Type: SXGAPLUS", "SXGAPLUS - 1400x1050 - 4:3"); 0523 types[WSXGA] = i18nc("Video Type: WSXGA", "WSXGA - 1440x900 - 8:5"); 0524 types[HDPLUS] = i18nc("Video Type: HDPLUS", "HDPLUS - 1600x900 - 16:9"); 0525 types[WSXGAPLUS] = i18nc("Video Type: WSXGAPLUS", "WSXGAPLUS - 1680x1050 - 8:5"); 0526 types[UXGA] = i18nc("Video Type: UXGA", "UXGA - 1600x1200 - 4:3"); 0527 types[BLUERAY] = i18nc("Video Type: BLUERAY", "BLUERAY - 1920x1080 - 16:9"); 0528 types[WUXGA] = i18nc("Video Type: WUXGA", "WUXGA - 1920x1200 - 8:5"); 0529 types[TXGA] = i18nc("Video Type: TXGA", "TXGA - 1920x1440 - 7:5"); 0530 types[QXGA] = i18nc("Video Type: QXGA", "QXGA - 2048x1536 - 4:3"); 0531 types[UWFHD] = i18nc("Video Type: UWFHD", "UWFHD - 2560x1080 - 21:9"); 0532 types[WQHD] = i18nc("Video Type: WQHD", "WQHD - 2560x1440 - 16:9"); 0533 types[WQXGA] = i18nc("Video Type: WQXGA", "WQXGA - 2560x1600 - 8:5"); 0534 types[QSXGA] = i18nc("Video Type: QSXGA", "QSXGA - 2560x2048 - 5:4"); 0535 types[QSXGAPLUS] = i18nc("Video Type: QSXGAPLUS", "QSXGAPLUS - 2800x2100 - 4:3"); 0536 types[WQXGAPLUS] = i18nc("Video Type: WQXGAPLUS", "WQXGAPLUS - 3200x1800 - 16:9"); 0537 types[WQSXGA] = i18nc("Video Type: WQSXGA", "WQSXGA - 3200x2048 - 25:16"); 0538 types[QUXGA] = i18nc("Video Type: QUXGA", "QUXGA - 3200x2400 - 4:3"); 0539 types[UHD4K] = i18nc("Video Type: UHD4K", "UHD4K - 3840x2160 - 16:9"); 0540 types[WQUXGA] = i18nc("Video Type: WQUXGA", "WQUXGA - 3840x2400 - 8:5"); 0541 types[HXGA] = i18nc("Video Type: HXGA", "HXGA - 4096x3072 - 4:3"); 0542 types[UHD5K] = i18nc("Video Type: UHD5K", "UHD5K - 5120x2880 - 16:9"); 0543 types[WHXGA] = i18nc("Video Type: WHXGA", "WHXGA - 5120x3200 - 8:5"); 0544 types[HSXGA] = i18nc("Video Type: HSXGA", "HSXGA - 5120x4096 - 5:4"); 0545 types[UHD6K] = i18nc("Video Type: UHD6K", "UHD6K - 6016x3384 - 16:9"); 0546 types[WHSXGA] = i18nc("Video Type: WHSXGA", "WHSXGA - 6400x4096 - 25:16"); 0547 types[HUXGA] = i18nc("Video Type: HUXGA", "HUXGA - 6400x4800 - 4:3"); 0548 types[UHD8K] = i18nc("Video Type: UHD8K", "UHD8K - 7680x4320 - 16:9"); 0549 types[WHUXGA] = i18nc("Video Type: WHUXGA", "WHUXGA - 7680x4800 - 8:5"); 0550 types[UW10K] = i18nc("Video Type: UW10K", "UW10K - 10240x4320 - 21:9"); 0551 types[UW16K] = i18nc("Video Type: UW16K", "UW16K - 15360x8640 - 16:9"); 0552 0553 return types; 0554 } 0555 0556 int VidSlideSettings::videoBitRate() const 0557 { 0558 int b; 0559 0560 switch (vbitRate) 0561 { 0562 case VBR04: 0563 { 0564 b = 400000; 0565 break; 0566 } 0567 0568 case VBR05: 0569 { 0570 b = 500000; 0571 break; 0572 } 0573 0574 case VBR10: 0575 { 0576 b = 1000000; 0577 break; 0578 } 0579 0580 case VBR15: 0581 { 0582 b = 1500000; 0583 break; 0584 } 0585 0586 case VBR20: 0587 { 0588 b = 2000000; 0589 break; 0590 } 0591 0592 case VBR25: 0593 { 0594 b = 2500000; 0595 break; 0596 } 0597 0598 case VBR30: 0599 { 0600 b = 3000000; 0601 break; 0602 } 0603 0604 case VBR40: 0605 { 0606 b = 4000000; 0607 break; 0608 } 0609 0610 case VBR45: 0611 { 0612 b = 4500000; 0613 break; 0614 } 0615 0616 case VBR50: 0617 { 0618 b = 5000000; 0619 break; 0620 } 0621 0622 case VBR60: 0623 { 0624 b = 6000000; 0625 break; 0626 } 0627 0628 case VBR80: 0629 { 0630 b = 8000000; 0631 break; 0632 } 0633 0634 default: // VBR12 0635 { 0636 b = 1200000; 0637 break; 0638 } 0639 } 0640 0641 return b; 0642 } 0643 0644 qreal VidSlideSettings::videoFrameRate() const 0645 { 0646 qreal fr; 0647 0648 switch (vStandard) 0649 { 0650 case NTSC: 0651 { 0652 fr = 29.97; 0653 break; 0654 } 0655 0656 default: // PAL 0657 { 0658 fr = 25.0; 0659 break; 0660 } 0661 } 0662 0663 return fr; 0664 } 0665 0666 QString VidSlideSettings::videoCodec() const 0667 { 0668 QString cod; 0669 0670 switch (vCodec) 0671 { 0672 case MJPEG: 0673 { 0674 cod = QLatin1String("mjpeg"); 0675 break; 0676 } 0677 0678 case MPEG2: 0679 { 0680 cod = QLatin1String("mpeg2video"); 0681 break; 0682 } 0683 0684 case MPEG4: 0685 { 0686 cod = QLatin1String("mpeg4"); 0687 break; 0688 } 0689 0690 case WEBMVP8: 0691 { 0692 cod = QLatin1String("libvpx"); 0693 break; 0694 } 0695 0696 case FLASH: 0697 { 0698 cod = QLatin1String("flv"); 0699 break; 0700 } 0701 0702 case THEORA: 0703 { 0704 cod = QLatin1String("libtheora"); 0705 break; 0706 } 0707 0708 case WMV7: 0709 { 0710 cod = QLatin1String("wm1"); 0711 break; 0712 } 0713 0714 case WMV8: 0715 { 0716 cod = QLatin1String("wm2"); 0717 break; 0718 } 0719 0720 case WMV9: 0721 { 0722 cod = QLatin1String("wm3"); 0723 break; 0724 } 0725 0726 default: // X264 0727 { 0728 cod = QLatin1String("libx264"); 0729 break; 0730 } 0731 } 0732 0733 return cod; 0734 } 0735 0736 QString VidSlideSettings::videoFormat() const 0737 { 0738 QString frm; 0739 0740 switch (vFormat) 0741 { 0742 case AVI: 0743 { 0744 frm = QLatin1String("avi"); 0745 break; 0746 } 0747 0748 case MKV: 0749 { 0750 frm = QLatin1String("mkv"); 0751 break; 0752 } 0753 0754 case MPG: 0755 { 0756 frm = QLatin1String("mpg"); 0757 break; 0758 } 0759 0760 default: // MP4 0761 { 0762 frm = QLatin1String("mp4"); 0763 break; 0764 } 0765 } 0766 0767 return frm; 0768 } 0769 0770 QMap<VidSlideSettings::VidBitRate, QString> VidSlideSettings::videoBitRateNames() 0771 { 0772 QMap<VidBitRate, QString> br; 0773 0774 br[VBR04] = i18nc("Video Bit Rate 400000", "400k"); 0775 br[VBR05] = i18nc("Video Bit Rate 500000", "500k"); 0776 br[VBR10] = i18nc("Video Bit Rate 1000000", "1000k"); 0777 br[VBR12] = i18nc("Video Bit Rate 1200000", "1200k"); 0778 br[VBR15] = i18nc("Video Bit Rate 1500000", "1500k"); 0779 br[VBR20] = i18nc("Video Bit Rate 2000000", "2000k"); 0780 br[VBR25] = i18nc("Video Bit Rate 2500000", "2500k"); 0781 br[VBR30] = i18nc("Video Bit Rate 3000000", "3000k"); 0782 br[VBR40] = i18nc("Video Bit Rate 4000000", "4000k"); 0783 br[VBR45] = i18nc("Video Bit Rate 4500000", "4500k"); 0784 br[VBR50] = i18nc("Video Bit Rate 5000000", "5000k"); 0785 br[VBR60] = i18nc("Video Bit Rate 6000000", "6000k"); 0786 br[VBR80] = i18nc("Video Bit Rate 8000000", "8000k"); 0787 0788 return br; 0789 } 0790 0791 QMap<VidSlideSettings::VidStd, QString> VidSlideSettings::videoStdNames() 0792 { 0793 QMap<VidStd, QString> std; 0794 0795 std[PAL] = i18nc("Video Standard PAL", "PAL - 25 FPS"); 0796 std[NTSC] = i18nc("Video Standard NTSC", "NTSC - 29.97 FPS"); 0797 0798 return std; 0799 } 0800 0801 QMap<VidSlideSettings::VidCodec, QString> VidSlideSettings::videoCodecNames() 0802 { 0803 QMap<VidCodec, QString> codecs; 0804 0805 // NOTE: Some video codecs are currently disabled due to incompatibility 0806 // with bits rate, frames rate, or video sizes. This need some investiguations. 0807 0808 codecs[X264] = i18nc("Video Codec X264", "High Quality H.264 AVC/MPEG-4 AVC"); 0809 codecs[MPEG4] = i18nc("Video Codec MPEG4", "DivX/XVid/MPEG-4"); 0810 codecs[MPEG2] = i18nc("Video Codec MPEG2", "MPEG-2 Video"); 0811 /* 0812 codecs[MJPEG] = i18nc("Video Codec MJPEG", "Motion JPEG"); 0813 codecs[WEBMVP8] = i18nc("Video Codec WEBMVP8", "WebM-VP8"); 0814 codecs[THEORA] = i18nc("Video Codec THEORA", "Theora-VP3"); 0815 codecs[FLASH] = i18nc("Video Codec FLASH", "Flash Video/Sorenson H.263"); 0816 codecs[WMV7] = i18nc("Video Codec WMV7", "Window Media Video 7"); 0817 codecs[WMV8] = i18nc("Video Codec WMV8", "Window Media Video 8"); 0818 codecs[WMV9] = i18nc("Video Codec WMV9", "Window Media Video 9"); 0819 */ 0820 return codecs; 0821 } 0822 0823 QMap<VidSlideSettings::VidFormat, QString> VidSlideSettings::videoFormatNames() 0824 { 0825 QMap<VidFormat, QString> frm; 0826 0827 frm[AVI] = i18nc("Video Standard AVI", "AVI - Audio Video Interleave"); 0828 frm[MKV] = i18nc("Video Standard MKV", "MKV - Matroska"); 0829 frm[MP4] = i18nc("Video Standard MP4", "MP4 - MPEG-4"); 0830 frm[MPG] = i18nc("Video Standard MPG", "MPG - MPEG-2"); 0831 0832 return frm; 0833 } 0834 0835 QMap<VidSlideSettings::VidPlayer, QString> VidSlideSettings::videoPlayerNames() 0836 { 0837 QMap<VidPlayer, QString> pla; 0838 0839 pla[NOPLAYER] = i18nc("Video Effect NOPLAYER", "None"); 0840 pla[INTERNAL] = i18nc("Video Standard INTERNAL", "Internal"); 0841 pla[DESKTOP] = i18nc("Video Standard DESKTOP", "Default from Desktop"); 0842 0843 return pla; 0844 } 0845 0846 QStringList VidSlideSettings::defaultFFmpegSearchPaths() const 0847 { 0848 QStringList defPaths; 0849 0850 #ifdef Q_OS_MACOS 0851 0852 defPaths << QLatin1String("/usr/local/bin"); 0853 0854 // digiKam Bundle PKG install path 0855 defPaths << macOSBundlePrefix() + QLatin1String("bin"); 0856 0857 // Std Macports install path 0858 defPaths << QLatin1String("/opt/local/bin"); 0859 0860 #endif 0861 0862 #ifdef Q_OS_WIN 0863 0864 defPaths << QLatin1String("C:/Program Files/digiKam"); 0865 0866 #endif 0867 0868 #ifdef Q_OS_UNIX 0869 0870 defPaths << QLatin1String("/usr/bin"); 0871 defPaths << QLatin1String("/usr/local/bin"); 0872 defPaths << QLatin1String("/bin"); 0873 0874 #endif 0875 0876 return defPaths; 0877 } 0878 0879 } // namespace Digikam