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.54k stars 88 forks source link

Not all Videos are displayed as a static snapshot in QuickLook #33

Closed Metal-Snake closed 8 years ago

Metal-Snake commented 8 years ago

Could this functionality be added to those that play a Video instead of the snapshot in QuickLook? If I want to watch the movie I open it in a player, QuickLook is used for a quick look, a static snapshot helps with that. Now I have to scrobble around inside QuickLook which is quite annoying.

Marginal commented 8 years ago

If I understand you correctly you're wanting to disable the playable preview feature of QuickLook, and instead display static snapshots for all video file types? This is technically easy to do, but I don't think people would be happy if it was the default behaviour. And unfortunately I haven't found a way to have user-settable preferences for QuickLook plugins.

Metal-Snake commented 8 years ago

Yes, you correctly understood.

About user-settable preferences, this one has them: https://github.com/anthonygelibert/QLColorCode

Marginal commented 8 years ago

Please try v1.85. You can use defaults write uk.org.marginal.qlvideo SnapshotAlways -bool YES to force static snapshots. See here for other available settings.

Marginal commented 8 years ago

Fixed in Release 1.86.

Metal-Snake commented 8 years ago

I tried v1.85 and v1.86 with SnapshotAlways set to true, it works most of the time but sometimes it just shows the spinning loading wheel even after waiting some time. I think this happens when a movie is less than a minute long.

Marginal commented 8 years ago

v1.85 had a bug which sometimes caused failure with MPEG4 files. This is fixed in 1.86. Both have an issue that the QuickLook server gives plugins a very tight memory budget (120MB) which isn't always enough - particularly when processing H.265 or 4K content. So you might be hitting that. Version 1.86 is more careful about trying to minimize its memory usage so it may manage to render some content that 1.85 failed on.

Metal-Snake commented 8 years ago

I think the Video I tested with isn't that big or anything.

Here is what Media-Info says about it:

Size: 17.8 MB
Format: QuickTime/MPEG-4/Motion JPEG 2000 format
Stream count: 2
Duration: 00:00:54
Bit rate: 2755 kb/s
Meta info:
    compatible_brands: isommp42
    minor_version: 0
    creation_time: 2014-11-28 15:08:00
    major_brand: mp42

Stream 0
Type: video
Codec: h264
Codec profile: High
FourCC: avc1
Duration: 00:00:54
Width: 1280
Height: 720
Sample aspect ratio: 1:1
Display aspect ratio: 16:9
Pixel format: yuv420p
Frame rate: 29.97 fps
Bit rate: 2561 kb/s
Meta info:
    handler_name: VideoHandler
    language: und

Stream 1
Type: audio
Codec: aac
FourCC: mp4a
Duration: 00:00:54
Bit rate: 192 kb/s
Sample rate: 44100 Hz
Sample format: s16
Channel: 2
Meta info:
    handler_name: IsoMedia File Produced by Google, 5-11-2011
    creation_time: 2014-11-28 15:08:00
    language: und

Anything else I can check?

Marginal commented 8 years ago

I found an ingenious way of getting round the memory limit. That's probably not the problem you're hitting, but please try 1.87 anyway just in case.

Is this a .mp4 file? If so you may be hitting the problem described in Limitations. Please try renaming it as .m4v. (I know that sounds stupid, but OSX seems to have different code paths for .mp4 and .m4v).

Otherwise can I get a copy of this file for testing - either a link or a torrent?

Metal-Snake commented 8 years ago

Yes it's a .mp4 file. Updating to 1.87 didn't help but changing the suffix to .m4v works. In the limitations you write about limitations regarding to h265 but this one is h264 according to Media-Info. So is this more like a general problem with .mp4?

I can upload the video, but I think I just downloaded it from YouTube using 4KDownloader.

YouTube link: https://www.youtube.com/watch?v=omxH7zg-OXw crc32 for my file (720p) is 0f0c6a37 If you still need the file I can upload the file to my webspace when I'm back at home in a few hours.

Marginal commented 8 years ago

Yes, it's a more general problem with .mp4 files. But before the SnapshotAlways setting it was only visible in practice with H.265 video. At least in Yosemite you got a thumbnail, but in El Capitan you just get a hang. I've updated the Limitations section to clarify.

Marginal commented 8 years ago

Note: QuickLook's behaviour with .mp4 files appears to be fixed in the Sierra beta.