theophanemayaud / video-simili-duplicate-cleaner

https://theophanemayaud.github.io/video-simili-duplicate-cleaner/
GNU General Public License v3.0
51 stars 5 forks source link

App says "failed to take capture" but video plays fine #109

Open newadventure079 opened 1 year ago

newadventure079 commented 1 year ago

I get the following error often for a various number of videos.
[17:23:28] ERROR with video.wmv : failed to take capture

I played the file in VLC, IINA, Movist Pro and it played fine. I even checked for corruption with ffprobe.

bash-3.2$ ffprobe 'video.wmv'; echo $?
ffprobe version 5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_6 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  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
Input #0, asf, from 'video.wmv':
  Metadata:
    title           : title
    copyright       : copyright
    WM/WMADRCPeakReference: 32767
    WM/WMADRCAverageReference: 3605
    Buffer Average  : 39506
    WMFSDKVersion   : 10.00.00.3646
    WMFSDKNeeded    : 0.0.0.0000
    VBR Peak        : 1600000
    IsVBR           : 1
  Duration: 00:04:34.49, start: 0.235000, bitrate: 688 kb/s
  Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 22050 Hz, 2 channels, fltp, 22 kb/s
  Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 320x240, 700 kb/s, 29.97 fps, 29.97 tbr, 1k tbn
0 <---success

ffprobe result of 1 is failure and 0 is success

What command is the app using to detect corrupt videos? Is it using ffmpeg/ffprobe version 5?

newadventure079 commented 1 year ago

I used the following command and got this output: ffmpeg -v error -i 'video.wmv' -f null NUL

Error while decoding stream #0:1: Invalid data found when processing input
    Last message repeated 26 times
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6893 >= 6893
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6926 >= 6926
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6929 >= 6929
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6937 >= 6937
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6940 >= 6940
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6948 >= 6948
[null @ 0x13be07240] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6956 >= 6956
Error while decoding stream #0:1: Invalid data found when processing input
    Last message repeated 2 times

I dont know if these are real errors or not. I've read sometimes ffmpeg will output stuff that isn't really that big of a deal

newadventure079 commented 1 year ago

I ran the same ffmpeg command as above but with a file that wasn't logged as bad in the app and ffmpeg produced no error lines, so that's good :)

After googling, I found this that may help: https://superuser.com/questions/978888/application-provided-invalid-non-monotonically-increasing-dts-in-ffmpeg

It seems like it's not really an error per-se

newadventure079 commented 1 year ago

It looks like the only error messages that are from broken, unplayable videos are: Could not open input, file is probably broken and Height (0) or width (0) = 0