Open Marginal opened 10 years ago
Quicklook Video play doesn't in 10.13 macOS High Sierra
-
@zxspectrum are you saying this only works for <= 10.12?
it use to work in Sierra. Definitely not working for me in High Sierra. I can see the thumbnail but can't play the movie via quicklook.../
@zxspectrum https://github.com/Marginal/QLVideo/releases/tag/rel-190 should fix it but I haven't tested it myself. Can you please test it and report back? :)
Success!
csrutil disable
)rm -rf Movie.qldisplay
sudo ln -s LegacyMovie.qldisplay /System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/PlugIns/Movie.qldisplay
csrutil enable
)@krokofant So can you QuickLook play video files like x264 / x265 .mkv files?
@adriel I believe so, not sure about x265 though
@krokofant hmm, might have to give it a try. I've got one of the new MBP's that has hardware support for H.265, so might work here.
I tried the steps listed by @krokofant but there were a few disadvantages
.flv did eventually play but quicklook was spinning for a long time (about 30 secs) before it played
Does anyone know how to get .mkv and .flv files to play via quicklook using regular qldisplay (Movie.qldisplay) and not the Legacy version?
I also have bo "scrubber" bar, but it's better than not working at all.
I'm still on Sierra and it sounds like it's degraded pretty badly in High Sierra overall. Is there any possible fixes for the missing scrubber bar, delays and loss of playback for various formats that's being reported here?
I was looking at the latest version and it says it only shows static images for non-standard formats. Does this workaround to have formats such as .asf, .avi, .flv, .mkv, .rm, .webm, .wmf etc no longer work in the new version?
Does moving video still work in High Sierra like it used to for Sierra? I currently have Sierra with a bunch of video formats working such as .asf, .avi, .flv, .mkv, .rm, .webm, .wmf formats working great with QuickLook and has a scrubber bar. Anyone figure out a way to get the scrubber bar back in High Sierra?
THANK YOU ALL. This function is very important to me, since I have hundreds of webm and after YEARS there is no better software than the (older) Quicklook to select and see on the run. I must say there was a little indie plugin called WebMindexer that worked on Windows Chrome, that was ok. So I Installed QLvideo+Perian on Sierra 10.12.6. Unfortunately while I can display all of them, there is no audio output. The speaker icon on the ones that have it, is regularly displayed.
What if instead of showing some sort of list of static snapshots the quicklook preview actually showed a webpage with some sort of HTML5 player contained in the quicklook plugin itself that using the video codecs could allow to play the video file directly? Would it be possible? Would this allow to bypass the QL static view limitations?
No, because WebKit would have to support the video formats. It would be possible to run a server that does live transcoding, but that's just silly.
This is one of those cases where Apple just did something sucky and that's that.
Oh ok, I thought you could do almost everything with html5 and JavaScript :) too bad
Hey all, I've successfully gotten a webm to play in Quicklook using @giovariot 's idea. In macOS 11.3 (and the associated version of Safari), Apple finally added webm support: https://www.macrumors.com/2021/02/18/safari-to-support-webm-after-11-years/
I have QLVideo installed and using Quicklook directly on the .webm file shows the static frame, but if I create a simple HTML file containing a <video>
element whose src
is the path to the .webm, it works (including audio and looping the video), see the attached screen capture.
The HTML is the following:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test</title>
<style>
html,
body {
width: 200px;
height: auto;
background-color: none;
}
::-webkit-media-controls {
display: none !important;
}
</style>
</head>
<body>
<video autoplay playsinline loop>
<source src="1618931577179.webm" type="video/webm" />
</video>
</body>
</html>
Note my (futile) attempts to hide the video controls with CSS (which on my system do not function).
It is not the prettiest but it is a start. Perhaps the QLVideo plugin can, in the case of .webm files, render an HTML file like the above and embed the .webm in the HTML? The biggest two issues are the unwanted controls and dynamically sizing the preview window.
Also, I am not sure if Apple's support for .webm includes all of the common codecs. My sample .webm is from 4chan which only supports VP8 video inside of .webm files; hopefully VP9 and any others would also work.
macOS 11.4, M1 chip
https://user-images.githubusercontent.com/4976096/124045489-bf92c980-d9dd-11eb-8869-31ebd5998225.mp4
So - a possible solution would be to have a launchd service triggered by a port that gets a file:// URL and transcodes it to something fast that a JS video player can play?
I'm not sure transcoding would be necessary? Since the macOS 11.3 update seems to allow the system HTML viewer (I assume the same version of webkit that Safari uses) to play webm files out of the box. I notice that the preview generator in QLVideo already creates HTML for one of the paths, so I think just creating HTML in a similar manner in the case of a webm file. But I don't know a whole lot about the macOS APIs unfortunately.
I'm referring to the code here: https://github.com/Marginal/QLVideo/blob/876295cb7bee6d6aef9621bf6f72cf49a4fdcba8/qlgenerator/GeneratePreviewForURL.m#L215
Sure, for webm its fine, but a host of older formats aren't supported. Transcoding is lossy, so best to keep them in their original form.
If you rename LegacyMovie.qldisplay to Movie.qldisplay it will work with non-native video containers as on pre-10.9 OS X
LegacyMovie.qldisplay does OK on some codec/container combinations if you have Perian installed, but it's painfully slow on some of my .mkv test files. Weirdly it can't handle some combinations e.g. DV, or H.264 in .mts, that Movie.qldisplay handles fine.
I've created a new branch LegacyMovie which defers to LegacyMovie if LegacyMovie can preview the content, and provides static previews otherwise.
For this to work you have to:
- Be running OSX 10.9 or 10.10. (The renaming/symlinking trick doesn't work from 10.11 due to SIP).
- Install Perian or some other source of QT codecs.
- Move /System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/PlugIns/Movie.qldisplay out the way.
- Symlink LegacyMovie.qldisplay as Movie.qldisplay (
sudo ln -s LegacyMovie.qldisplay /System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/PlugIns/Movie.qldisplay
).Let me know how it works for you if you try this.
Has anyone had any luck getting this to work (particularly with .mkv files) in Mojave? Any info would be appreciated, especially from the OG genius, Marginal.
Thanks all!
https://github.com/Marginal/QLVideo/issues/3#issuecomment-871802115
if I create a simple HTML file containing a
<video>
element whosesrc
is the path to the .webm, it works
That's interesting workaround!
Also, I am not sure if Apple's support for .webm includes all of the common codecs.
Latest Safari supports VP8/VP9/Vorbis/Opus, just not AV1.
Hey all, I've successfully gotten a webm to play in Quicklook using @giovariot 's idea. In macOS 11.3 (and the associated version of Safari), Apple finally added webm support: https://www.macrumors.com/2021/02/18/safari-to-support-webm-after-11-years/
I have QLVideo installed and using Quicklook directly on the .webm file shows the static frame, but if I create a simple HTML file containing a
<video>
element whosesrc
is the path to the .webm, it works (including audio and looping the video), see the attached screen capture.The HTML is the following:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Test</title> <style> html, body { width: 200px; height: auto; background-color: none; } ::-webkit-media-controls { display: none !important; } </style> </head> <body> <video autoplay playsinline loop> <source src="1618931577179.webm" type="video/webm" /> </video> </body> </html>
Note my (futile) attempts to hide the video controls with CSS (which on my system do not function).
It is not the prettiest but it is a start. Perhaps the QLVideo plugin can, in the case of .webm files, render an HTML file like the above and embed the .webm in the HTML? The biggest two issues are the unwanted controls and dynamically sizing the preview window.
Also, I am not sure if Apple's support for .webm includes all of the common codecs. My sample .webm is from 4chan which only supports VP8 video inside of .webm files; hopefully VP9 and any others would also work.
macOS 11.4, M1 chip
Screen.Recording.2021-06-30.at.7.45.34.PM.mp4
I try to make a QuickLook Preview Extension that generates an HTML to play WebM and it works! The preview is animated and the playback controls are displayed normally.
Checkout https://github.com/exgphe/quicklook-webm. Any feedback is welcome!
if I create a simple HTML file containing a
<video>
element whosesrc
is the path to the .webm, it worksThat's interesting workaround!
Also, I am not sure if Apple's support for .webm includes all of the common codecs.
Latest Safari supports VP8/VP9/Vorbis/Opus, just not AV1.
I try to make a QuickLook Preview Extension that generates an HTML to play WebM and it works! The preview is animated and the playback controls are displayed normally.
Checkout https://github.com/exgphe/quicklook-webm. Any feedback is welcome!
It appears you had it working before. Which OS version was that and which specific macOS version doesn't work now?
Do you have QuickTime 7 re-installed?
https://support.apple.com/kb/dl923?locale=en_US
Do you have an old backup of your 'LegacyMovie.qldisplay' folder somewhere on external drive? Maybe try to dig that up.
Otherwise, it'd appear perhaps something on your system got corrupted. I would try it with a different user account and see if it works that way.