Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Moderators: helmut, XnTriq, xnview, Dreamer
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Version: 0.97.1, win 10 64 version 2004
Steps to reproduce:
- Start Xnview
- Navigate to a folder with a video and an image in explore mode
- Click on a video
- Click on an image
- Audio stream is now open until you close XnviewMP
Why is this important?
When audio stream is open, Windows cannot go to sleep mode on its own, because it thinks that something's trying to play sounds. To see if any audio streams are currently preventing windows from going to sleep, go to command line and type `powercfg -requests`.
It will say something like this:
SYSTEM:
[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_10EC&DEV_0899&SUBSYS_18491898&REV_1000\4&1d2c9eed&0&0001)
An audio stream is currently in use.
What should be happening?
XnView should be immediately closing audio streams after it's done using them.
Could it be related to the issue in explore mode where sometimes the videos don't start in preview when you click from one video to the next?
Example of what it looks like:
https://i.imgur.com/KdKO3yg.png
Steps to reproduce:
- Start Xnview
- Navigate to a folder with a video and an image in explore mode
- Click on a video
- Click on an image
- Audio stream is now open until you close XnviewMP
Why is this important?
When audio stream is open, Windows cannot go to sleep mode on its own, because it thinks that something's trying to play sounds. To see if any audio streams are currently preventing windows from going to sleep, go to command line and type `powercfg -requests`.
It will say something like this:
SYSTEM:
[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_10EC&DEV_0899&SUBSYS_18491898&REV_1000\4&1d2c9eed&0&0001)
An audio stream is currently in use.
What should be happening?
XnView should be immediately closing audio streams after it's done using them.
Could it be related to the issue in explore mode where sometimes the videos don't start in preview when you click from one video to the next?
Example of what it looks like:
https://i.imgur.com/KdKO3yg.png
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Tested this with .avi, .mp4, .webm, so the video format doesn't seem to make a difference.
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
I can't reproduce on my Win 10 (1903), you have that with all video format and each time?
Pierre.
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Yeah, just tested it again with different files and got the same result. Here's a video of me testing it: https://streamable.com/enpsk4
Does your powercfg -requests show an audio stream in use while the video is playing and stops showing it if you do the command after?
Can this be related to external audio/video codecs, like the ones from K-Lite Codec Pack or does XnView not use those?
Does your powercfg -requests show an audio stream in use while the video is playing and stops showing it if you do the command after?
Can this be related to external audio/video codecs, like the ones from K-Lite Codec Pack or does XnView not use those?
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
useInternalVideoPlayer is true in xnview.ini?
Pierre.
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Changing it to false doesn't change the behaviour. The audio stream is still shown as open in either situation.
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Ok, i understand now. But i use QtAV (based on FFMPEG), and i have no way to close audio stream.
Pierre.
-
- Posts: 29
- Joined: Sat Feb 08, 2020 1:35 pm
Re: Opening a preview for the video file in explore mode leaves the audio stream open until you close XnviewMP
Ah, okay then. If there's nothing in that library's functions about audio streams, then we're probably out of luck, unless you want to completely shut it down every time you deselect a video file.
I wonder if putting in a timer of, say, 15 or 30 minutes after you last used a video preview and forcefully shutting the QtAV after that is a good idea? If it's not a good idea, or it has some side effects, then this whole thing is probably not worth the effort.
For me, I just learned to close XnviewMP at the end of the day and not leave it open, so my computer can time out to sleep normally.
I wonder if putting in a timer of, say, 15 or 30 minutes after you last used a video preview and forcefully shutting the QtAV after that is a good idea? If it's not a good idea, or it has some side effects, then this whole thing is probably not worth the effort.
For me, I just learned to close XnviewMP at the end of the day and not leave it open, so my computer can time out to sleep normally.