@@ -131,63 +131,6 @@ async function win32() {
131
131
}
132
132
133
133
async function linux ( ) {
134
- console . log ( 'Checking/downloading ffmpeg shared libraries' ) ;
135
-
136
- await mkdir ( 'ffmpeg' ) . catch ( e => {
137
- if ( e . code === 'EEXIST' ) return ;
138
- else throw e ;
139
- } ) ;
140
-
141
- const version = '1.49.rc.1' ;
142
-
143
- // default to platform-architecture
144
- let arch = os . arch ( ) ;
145
-
146
- // but if the '--arch' argument is provided
147
- // use the next argument as the value (e.g. 'x64' or 'arm64')
148
- const overrideArchIndex = process . argv . indexOf ( '--arch' ) ;
149
- if ( 0 < overrideArchIndex && overrideArchIndex < process . argv . length - 1 ) {
150
- arch = process . argv [ overrideArchIndex + 1 ] ;
151
- }
152
-
153
- if ( arch === 'x64' ) {
154
- arch = 'x86_64' ;
155
- }
156
-
157
- const ffmpegFilename = `ffmpeg-ffprobe-shared-linux-${ arch } .${ version } ` ;
158
- const tag = `v${ version } ` ;
159
-
160
- await access ( `ffmpeg/${ ffmpegFilename } ` , fs . constants . R_OK ) . catch ( async ( ) => {
161
- const ws = fs . createWriteStream ( `ffmpeg/${ ffmpegFilename } .tar.gz` ) ;
162
- const url = `https://github.com/descriptinc/ffmpeg-build-script/releases/download/${ tag } /${ ffmpegFilename } .tar.gz`
163
- console . log ( url ) ;
164
- await get (
165
- ws ,
166
- url ,
167
- `${ ffmpegFilename } .tar.gz`
168
- ) . catch ( async ( err ) => {
169
- if ( err . name === 'RedirectError' ) {
170
- const redirectURL = err . message ;
171
- await get ( ws , redirectURL , `${ ffmpegFilename } .tar.gz` ) ;
172
- } else {
173
- console . error ( err ) ;
174
- throw err ;
175
- }
176
- } ) ;
177
-
178
- await mkdir ( `ffmpeg/${ ffmpegFilename } ` ) . catch ( e => {
179
- if ( e . code === 'EEXIST' ) return ;
180
- else throw e ;
181
- } ) ;
182
-
183
- await exec ( `tar xvzf ffmpeg/${ ffmpegFilename } .tar.gz -C ffmpeg/${ ffmpegFilename } /` ) ;
184
-
185
- console . log ( `Adding path "$PWD/ffmpeg/${ ffmpegFilename } /" to ldconfig path` ) ;
186
- await exec ( `echo "$PWD/ffmpeg/${ ffmpegFilename } /" | tee -a /etc/ld.so.conf.d/ffmpeg.conf` )
187
- console . log ( 'Running LDCONFIG' ) ;
188
- await exec ( `ldconfig` )
189
- } ) ;
190
-
191
134
console . log ( 'Checking FFmpeg dependencies for Beam Coder on Linux.' ) ;
192
135
const { stdout } = await execFile ( 'ldconfig' , [ '-p' ] ) . catch ( console . error ) ;
193
136
let result = 0 ;
@@ -231,8 +174,7 @@ async function linux() {
231
174
232
175
if ( result === 1 ) {
233
176
console . log ( `Try running the following (Ubuntu/Debian):
234
- sudo add-apt-repository ppa:savoury1/ffmpeg4
235
- sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev libzimg-dev` ) ;
177
+ sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev libzimg-dev` ) ;
236
178
process . exit ( 1 ) ;
237
179
}
238
180
return result ;
0 commit comments