Marginal / QLVideo

This package allows macOS Finder to display thumbnails, static QuickLook previews, cover art and metadata for most types of video files.
GNU General Public License v2.0
2.51k stars 87 forks source link

QLVideo overrides Finder preview behavior for .ts files #116

Closed glottisfaun0000 closed 10 months ago

glottisfaun0000 commented 1 year ago

Finder will preview .ts files fully like they're .mp4, but QLVideo overrides this behavior and displays them as thumbnails. Is this because these aren't really .ts files (which seems like classic macOS weirdness), or expected behavior? README.md doesn't mention .ts.

Here's the ffprobe stream info for the .ts files I'm talking about: Stream #0:1[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn

If it's expected, there should be an option to disable for .ts files.

Kagami commented 10 months ago

What audio codec is that? I quickly checked with some .TS files I have, it seems native Quick Look doesn't like AAC audio in MPEG-TS. Combinations of MPEG-2/H.264/AC3/MP2 seem to be working fine.

Marginal commented 10 months ago

In most Finder contexts (e.g. File → Quick Look, File → Get Info, Gallery View etc) and for most filetypes (including .ts) QLVideo hands off to the macOS built-in previewer if AVFoundation says that it can play the file. So if installing QLVideo makes the file unplayable in these contexts, then the built-in previewer (which uses AVFoundation) can play the file even though AVFoundation says that it can't. Which is weird. Or maybe my code that checks for playability is broken.

@glottisfaun0000 Please paste the full ffprobe output. Is this file available anywhere on the net?

For icons in the Finder window since Catalina(?) QLVideo can no longer hand off to the built-in previewer, so you never get playable icons when QLVideo is installed. I can't workaround or add an option for this.

glottisfaun0000 commented 10 months ago

here's the ffprobe output of a Twitch.tv livestream from streamlink which QLVideo shows as a thumbnail but can be fully previwed through Finder.

ffprobe output.ts
ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.0.40.1)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0-with-options_4 --enable-shared --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-neon --disable-htmlpages --enable-chromaprint
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mpegts, from 'output.ts':
  Duration: 00:01:44.08, start: 32015.782000, bitrate: 6415 kb/s
  Program 1
  Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 163 kb/s
  Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn
  Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x203344
Kagami commented 10 months ago

Audio: aac (LC)

Yeah, I experience the same. Test some .TS with AC3/MP2 audio. QuickTime plays .TS with AAC just fine though. Only related to QuickLook.

But I haven't tested whether such files are working without QLVideo at all.

Marginal commented 10 months ago

I can reproduce this, thanks. @Kagami appears correct that the problem only affects MEGTS containers with AAC audio. These files will preview correctly in the next release.