mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
add generate string method
This commit is contained in:
@@ -10,19 +10,12 @@ export class VideoconvertService {
|
||||
private ffmpeg: FFMpeg
|
||||
) { }
|
||||
|
||||
async convertVideo(inputPath, outputPath, formart) {
|
||||
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}output.${formart}"`;
|
||||
async convertVideo(inputPath, outputPath,filename, formart) {
|
||||
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}${filename}.${formart}"`;
|
||||
|
||||
const result = await this.ffmpeg.exec(ffmpegCommand)
|
||||
|
||||
console.log('Convert returns ', `${outputPath}output.${formart}`);
|
||||
console.log('Convert returns ', `${outputPath}${filename}.${formart}`);
|
||||
}
|
||||
|
||||
async convertVideoAndroid(inputPath, outputPath, formart) {
|
||||
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}/output.${formart}"`;
|
||||
|
||||
const result = await this.ffmpeg.exec(ffmpegCommand)
|
||||
|
||||
console.log('Convert returns ', `${outputPath}output.${formart}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user