ffmpeg Installed With MacPorts Fails After Catalina Update

Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I use ffmpeg daily to make time-laps videos from a series of JEPGs.

This has been working fine for years.

You can see a sample here: Cha Am Time-Lapse Video

However, after updating my machine to Catalina and updating MacPorts to the Catalina version, ffmpeg now fails:

Code:
./skyvideo.sh: line 38: 33940 Broken pipe: 13         cat $ipath
     33941 Segmentation fault: 11  | /opt/local/bin/ffmpeg -f image2pipe -framerate 10 -vcodec mjpeg -i - -vcodec libx264 -preset veryslow -hide_banner -loglevel panic -r 10 -crf 28 -y -pix_fmt yuv420p "$vfile" >> "$log"

I'm hoping that someone smarter than I can help me figure out what's wrong here.
 
Joined
Jan 1, 2009
Messages
15,452
Reaction score
3,808
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Just a mention that Apple changed from Bash to zsh as the shell in Terminal with Catalina. Don't know if that makes a difference to your script, but you ought to know.
 
OP
R
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
Just a mention that Apple changed from Bash to zsh as the shell in Terminal with Catalina. Don't know if that makes a difference to your script, but you ought to know.

Yeah, I'm reminded of that every time I open a new shell.

Code:
Last login: Fri Dec 13 06:58:33 on ttys001
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

But, my scripts all have the following shebang line, so they should run fine under bash:

Code:
#!/bin/bash

All my other scripts are working fine; it's just ffmpeg on the iMac that's failing.

And, I seem to still have bash as the default shell:

Code:
MrMuscle:bin mnewman$ echo $SHELL
/bin/bash[B][/B]
 
Joined
Jan 1, 2009
Messages
15,452
Reaction score
3,808
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
I'm not an expert, but I did go ahead and do the chsh command to change to zsh on my MBP with Catalina. ffmpeg that I have with an app to download video files that runs just fine to convert video. I don't know much about ffmpeg either, it is incorporated into the app folder and runs after a download is complete. So it's not a fundamental issue with Catalina and ffmpeg. Could it be that ffmpeg has an update that your application hasn't incorporated?
 
OP
R
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I'm not an expert, but I did go ahead and do the chsh command to change to zsh on my MBP with Catalina. ffmpeg that I have with an app to download video files that runs just fine to convert video. I don't know much about ffmpeg either, it is incorporated into the app folder and runs after a download is complete. So it's not a fundamental issue with Catalina and ffmpeg. Could it be that ffmpeg has an update that your application hasn't incorporated?

I'm not ready for zsh. A future project.

I just recompiled ffmpeg from source, so I'm sure it's the latest version; at least the latest offered by MacPorts. Still no joy.

I did get the time-lapse working using avconv instead of ffmpeg. avconv is a fork of ffmpeg, so moving there wasn't too hard.
 
OP
R
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
After spending a huge amount of time with this I've found the following:

These work. They were both installed using brew:

Code:
/usr/local/bin/avconv -y -r 10 -i $inpath -r 10 -vcodec libx264 -q:v 3 $vfile;

/usr/local/bin/ffmpeg -y -r 10 -i $inpath -r 10 -vcodec libx264 -q:v 3 $vfile;

This doesn’t. It was installed using MacPorts:

Code:
/opt/local/bin/ffmpeg -y -r 10 -i $inpath -r 10 -vcodec libx264 -q:v 3 $vfile;

Both ffmpegs are version 4.2.1

It seems to be a MacPorts issue.

(Note that I simplified the commands and made them identical in all cases to equalize conditions for all cases. inpath is the location of the JPEG files. vfile is the time-lapse video.)
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Do the following
Code:
file /usr/local/bin/avconv
file /usr/local/bin/ffmpeg
file /opt/local/bin/ffmpeg

and tell us what it says.

A 'segmentation fault' means that the code is doing something bad.
 
OP
R
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
Code:
MrMuscle:bin mnewman$ file /usr/local/bin/avconv
/usr/local/bin/avconv: Mach-O 64-bit executable x86_64
MrMuscle:bin mnewman$ file /usr/local/bin/ffmpeg
/usr/local/bin/ffmpeg: Mach-O 64-bit executable x86_64
MrMuscle:bin mnewman$ file /opt/local/bin/ffmpeg
/opt/local/bin/ffmpeg: Mach-O 64-bit executable x86_64

As expected as these were all built recently.

MacOS Crash Report - PasteBin
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top