FFmpeg returned an error: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
See original GitHub issueOS: 10.15.7 Catalina (MacOS)
Launch command used: ./destreamer.sh -i “https://web.microsoftstream.com/video/VIDEO-1”
I am an elementary school teacher with enough tech savvy to follow instructions and copy-paste things into Terminal. (lol)
I’m trying to download a large (3h30m) video from MS Stream that our district shared for our last Pro-D day: I showed part of it (1h30m) to my class and a student has asked if I could post it in Teams. I only want to post the relevant section, and I thought finding a way to download it would be quicker than screen recording it… ha!
I got as far as reinstalling a newer version of ffmpeg but I don’t know what to do with this latest error. I searched previous issues and found the same error code in a closed/resolved issue but it was for Linux, not Mac. So now I am stuck.
Hoping there is an easy fix so I don’t have to screen record a 1h30m video this weekend!
Here’s what I get when I try to download the video:
Downloading Video: Indigenous Education Focus Day Nov 27th
Spawning ffmpeg with access token and HLS URL. This may take a few seconds…
Then it shows me a pixely image of the video’s title image, and then
progress [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 0 0s
[ERROR] FFmpeg returned an error: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[FATAL ERROR] Unknown FFmpeg error
I don’t know where to go from here.
Verbose log
PASTE VERBOSE LOG HERE
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (3 by maintainers)
Top Related StackOverflow Question
@pistachoo, looking at your verbose output, i see you’re running a ffmpeg binary from 2015. That’s not going to work for destreamer.
Not sure how you ended up with that from brew, so maybe remove it and just download a fresh binary somewhere in your $PATH or tinker with your brew installation to get you the current ffmpeg version (4.3.1).
You can find static ffmpeg MacOS binaries here - https://evermeet.cx/ffmpeg/
Nice catch!
Further discussion moving there