@@ -3,37 +3,38 @@ const console = require('./console');
33const rootDir = path . join ( __dirname , '..' ) ;
44const OS = process . platform ;
55const BIT = process . arch ;
6- if ( ! ( BIT === 'x32' || BIT === 'x64' ) ) error ( 'CPU architecture not supported' ) ;
6+ if ( ! ( BIT === 'x32' || BIT === 'x64' ) ) console . error ( 'CPU architecture not supported' ) ;
77const allOS = {
88 linux : {
99 x32 : {
1010 url : 'https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz' ,
11+ dir : rootDir + '/ffmpeg/ffmpeg-4.3.1-amd64-static' ,
1112 path : rootDir + '/ffmpeg/linuxx32/ffmpeg'
1213 } ,
1314 x64 : {
1415 url : 'https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz' ,
16+ dir : rootDir + '/ffmpeg/ffmpeg-4.3.1-i686-static' ,
1517 path : rootDir + '/ffmpeg/linuxx64/ffmpeg'
1618 }
1719 } ,
1820 darwin : {
1921 x64 : {
20- url : 'https://ffmpeg.zeranoe.com/builds/macos64/static/ffmpeg-4.2.2-macos64-static.zip' ,
21- path : rootDir + '/ffmpeg/darwinx64/bin/ffmpeg'
22+ url : 'https://evermeet.cx/ffmpeg/ffmpeg-4.3.1.zip' ,
23+ file : rootDir + '/ffmpeg/ffmpeg' ,
24+ path : rootDir + '/ffmpeg/darwinx64/ffmpeg'
2225 }
2326 } ,
2427 win32 : {
25- x32 : {
26- url : 'https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.zip' ,
27- path : rootDir + '/ffmpeg/win32x32/bin/ffmpeg.exe'
28- } ,
2928 x64 : {
30- url : 'https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip' ,
29+ url : 'https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2020-09-26-14-24/ffmpeg-n4.3.1-18-g6d886b6586-win64-gpl-4.3.zip' ,
30+ dir : rootDir + '/ffmpeg/ffmpeg-n4.3.1-18-g6d886b6586-win64-gpl-4.3' ,
3131 path : rootDir + '/ffmpeg/win32x64/bin/ffmpeg.exe'
3232 }
3333 }
3434}
35- if ( allOS [ OS ] === undefined ) console . error ( 'OS not supporteds!' ) ;
36- if ( allOS [ OS ] [ BIT ] === undefined ) console . error ( 'Invalid OS and CPU architecture!' ) ;
35+ if ( ! allOS [ OS ] ) console . error ( 'OS not supporteds!' ) ;
36+ if ( ! allOS [ OS ] [ BIT ] ) console . error ( 'Invalid OS and CPU architecture!' ) ;
37+
3738module . exports = Object . assign ( { } , allOS [ OS ] [ BIT ] ) ;
3839module . exports . typePath = path . normalize ( rootDir + '/ffmpeg/' + OS + BIT ) ;
3940module . exports . zipPath = path . normalize ( rootDir + '/ffmpeg/' + module . exports . url . substring ( module . exports . url . lastIndexOf ( '/' ) + 1 ) ) ;
0 commit comments