I'm using a tool called Remotion, which allows you to create videos using javascript (node & react). I have the server-side rendering process working, unless I try to include an mp3. Per their docs, I have my audio imported like this:
import goodtimes from '../../music/GoodTimes.mp3';
...
<Audio src={goodtimes} />
I'm currently trying to troubleshoot this using the CLI, because the error messaging is better. The command runs, and seems to generate the full video – 2400 out of 2400 frames. But then it fails with this output:
(2/3) [====================] Rendered frames (6x) 176540ms
+ [====================] Downloading http://localhost:3000/1ba90857580e6291.mp3
(3/3) [====================] Encoding video 2400/2400
An error occurred:
Error: Command failed with exit code 1: ffprobe -v error -show_entries stream=channels:format=duration -of default=nw=1 /var/folders/6n/_nfb38t53dgdj092_pcnqqmw0000gn/T/remotion-assets-dir2jc2oppruh/7744374580215663.mp3
[mp3 @ 0x7fa78152ec40] Failed to read frame size: Could not seek to 5244.
/var/folders/6n/_nfb38t53dgdj092_pcnqqmw0000gn/T/remotion-assets-dir2jc2oppruh/7744374580215663.mp3: Invalid argument
at makeError (/Users/voverson/clm-video/server/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/voverson/clm-video/server/node_modules/execa/index.js:118:26)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async getAudioChannelsAndDuration (/Users/voverson/clm-video/server/node_modules/@remotion/renderer/dist/assets/get-audio-channels.js:17:18)
at async preprocessAudioTrackUnlimited (/Users/voverson/clm-video/server/node_modules/@remotion/renderer/dist/preprocess-audio-track.js:14:36)
I'm hoping some ffmpeg experts might recognize this error and have some idea what might be causing it.