kannibalox / PtpUploader

PtpUploader is a bot that automatically uploads releases to PTP.
69 stars 21 forks source link

All DVD screens were of a corrupt image #21

Open newadventure079 opened 2 years ago

newadventure079 commented 2 years ago

Below is an example screen output produced. All 6 were the exact same corrupted image. The ffmpeg output looks normal, but maybe there's some way we can detect a wonky screen being produced.

source ~/.venv/ptpuploader/bin/activate.fish; ReleaseInfoMaker /Volumes/data/LTS/Movies/Voices\ of\ Desire\ \(1972\)\ \[SWV\]/
2022-01-26 19:53:32,878 INFO  PtpUploader.MyGlobals Validating directory '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]'.
2022-01-26 19:53:32,904 INFO  PtpUploader.ReleaseDescriptionFormatter Reading media info from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VIDEO_TS.IFO'.
2022-01-26 19:53:32,929 INFO  PtpUploader.ReleaseDescriptionFormatter Reading media info from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_0.IFO'.
2022-01-26 19:53:33,058 INFO  PtpUploader.ReleaseDescriptionFormatter Reading media info from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_1.VOB'.
2022-01-26 19:53:33,461 INFO  PtpUploader.ReleaseDescriptionFormatter Reading media info from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_0.IFO'.
2022-01-26 19:53:33,477 INFO  PtpUploader.ReleaseDescriptionFormatter Making screenshot with ffmpeg from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_1.VOB' to '/var/folders/h8/91v0dsdx5c1ckpj1tvp_l8pm0000gn/T/tmpd5_klml0.png'.
2022-01-26 19:53:33,477 INFO  PtpUploader.ReleaseDescriptionFormatter Pixel aspect ratio wasn't 1:1, scaling video to resolution: '704x528'.
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 13.0.0 (clang-1300.0.29.3)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/4.4.1_5 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --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-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mpeg, from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_1.VOB':
  Duration: 00:00:12.11, start: 0.225367, bitrate: 709107 kb/s
  Stream #0:0[0x1bf]: Data: dvd_nav_packet
  Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m, top first), 704x480 [SAR 10:11 DAR 4:3], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Side data:
      cpb: bitrate max/min/avg: 9558000/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to '/var/folders/h8/91v0dsdx5c1ckpj1tvp_l8pm0000gn/T/tmpd5_klml0.png':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: png, rgb24(pc, gbr/smpte170m/smpte170m, top coded first (swapped)), 704x528 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn
    Metadata:
      encoder         : Lavc58.134.100 png
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A dup=1 drop=1 speed=0.682x
video:384kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2022-01-26 19:53:34,966 INFO  PtpUploader.ReleaseDescriptionFormatter Making screenshot with ffmpeg from '/Volumes/data/LTS/Movies/Voices of Desire (1972) [SWV]/VIDEO_TS/VTS_01_1.VOB' to '/var/folders/h8/91v0dsdx5c1ckpj1tvp_l8pm0000gn/T/tmp7ot1zpw2.png'.
2022-01-26 19:53:34,966 INFO  PtpUploader.ReleaseDescriptionFormatter Pixel aspect ratio wasn't 1:

6t00b9

kannibalox commented 2 years ago

I've come across this situation a couple times, and it's a bit tricky to handle because there's nothing technically wrong with the files. That's the actual video present in VTS_01_1.VOB. The internal logic isn't really built for calculating screenshots from a whole DVD, so I've been putting off fixing these edge cases, but refactoring will probably be necessary to support blu-rays anyway.

newadventure079 commented 2 years ago

I skimmed thru that DVD and there is a weird section at the first where the video truly does look like those screens. The odd part was that all 6 screens were of that weird part and were all identical. I'd expect it to take other screens of parts further along in the vid where the video is past that weird part. It's almost like it got hung up at that weird part.