mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-25 09:22:22 +00:00
Added ffmpeg progress bar via fluent-ffmpeg and progress libs (#57)
* Add fluent-ffmpeg back and cross-platform progress bar * Repo clean up Move ts files to src, build and output js files to build folder * Do not print messages when exit code is 0 this is triggered by signal events Co-authored-by: kylon <kylonux@gmail.com>
This commit is contained in:
14
src/Thumbnail.ts
Normal file
14
src/Thumbnail.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import terminalImage from 'terminal-image';
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
export async function drawThumbnail(posterImage: string, accessToken: string) {
|
||||
let thumbnail = await axios.get(posterImage,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`
|
||||
},
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
console.log(await terminalImage.buffer(thumbnail.data));
|
||||
}
|
||||
Reference in New Issue
Block a user