mifi/editly

Error: write EPIPE

0xjones opened this issue · 1 comments

  • I have tried with the newest version of editly: npm i -g editly or npm i editly@latest
  • I have tried ffmpeg newest stable version
  • I have searched for existing issues

Getting an error when trying to run editly from my es6 script. I am running on Windows 10, Node v20.11.0, npm v10.3.0.

Here's the error output I get at the termination of the script (after console logs from my own script). I've enabled ffmpeg logging and verbose in editly after looking at other issues.

{ tmpDir: 'video\editly-tmp-vaDQXaiYR5cHQrrP9_u41' }
Extracting audio/silence from all clips
create silence 59
Mixing clip audio with arbitrary audio
-stream_loop 0 -i C:\Users\ethan\Desktop\Code\best-reddit-moments\video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\clip0-audio.flac -stream_loop 0 -i ./assets/music-upbeat.mp3 -stream_loop 0 -i ./audio/195ydoi/0/0.mp3 -stream_loop 0 -i ./audio/195ydoi/0/1.mp3 -stream_loop 0 -i ./audio/195ydoi/1/0.mp3 -stream_loop 0 -i ./audio/195ydoi/1/1.mp3 -stream_loop 0 -i ./audio/195ydoi/1/2.mp3 -stream_loop 0 -i ./audio/195ydoi/1/3.mp3 -stream_loop 0 -i ./audio/195ydoi/1/4.mp3 -stream_loop 0 -i ./audio/195ydoi/2/0.mp3 -stream_loop 0 -i ./audio/195ydoi/2/1.mp3 -stream_loop 0 -i ./audio/195ydoi/3/0.mp3 -stream_loop 0 -i ./audio/195ydoi/3/1.mp3 -stream_loop 0 -i ./audio/195ydoi/4/0.mp3 -stream_loop 0 -i ./audio/195ydoi/5/0.mp3 -filter_complex [0]atrim=start=0,adelay=delays=0:all=1[a0];[1]atrim=start=0,adelay=delays=0:all=1,apad[a1];[2]atrim=start=0,adelay=delays=0:all=1,apad[a2];[3]atrim=start=0,adelay=delays=2308:all=1,apad[a3];[4]atrim=start=0,adelay=delays=4104:all=1,apad[a4];[5]atrim=start=0,adelay=delays=10324:all=1,apad[a5];[6]atrim=start=0,adelay=delays=16232:all=1,apad[a6];[7]atrim=start=0,adelay=delays=21180:all=1,apad[a7];[8]atrim=start=0,adelay=delays=26176:all=1,apad[a8];[9]atrim=start=0,adelay=delays=28164:all=1,apad[a9];[10]atrim=start=0,adelay=delays=33280:all=1,apad[a10];[11]atrim=start=0,adelay=delays=36636:all=1,apad[a11];[12]atrim=start=0,adelay=delays=42184:all=1,apad[a12];[13]atrim=start=0,adelay=delays=45324:all=1,apad[a13];[14]atrim=start=0,adelay=delays=51536:all=1,apad[a14];[a0][a1][a2][a3][a4][a5][a6][a7][a8][a9][a10][a11][a12][a13][a14]amix=inputs=15:duration=first:dropout_transition=0:weights=1 0.2 1 1 1 1 1 1 1 1 1 1 1 1 1,volume=24dB -c:a flac -y video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac
720x1280 25fps
ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 720x1280 -r 25/1 -i - -i video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac -map 0:v:0 -map 1:a:0 -acodec aac -b:a 128k -vf format=yuv420p -vcodec libx264 -profile:v
high -preset:v medium -crf 18 -movflags faststart -y ./video/What common product has a feature you’re not sure everyone is aware of?.mp4
createFrameSource video clip 0 layer 0
scale=720:1280
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl
--enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
-i ./assets/bg1.mp4 -t 59 -vf fps=25/1,scale=720:1280 -map v:0 -vcodec rawvideo -pix_fmt rgba -f image2pipe -
createFrameSource image clip 0 layer 1
Loading ./assets/bg-title.png
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl
--enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Blurring background
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './assets/bg1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Duration: 00:01:00.14, start: 0.000000, bitrate: 369 kb/s
Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 720x1280 [SAR 1:1 DAR 9:16], 360 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
vendor_id : [0][0][0][0]
Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, image2pipe, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf60.16.100
Stream #0:0(und): Video: rawvideo (RGBA / 0x41424752), rgba(pc, gbr/unknown/unknown, progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 737280 kb/s, 25 fps, 25 tbn (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
vendor_id : [0][0][0][0]
encoder : Lavc60.31.102 rawvideo
createFrameSource image clip 0 layer 20kB time=N/A bitrate=N/A speed=N/A
Loading ./assets/bg.png
Blurring background
createFrameSource image clip 0 layer 3
Loading ./assets/end-screen.png
Blurring background
createFrameSource fabric clip 0 layer 4
createFrameSource fabric clip 0 layer 5
createFrameSource fabric clip 0 layer 6
createFrameSource fabric clip 0 layer 7
createFrameSource fabric clip 0 layer 8
createFrameSource fabric clip 0 layer 9
createFrameSource fabric clip 0 layer 10
createFrameSource fabric clip 0 layer 11
createFrameSource fabric clip 0 layer 12
createFrameSource fabric clip 0 layer 13
createFrameSource fabric clip 0 layer 14
createFrameSource fabric clip 0 layer 15
createFrameSource fabric clip 0 layer 16
Writing frame: 0 from clip 0 (frame 0)
Input #0, rawvideo, from 'fd:':
Duration: N/A, start: 0.000000, bitrate: 737280 kb/s
Stream #0:0: Video: rawvideo (RGBA / 0x41424752), rgba, 720x1280, 737280 kb/s, 25 tbr, 25 tbn
Input #1, flac, from 'video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac':
Metadata:
encoder : Lavf60.16.100
Duration: 00:00:59.00, start: 0.000000, bitrate: 1276 kb/s
Stream #1:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)
[out#0/mp4 @ 00000253de108480] Error opening output ./video/What common product has a feature you’re not sure everyone is aware of?.mp4: Invalid argument
Error opening output file ./video/What common product has a feature you’re not sure everyone is aware of?.mp4.
Error opening output files: Invalid argument
Output ffmpeg exited 4294967274
Writing frame: 1 from clip 0 (frame 1)
Cleanup
Close ./assets/bg1.mp4
Waiting for output ffmpeg process to finish
file:///C:/Users/ethan/Desktop/Code/best-reddit-moments/node_modules/execa/lib/error.js:59
error = new Error(message);
^

Error: Command failed with exit code 4294967274: ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 720x1280 -r 25/1 -i - -i video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac -map 0:v:0 -map 1:a:0 -acodec aac -b:a 128k -vf format=yuv420p -vcodec libx264 -profile:v high -preset:v medium -crf 18 -movflags faststart -y ./video/What common product has a feature you’re not sure everyone is aware of?.mp4
at makeError (file:///C:/Users/ethan/Desktop/Code/best-reddit-moments/node_modules/execa/lib/error.js:59:11)
at handlePromise (file:///C:/Users/ethan/Desktop/Code/best-reddit-moments/node_modules/execa/index.js:119:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
shortMessage: 'Command failed with exit code 4294967274: ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 720x1280 -r 25/1 -i - -i video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac -map 0:v:0 -map 1:a:0 -acodec aac -b:a 128k -vf format=yuv420p -vcodec libx264 -profile:v high -preset:v medium -crf 18 -movflags faststart -y ./video/What common product has a feature you’re not sure everyone is aware of?.mp4',
command: 'ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 720x1280 -r 25/1 -i - -i video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac -map 0:v:0 -map 1:a:0 -acodec aac -b:a 128k -vf format=yuv420p -vcodec libx264 -profile:v high -preset:v medium -crf 18 -movflags faststart -y ./video/What common product has a feature you’re not sure everyone is aware of?.mp4',
escapedCommand: 'ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 720x1280 -r "25/1" -i - -i "video\editly-tmp-vaDQXaiYR5cHQrrP9_u41\audio-mixed.flac" -map "0:v:0" -map "1:a:0" -acodec aac "-b:a" 128k -vf "format=yuv420p" -vcodec libx264 "-profile:v" high "-preset:v" medium -crf 18 -movflags faststart -y "./video/What common product has a feature you’re not sure everyone is aware of?.mp4"',
exitCode: 4294967274,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}

The above output was obtained from the latest version of editly and the latest stable version of ffmpeg (v6.1). I also tried with ffmpeg v4.3.1 and ffmpeg v6.0. Each time I get the same write EPIPE error. Not sure what I'm missing here, can provide my code if needed. Can anyone help?

I managed to get editly working. I think ffmpeg was throwing an error because there was a ? character in the output filename. I simply stripped out questions marks from the output filename and the script is working again.