Guest User

Local_router_qsv_vaapi_vs_nvenc.js

a guest
Sep 4th, 2025
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. // Route: Output 1 = iGPU (QSV/VAAPI), Output 2 = NVIDIA (NVENC)
  2. module.exports.details = () => ({
  3. id: 'Local_router_qsv_vaapi_vs_nvenc',
  4. Name: 'Router: iGPU (QSV/VAAPI) vs NVIDIA (NVENC)',
  5. Operation: 'Filter', // <- wichtig: Filter = 2 Ausgänge im Flow
  6. Description: 'Routet anhand nodeHardwareType: qsv/vaapi -> Output 1, nvenc -> Output 2.',
  7. Version: '1.0',
  8. Stage: 'Pre-processing',
  9. Type: 'Any'
  10. });
  11.  
  12. module.exports.plugin = (file, librarySettings, inputs, otherArguments) => {
  13. const hw = (otherArguments && otherArguments.nodeHardwareType || '').toLowerCase();
  14. const isIGPU = (hw === 'qsv' || hw === 'vaapi'); // iGPU-Seite
  15. // Classic-Filter-Plugins entscheiden mit processFile true/false:
  16. // true -> "met conditions" (Flow Output 1)
  17. // false -> "did not meet" (Flow Output 2)
  18. return {
  19. processFile: isIGPU,
  20. preset: '', // Pflichtfelder im Response-Objekt vorhanden lassen
  21. container: `.${file.container || 'mkv'}`,
  22. handBrakeMode: false,
  23. FFmpegMode: false,
  24. infoLog: `Router: nodeHardwareType=${hw} -> ${isIGPU ? 'iGPU(Output 1)' : 'NVENC(Output 2)'}`
  25. };
  26. };
  27.  
Advertisement
Add Comment
Please, Sign In to add comment