question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using audioonly filter slows down download tremendously

See original GitHub issue

When downloading a video and converting to mp3 with ffmpeg, using filter: 'audioonly' in the options slows down speeds by magnitudes; ~72 seconds with filter, ~8 with no options, also ~8 with quality: 'highestaudio' (seems weird considering highestaudio requests just audio, like the filter).

This is tested using a 4:13 video on my gigabit ethernet.

code used:

const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');

let id = 'sDLsSQf3Hc0';
let start = Date.now();
let stream = ytdl(id, { quality: 'highestaudio'/*, filter: 'audioonly' */}); // mess around with quality, filter, and nothing at all being used

ffmpeg(stream)
	.on('end', () => {console.log('done, thanks - ' + (Date.now() - start) / 1000 + 's')})
	.audioBitrate(128)
	.save(`${__dirname}/${id}-${(Math.random() * 100000).toFixed(0)}.mp3`); // very efficient naming system here

This doesn’t really affect me because I can just use quality: 'highestaudio', but it does seem like a weird effect.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
corwin-of-ambercommented, Jun 20, 2020

I looked into it a little bit more, and it seems that adding a Range header, e.g.

fetch(u, {headers: {Range: 'bytes=0-10380331'}})

(here, using node-fetch) improves download speed dramatically.

3reactions
weltonrodrigocommented, Apr 6, 2020

Hi, I suppose you investigated this, but youtube-dl doesn’t seem to suffer from rate limiting. I think you can copy its behaviour in ytdl-core.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Deal With Slow Filter Forge Filters - YouTube
Download Filter Forge https://goo.gl/n8pHKTInstructions how to use Adobe Photoshop actions to generate slow Filter Forge filters without to ...
Read more >
video playback audio is slow when sped up and then...
When I uploaded a video to my dropbox acct and shared a link to view, I got a report back that tha video...
Read more >
Will additional devices slow down the internet connection?
Multiple devices connected with your Internet connection may slow down internet speed.Know how to get a good wifi broadband connection that constant in...
Read more >
improve audio quality of video online
Convert your audio file to MP3 in high quality with this free online MP3 converter. ... Software rendering is slower, but useful for...
Read more >
The Best Voice Recorders for Lectures, Interviews and Meetings
Portable voice recorders are enormously helpful tools in many ... It records in MP3 audio; these files are compressed and require less ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found