ffmpeg exited with code 1

See original GitHub issue

I’m getting errors on some videos that I can’t figure out why or how to solve. I always get the error on some videos like 2ky7V-jMcZI

here’s my code:

const YD = new YoutubeMp3Downloader({
      ffmpegPath: 'ffmpeg',
      outputPath: 'temp/audio',
      youtubeVideoQuality: 'highestaudio',
      queueParallelism: 1,
      progressTimeout: 2000,
      allowWebm: true,
    });

    YD.download('2ky7V-jMcZI', 'test.mp3');

    YD.on('finished', async (error, data) => {
      console.log(!error ? 'success' : error);
    });

    YD.on('error', error => console.log(error));

here’s the output:

ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream 
#0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DaliuSingercommented, Jul 6, 2022

I am also getting the same error “ffmpeg exited with code 1: pipe:0: Invalid data found when processing input”, on longer videos, something 15mins or longer, works ok on under 10mins long videos. So I assume, the issue is not fixed… Current version 0.7.10. I noticed that downloader over jumps 100% complete mark, not sure how to fix it.

0reactions
eladcandroidcommented, Dec 28, 2022

@DaliuSinger Did you find something?

Read more comments on GitHub >

github_iconTop Results From Across the Web

FFMPEG exited with Error code 1 · Issue #213 - GitHub
So your issue is the FFmpeg output "No such file or directory", that's what is causing the code 1 exit. Unfortunately FFmpeg output...
Read more >
ERROR: ffmpeg exited with code 1 - Reddit
ffmpeg process crashing on connect / disconnect of the stream and need a way to run multiple stream at the sametime.
Read more >
ffmpeg unexpected exit code 1 for -list_devices and -list_options
Exit code 1 while listing devices with dshow is the expected output since the code goes for an immediate exit in this case...
Read more >
8698 (ERROR: ffmpeg exited with code 3221225477)
WARNING: Failed to download DASH_HBBTV MPD manifest: HTTP Error 404: Not Found ... built with gcc 9.3.1 (GCC) 20200523
Read more >
FFMPEG Error: Failed Error=1 - Daktronics
FFMPEG Error: Failed Error=1 ; Environment. FFMPEG Converter ; Cause. File has a width or height that is an uneven number ; Resolution....
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