zachHallway
zachHallway
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
Add this tofix
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
[phases.setup]
nixPkgs = ['...', 'ffmpeg']
[phases.setup]
nixPkgs = ['...', 'ffmpeg']
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
Thought that the railway.json with the apt-get would work, since it was installing in the docker image.
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
Dang its fixed when adding a nixpacks.toml
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
export function videoToFrames(
inputFilePath: string,
outputFilePath: string,
options: GetFrameOptions,
): Promise<void> {
const { fps = 1, resolution = "512x512" } = options;

return new Promise((resolve, reject) => {
ffmpeg(inputFilePath)
.outputOptions(`-r ${fps}`)
.outputOptions(`-s ${resolution}`)
// .outputOptions("-c:v libwebp") // Specify the WebP codec
.on("end", () => {
resolve();
})
.on("error", (err) => {
reject(err);
})
.output(`${outputFilePath}/frame_%d.jpeg`) // Specify the output file
.run();
});
}
export function videoToFrames(
inputFilePath: string,
outputFilePath: string,
options: GetFrameOptions,
): Promise<void> {
const { fps = 1, resolution = "512x512" } = options;

return new Promise((resolve, reject) => {
ffmpeg(inputFilePath)
.outputOptions(`-r ${fps}`)
.outputOptions(`-s ${resolution}`)
// .outputOptions("-c:v libwebp") // Specify the WebP codec
.on("end", () => {
resolve();
})
.on("error", (err) => {
reject(err);
})
.output(`${outputFilePath}/frame_%d.jpeg`) // Specify the output file
.run();
});
}
Problematic function is here, no crash when there is no output command. Works fine locally in development mode. output file path is path.join(env.RAILWAY_VOLUME_MOUNT_PATH, DATE_SLUG, VIDEO_FILE_NAME)
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
using execSync("which ffmpeg", { encoding: "utf-8" }).trim();
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
Verified that the paths do exist for FFMPEG FFmpeg path: /bin/ffmpeg FFmpeg probe: /bin/ffprobe
11 replies
RRailway
Created by zachHallway on 1/11/2024 in #✋|help
Error: ffmpeg exited with code 1
3f47026d-e5d4-4f7d-8505-9c3c3185adf2
11 replies