In my Lambda, I download a video file from S3, and this file I use as input on my code. What I've noticed is that my code works sometimes, but generally it fails trying to get this moov atom thing.
In my local installation, it works properly everytime, so I was wondering how can I check with fluent-ffmpeg if the file is a valid file or if it is corrupted in some way
Version information
fluent-ffmpeg version: 2.1.2
ffmpeg version: 4.2.2
OS: Debian (AWS Lambda)
Code to reproduce
import fluentFfmpeg, { FfprobeData } from 'fluent-ffmpeg'
export const getVideoProbe: Function = async (input: string, fileInfo: File): Promise<FfprobeData> => {
// tslint:disable-next-line: no-any
return new Promise((resolve: Function, reject: Function): any => {
fluentFfmpeg(input)
.ffprobe((err: NodeJS.ErrnoException, data: FfprobeData) => {
if (err) {
reject(err)
}
resolve(data)
})
})
}
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
That the code extracts correctly the metadata from the file.
Observed results
"stack": [
"Runtime.UnhandledPromiseRejection: Error: ffprobe exited with code 1",
"ffprobe version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2019 the FFmpeg developers",
" built with gcc 8 (Debian 8.3.0-6)",
" configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg",
" libavutil 56. 31.100 / 56. 31.100",
" libavcodec 58. 54.100 / 58. 54.100",
" libavformat 58. 29.100 / 58. 29.100",
" libavdevice 58. 8.100 / 58. 8.100",
" libavfilter 7. 57.100 / 7. 57.100",
" libswscale 5. 5.100 / 5. 5.100",
" libswresample 3. 5.100 / 3. 5.100",
" libpostproc 55. 5.100 / 55. 5.100",
"[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5963c40] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!",
"[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5963c40] moov atom not found",
"/tmp/file.mp4: Invalid data found when processing input",
"",
" at process.on (/var/runtime/index.js:37:15)",
" at process.emit (events.js:198:13)",
" at process.EventEmitter.emit (domain.js:448:20)",
" at emitPromiseRejectionWarnings (internal/process/promises.js:140:18)",
" at process._tickCallback (internal/process/next_tick.js:69:34)"
]
In my Lambda, I download a video file from S3, and this file I use as input on my code. What I've noticed is that my code works sometimes, but generally it fails trying to get this
moov atom
thing.In my local installation, it works properly everytime, so I was wondering how can I check with fluent-ffmpeg if the file is a valid file or if it is corrupted in some way
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
That the code extracts correctly the metadata from the file.
Observed results