forked from Toxic1239/Queen-RiasV2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconverter.js
1 lines (1 loc) · 2.92 KB
/
converter.js
1
const _0x3c1216=_0x48db;(function(_0x539775,_0x390773){const _0x12908a=_0x48db,_0x21dd73=_0x539775();while(!![]){try{const _0xa2b150=parseInt(_0x12908a(0x11b))/0x1*(parseInt(_0x12908a(0x11a))/0x2)+-parseInt(_0x12908a(0x11e))/0x3+parseInt(_0x12908a(0x11f))/0x4*(-parseInt(_0x12908a(0x10a))/0x5)+-parseInt(_0x12908a(0x10b))/0x6*(parseInt(_0x12908a(0x119))/0x7)+parseInt(_0x12908a(0x11d))/0x8*(-parseInt(_0x12908a(0x11c))/0x9)+parseInt(_0x12908a(0x125))/0xa+parseInt(_0x12908a(0x113))/0xb;if(_0xa2b150===_0x390773)break;else _0x21dd73['push'](_0x21dd73['shift']());}catch(_0xcae774){_0x21dd73['push'](_0x21dd73['shift']());}}}(_0xfed2,0x836db));function _0xfed2(){const _0x50df3a=['writeFile','28930253iJTKvF','-preset','aac','-b:a','ffmpeg','promises','491099hHIUVa','29406HUpTuf','52tXWIVv','2205rXgLbu','33544qAaibn','1565892BXPXVs','205340KZDLAA','-vn','opus','-vbr','readFile','join','2398840wiDiqh','-c:a','-crf','error','55tquppv','84qDfRlp','-ab','mp4','../tmp','exports','unlink','path'];_0xfed2=function(){return _0x50df3a;};return _0xfed2();}const fs=require('fs'),path=require(_0x3c1216(0x111)),{spawn}=require('child_process');function _0x48db(_0x576e7a,_0x4e203d){const _0xfed202=_0xfed2();return _0x48db=function(_0x48db4d,_0x15ac83){_0x48db4d=_0x48db4d-0x107;let _0x413842=_0xfed202[_0x48db4d];return _0x413842;},_0x48db(_0x576e7a,_0x4e203d);}function ffmpeg(_0x1eb648,_0x750184=[],_0x4998f6='',_0x16a687=''){return new Promise(async(_0x3c4574,_0xaccbc)=>{const _0x28473c=_0x48db;try{let _0x48e92f=path[_0x28473c(0x124)](__dirname,_0x28473c(0x10e),+new Date()+'.'+_0x4998f6),_0x2569e9=_0x48e92f+'.'+_0x16a687;await fs[_0x28473c(0x118)][_0x28473c(0x112)](_0x48e92f,_0x1eb648),spawn(_0x28473c(0x117),['-y','-i',_0x48e92f,..._0x750184,_0x2569e9])['on'](_0x28473c(0x109),_0xaccbc)['on']('close',async _0x26ff46=>{const _0x28cc71=_0x28473c;try{await fs[_0x28cc71(0x118)][_0x28cc71(0x110)](_0x48e92f);if(_0x26ff46!==0x0)return _0xaccbc(_0x26ff46);_0x3c4574({'data':await fs[_0x28cc71(0x118)][_0x28cc71(0x123)](_0x2569e9),'filename':_0x2569e9,'delete'(){const _0x3a99be=_0x28cc71;return fs[_0x3a99be(0x118)][_0x3a99be(0x110)](_0x2569e9);}});}catch(_0x5ab559){_0xaccbc(_0x5ab559);}});}catch(_0x7dbd41){_0xaccbc(_0x7dbd41);}});}function toPTT(_0x2bffea,_0x5eefe4){const _0xa8d210=_0x3c1216;return ffmpeg(_0x2bffea,[_0xa8d210(0x120),'-c:a','libopus',_0xa8d210(0x116),'128k',_0xa8d210(0x122),'on'],_0x5eefe4,'ogg');}function toAudio(_0x3d28bc,_0x39b8f7){const _0x2222a4=_0x3c1216;return ffmpeg(_0x3d28bc,[_0x2222a4(0x120),_0x2222a4(0x107),'libopus','-b:a','128k',_0x2222a4(0x122),'on','-compression_level','10'],_0x39b8f7,_0x2222a4(0x121));}function toVideo(_0x1617bc,_0x3606f0){const _0x5e8a43=_0x3c1216;return ffmpeg(_0x1617bc,['-c:v','libx264',_0x5e8a43(0x107),_0x5e8a43(0x115),_0x5e8a43(0x10c),'128k','-ar','44100',_0x5e8a43(0x108),'32',_0x5e8a43(0x114),'slow'],_0x3606f0,_0x5e8a43(0x10d));}module[_0x3c1216(0x10f)]={'toAudio':toAudio,'toPTT':toPTT,'toVideo':toVideo,'ffmpeg':ffmpeg};