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

Video Preview not working #113

Closed
artikweb opened this issue Nov 6, 2017 · 19 comments
Closed

Video Preview not working #113

artikweb opened this issue Nov 6, 2017 · 19 comments

Comments

@artikweb
Copy link
Contributor

artikweb commented Nov 6, 2017

Hello,
I installed the new release (v 0.3.2) today and there's a major bug affecting video previewing.
I installed the .msi package on a Windows 10 v. 1709 (Fall Creators Update) x64 and it's not possible at all to preview any video file. I tried previewing a .mp4 (h264) video file as well as a .mkv to no avail. Nothing happens, not even an error message.
When trying so preview any other file after trying to preview a video, Quicklook also does not respond, I had to force close the app process through task manager because the icon on the system tray also stops working.

Should you need any more information (or help reproducing this bug), contact me asap and I'll be glad to help.

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Go to install_folder\Plugins\VideoViewer\FFmpeg folder. There should have a ffprobe.exe file. Can you run it in the command prompt?

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

Yes, here's the output:
image

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Strange. How about FFprobe.exe "<any_video_file>"?

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

image

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Seems the probe is working normally.
Can you debug the project by setting a breakpoint here:https://github.com/xupefei/QuickLook/blob/master/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs#L72
Does the program hang here?

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

I don't have the project configured on this machine, I'll have to set it up (might take a while since VS isn't updated). I'll post the results here ASAP.

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

It may takes some time since I have updated the Windows SDK recently.
Can you alternatively provide me a sample video file so i can have a try?

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

Just sent you an email with a link. 😉

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Thanks for your link. Your video plays correctly on my machine.
If the Big Buck Bunny works for you, then it may be related to the HW acceleration.
I have made a new plugin w/o it. Could you try it?

QuickLook.Plugin.VideoViewer.zip

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

I'm having trouble trying to compile QL. I'm always getting this git-related error. Do you know how can I fix this? (Already have git installed and the commands inside the powershell file execute fine)
image

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017 via email

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

Thanks.
Here's the info on the breakpoint. I also tried using the updated VideoViewer you sent, didn't work.
As you see in the screeshot below, I set two breakpoints, however, the second one is never reached. Execution goes into new FFProbe after I click "Continue" and never runs the probe.HasVideo().

image

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Thanks for helping locate the problem!
Could you move into the FFprobe class, and test if this line is reached: https://github.com/xupefei/QuickLook/blob/master/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffmpeg/FFprobe.cs#L54

  1. If no, can you execute ffprobe.exe -v quiet -print_format xml -show_streams -show_format "<something.mkv>" in command prompt?

  2. If (1) successes, try comment out this line p.StartInfo.StandardOutputEncoding = Encoding.UTF8; and debug again.

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

Execution (on FFprobe) hits the breakpoint, however, commenting p.StartInfo.StandardOutputEncoding = Encoding.UTF8; doesn't change the behaviour. Nothing still happens.

Executing the FFprobe command results in an empty XML file.
image

I also added a breakpoint after line 56 (result = p.StandardOutput.ReadToEnd();) and execution never hits it.

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

How about the next line? Does line 56 or 59 be reached?

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Okay, I think I have figured out the problem.
Could you try swap Line 54 and 56, i.e.,

result = p.StandardOutput.ReadToEnd();
p.WaitForExit();

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

Yep, that did the trick. It's working fine now :)

@xupefei
Copy link
Member

xupefei commented Nov 6, 2017

Thanks for the feedback! I will fix it now.

@artikweb
Copy link
Contributor Author

artikweb commented Nov 6, 2017

You're welcome! Glad I could help :)

@xupefei xupefei closed this as completed in 0e58091 Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants