Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] quicktime antics #107

Open
sjthespian opened this issue Oct 7, 2024 · 3 comments
Open

[BUG] quicktime antics #107

sjthespian opened this issue Oct 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sjthespian
Copy link

Describe the bug
I have several older Quicktime files that checkrr not recognizing Quicktime files as valid videos. The logs show Type=Unknown:

time="2024-10-07T02:47:32Z" level=info msg="\"/dvdtv/TableTop/Season 01/TableTop - S01E01 - Small World.m4v\"" Hash Match=true
time="2024-10-07T02:47:32Z" level=info msg="File \"/dvdtv/TableTop/Season 01/TableTop - S01E01 - Small World.mov\" is not a recognized file type" FFProbe=false Type=Unknown

In this case, these are files that were downloaded via. Steam from the long-ago Kickstarter for Will Wheaton's TableTop videos.

But ffprobe run from in the container has no trouble with the files:

/ # ffprobe /dvdtv/TableTop/Season\ 01/TableTop\ -\ S01E01\ -\ Small\ World.m
TableTop - S01E01 - Small World.m4v  TableTop - S01E01 - Small World.mov
/ # ffprobe /dvdtv/TableTop/Season\ 01/TableTop\ -\ S01E01\ -\ Small\ World.mov
ffprobe version 6.1.1 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13.2.1 (Alpine 13.2.1_git20231014) 20231014
  configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
  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   5.  0.100 /  5.  0.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dvdtv/TableTop/Season 01/TableTop - S01E01 - Small World.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2014-08-08T09:39:00.000000Z
    com.apple.finalcutstudio.media.uuid: 9208E54E-3C8B-44C8-BF04-E752613CF436
    com.apple.finalcutstudio.media.history.uuid: A8F05D7B-B23E-48C9-83B2-7823DB46D7AF
    timecode        : 00:00:00;00
  Duration: 00:29:55.70, start: 0.000000, bitrate: 9326 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 960x720, 9153 kb/s, SAR 4:3 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn (default)
    Metadata:
      creation_time   : 2014-08-08T09:39:00.000000Z
      handler_name    : Apple Video Media Handler
      vendor_id       : appl
      encoder         : H.264
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 168 kb/s (default)
    Metadata:
      creation_time   : 2014-08-08T09:39:00.000000Z
      handler_name    : Apple Sound Media Handler
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-08-08T09:59:09.000000Z
      handler_name    : Time Code Media Handler
      timecode        : 00:00:00;00
Unsupported codec with id 0 for input stream 2

To Reproduce
Steps to reproduce the behavior:

  1. Find an older QuickTime file and add it to your library
  2. Run a scan
  3. See the errors in the log and the file show up in Bad Files

Expected behavior
I would expect checkrr to scan these files just like any other video files.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: MacOS, Docker on Linux
  • Browser: Chrome and Safari
  • checkrr 3.3.0
@sjthespian sjthespian added the bug Something isn't working label Oct 7, 2024
@aetaric aetaric changed the title [BUG] [BUG] quicktime antics Oct 7, 2024
@aetaric
Copy link
Owner

aetaric commented Oct 7, 2024

It looks like this is likely to be a magic number issue, not an ffprobe issue. checkrr uses h2non/filetype to check if a file is video/audio before passing to ffprobe blindly. That library uses magic numbers to match the file and checks that the extension matches [1]. Honestly, it might make sense to just swap the container type and extension using ffmpeg in this case. Otherwise, h2non/filetype needs to be patched and I've been waiting on them for 2 years on h2non/filetype#120.

[1] https://github.com/h2non/filetype/blob/master/matchers/video.go#L53-L62

@sjthespian
Copy link
Author

Ugh, looks like it downloaded new mp4 versions of the files and now I don't have the .mov files in my library any more. File sees it as a Movie file on my Mac, let me dig up my archives of the .mov files and I will see what it does in the container.

Interesting that file also sees it as an ISO though...

❯ file /media/video/DVDs/TV_Shows/TableTop/Season\ 01/TableTop\ -\ S01E01\ -\ Small\ World.mov
/media/video/DVDs/TV_Shows/TableTop/Season 01/TableTop - S01E01 - Small World.mov: ISO Media, Apple QuickTime movie, Apple QuickTime (.MOV/QT)

@aetaric
Copy link
Owner

aetaric commented Oct 8, 2024

If it sees it as ISO media, I suspect it might be directly related to the magic number used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants