phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
7.98k stars 172 forks source link

ffprobe failed: ExitStatus(unix_wait_status(256)) #169

Closed patsevanton closed 1 year ago

patsevanton commented 1 year ago

Hello! Thanks for rga. I have error "ffprobe failed: ExitStatus(unix_wait_status(256))".

rga version:

rga --version
ripgrep-all 1.0.0-alpha.2

ffprobe version:

ffprobe -version
ffprobe version 5.1.2-3ubuntu1 Copyright (c) 2007-2022 the FFmpeg developers

Find by text:

rga vault_mount
92 - Securing Keys.mp4: preprocessor command failed: '"/usr/local/bin/rga-preproc" "92 - Securing Keys.mp4"': 
-------------------------------------------------------------------------------
/home/user/Downloads/92 - Securing Keys.mp4 adapter: ffmpeg
/home/user/Downloads/92 - Securing Keys.mp4.txt adapter: postprocprefix
Error: copying adapter output to stdout

Caused by:
    0: adapting /home/user/Downloads/92 - Securing Keys.mp4.txt via postprocprefix failed
    1: in ffmpeg.adapt_write
    2: ffprobe failed: ExitStatus(unix_wait_status(256))
-------------------------------------------------------------------------------

I removed cache

cd ${XDG_CACHE_DIR-~/.cache}/
rm -rf ripgrep-all

But get error again.

It seems like I used to have a file, but I deleted 92 - Securing Keys.mp4.txt a long time ago.

lafrenierejm commented 1 year ago

Not confident that it's relevant to this issue, but just for reference: The version of ffprobe that CI runs against (as provided by the Nix flake) is 5.1.3.

Full output of ffprobe -version on an M1 Mac (i.e. aarch64-darwin) ``` ffprobe version 5.1.3 Copyright (c) 2007-2022 the FFmpeg developers built with clang version 11.1.0 configuration: --disable-static --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3 --target_os=darwin --arch=aarch64 --pkg-config=pkg-config --enable-gpl --enable-version3 --disable-nonfree --enable-shared --enable-pic --disable-small --enable-runtime-cpudetect --disable-lto --disable-gray --enable-swscale-alpha --enable-hardcoded-tables --enable-safe-bitstream-reader --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --datadir=/nix/store/f2vma755ya1p5njpjbl4cqhqp0fs5i3m-ffmpeg-5.1.3-data/share/ffmpeg --enable-ffmpeg --disable-ffplay --enable-ffprobe --bindir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3-bin/bin --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avutil --enable-postproc --enable-swresample --enable-swscale --libdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3-lib/lib --incdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3-dev/include --enable-doc --enable-htmlpages --enable-manpages --mandir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3-man/share/man --enable-podpages --enable-txtpages --docdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-5.1.3-doc/share/doc/ffmpeg --disable-alsa --enable-bzlib --disable-libcelt --disable-cuda --disable-cuda-llvm --enable-libdav1d --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --disable-frei0r --disable-libfribidi --disable-libgme --enable-gnutls --disable-libgsm --disable-ladspa --enable-libmp3lame --disable-libaom --enable-libass --disable-libbluray --disable-libbs2b --disable-libdc1394 --disable-libdrm --enable-iconv --disable-libjack --disable-libmfx --disable-libmodplug --disable-libmysofa --enable-libopus --disable-librsvg --enable-libsrt --enable-libssh --disable-libtensorflow --enable-libtheora --disable-libv4l2 --disable-v4l2-m2m --disable-vaapi --enable-vdpau --enable-libvorbis --disable-libvmaf --enable-libvpx --disable-libwebp --disable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape --disable-libxml2 --enable-lzma --disable-cuvid --disable-nvdec --disable-nvenc --disable-openal --disable-opencl --disable-libopencore-amrnb --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-libpulse --disable-librav1e --disable-libsvtav1 --disable-librtmp --enable-sdl2 --enable-libsoxr --enable-libspeex --disable-libvidstab --disable-libvo-amrwbenc --enable-libx264 --enable-libx265 --disable-libxavs --enable-libxvid --disable-libzmq --enable-libzimg --enable-zlib --disable-vulkan --disable-libglslang --disable-libsmbclient --disable-debug --enable-optimizations --disable-extra-warnings --disable-stripping --cc=clang --cxx=clang++ libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 ```
phiresky commented 1 year ago

The ".txt" file is a virtual file (confusing output). does the .MP4 file exist and could you send it?

patsevanton commented 1 year ago

File 92 - Securing Keys.mp4 have size 0 bytes - empty file.

.rw-rw-r-- 0 user user 23 May 10:31 92 - Securing Keys.mp4
phiresky commented 1 year ago

Ah. Then I guess this behaviour isn't really unexpected. If a file isn't what rga thinks it should be (e.g. a mp4 file being a media file) it will display an error for that file. The error message above is pretty confusing though.

What do you think should happen in this case?

phiresky commented 1 year ago

With 5b91a373182a14a943246eefe6034274edb9a6ae the error shown is now:

.../foo.mp4 adapter: ffmpeg
.../foo.mp4.txt adapter: postprocprefix
Error: copying adapter output to stdout

Caused by:
    0: in ffmpeg.adapt_write
    1: ffprobe failed: ExitStatus(unix_wait_status(256))
       [mov,mp4,m4a,3gp,3g2,mj2 @ 0x556fed753dc0] moov atom not found
       .../foo.mp4: Invalid data found when processing input

which should be a bit better

patsevanton commented 1 year ago

It would be cool if the message "file not found" was displayed.

phiresky commented 1 year ago

but the file does exist, it's just empty. the txt file is just an intermediary internal product not something on your disk

On Sun, Jun 4, 2023, 16:20 Anton Patsev @.***> wrote:

It would be cool if the message "file not found" was displayed.

— Reply to this email directly, view it on GitHub https://github.com/phiresky/ripgrep-all/issues/169#issuecomment-1575587485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARSOYJ37IJPPC6WUIRAK7LXJSKSNANCNFSM6AAAAAAYZLMOOM . You are receiving this because you commented.Message ID: @.***>

patsevanton commented 1 year ago

You're right. I got it mixed up. Thanks! i will try.