i fucking hate youtube

youtube-related changes:
- fixed silly mistake that made all shorts download in default format instead of preferred one
- made youtube module return full video (audio + video) if it's available and matches selected quality (usually 720p)
- changed the order of streams in video render (now video is first)

other changes:
- hopefully fixed zoom in on input in safari
- moved match module from sub to main modules directory
This commit is contained in:
wukko
2022-07-10 19:30:42 +06:00
parent ec105fb333
commit 9081f790ff
7 changed files with 46 additions and 46 deletions

View File

@@ -40,8 +40,8 @@ export async function streamLiveRender(streamInfo, res) {
'-loglevel', '-8',
'-i', 'pipe:3',
'-i', 'pipe:4',
'-map', '0:a',
'-map', '1:v',
'-map', '0:v',
'-map', '1:a',
'-c:v', 'copy',
'-c:a', 'copy',
];
@@ -75,11 +75,11 @@ export async function streamLiveRender(streamInfo, res) {
});
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename}"`);
ffmpegProcess.stdio[5].pipe(res);
audio.pipe(ffmpegProcess.stdio[3]).on('error', (err) => {
video.pipe(ffmpegProcess.stdio[3]).on('error', (err) => {
ffmpegProcess.kill();
internalError(res);
});
video.pipe(ffmpegProcess.stdio[4]).on('error', (err) => {
audio.pipe(ffmpegProcess.stdio[4]).on('error', (err) => {
ffmpegProcess.kill();
internalError(res);
});