Hang on exit after export

What is your operating system?
Windows 10

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
Shotcut v21.03.21 64-bit

Can you repeat the problem? If so, what are the steps?
(Please be specific and use the names as seen in Shotcut, preferably English. Include a screenshot or screen recording if you can. Also, you can attach logs from either View > Application Log or right-click a job and choose View Log.)

Shotcut hangs after performing an export. The video is exported successfully, but the application stops responding to Windows and must be terminated via the task manager. No other problems have been observed. The problem is repeatable. A Windows Event Log export is attached. Strip the .TXT extension before viewing. An application log is also attached.

Kind regards.

shotcut hang after export.evtx.txt (68 KB)
Shotcut application log.txt (32.6 KB)

Sorry but it does not happen to me, and I cannot tell from these. Did your computer go to sleep? This is a known issue unrelated to the export.

I would also wonder:

Do you recreate this frequently, or did it only happen with one specific project?

Were you able to monitor your RAM utilization during and after the export?

I would suggest to restart your computer, do not open any applications besides Shotcut and try the export again.

Dan, Brian,

Thank you for the suggestion. I’m not sure if my screen timeout invokes the system’s S3 sleep or not. The problem has happened on 4-5 different exports using different source materials. Since I usually step away for a while during exports, it’s possible there’s a sleep issue. I’ll put the system in high-performance mode to avoid anything going to sleep and I’ll try exporting again.

Cheers,
Ed

1 Like

Let us know if you find any more clues.

OK, I have more clues now:

The original observed connection between system sleep or screen blanking and the application hang appears to be spurious. Now is seems more likely that contention between applications and audio devices is the cause.

Reproducible error:

(1) Set the default audio device to SP/DIF and set:

  • Allow applications to take exclusive control of this device - ON
  • Give exclusive mode application priority - ON

(2) Start Shotcut, load a project, play a segment with audio. Check for expected audio behavior.

(3) Open another application (e.g. VLC) and play any audio to the same default audio device.

(4) Return to Shotcut. The played segment is stopped. It cannot be started again.

(5) Attempt to exit Shotcut. It is non-responsive and must be forced to stop using the task manager.

Note: This issue does not affect my USB audio devices, just the SP/DIF, which uses Microsoft HdAudio.sys version 10.0.19041 dated 5/9/2020. All audio enhancements and spatial sound are disabled.

So it appears that the application hang is somehow related to exclusive mode access to the sound device.

Hope this is helpful…

~Ed

These are some good clues.

Does the problem still occur if you disable these options on your SP/DIF device?

I am not able to reproduce this problem on my system - presumably because I do not have the same SPDIF device/driver. But hopefully this post can serve as a hint for other people who might experience the same problem.

Hi Brian,

Yes, if the specified options are disabled, the problem with Shotcut disappears. Unfortunately, it also disables the system’s ability to do SPDIF audio passthrough, since that requires exclusive access.

Workarounds:
* Switch exclusive mode controls back and forth between editing and playing exports with another
application.

 * Leave exclusive mode controls on and exit Shotcut before playing exports.

Hi: I have an SPDIF device, but I never tried this.
Why SPDIF during an edit in Shotcut, is there any advantage?
I’m just asking to make better use of my resources.

Note: A week ago I got a Realtek High Definition Audio driver modified so that the SPDIF output allows multichannel output (the most updated driver only allows stereo output and DTS, Dolby Digital are not enabled).

1 Like

Hello ejmillan:

Since Shotcut will not pass multichannel sound to the SPDIF device anyway, I’m not concerned about hearing multichannel sound while editing.

Sometimes, while I wait for Shotcut to render/export, I switch to VLC Player to watch a video with multichannel content (for example, a commercial movie). With exclusive access turned on for the SPDIF device, I can listen to the movie’s Dolby 5.1 sound (AC3 passthrough). In my case, the SPDIF output is connected to a Sony receiver via TOSLINK.

When I switch back to Shotcut to continue editing, the instant the internal player sends audio to the SPDIF device, Shotcut hangs.

To summarize, it appears that Shotcut can play audio through the SPDIF device, but once another application claims exclusive access to the device, Shotcut cannot claim it back. So if I edit/export, then watch a movie with VLC, then close VLC, Shotcut will still hang when trying to play a sound track.

I know this is a very specific issue, but it may provide clues to other audio playback issues that show up in this version of the application.

I have to try that. I never thought of that possibility, but Shotcut has a multi-channel configuration option so it would be interesting to check that…

It’s a specific problem. When I edit I always use headphones.
I also use Toslink for output to my A/V receiver but I don’t do that during an export.
Basically, I don’t have a dedicated amp (for bass or guitar) so I use effects emulator software for my fun times with instruments and this requires a lot of PC resources to minimise latency.

Yes, from the menu - Settings > Audio Channels > 6 (5.1).

Shotcut imports the first audio stream in the container file (MKV, TS, etc) and preserves the 5.1 channel data if present. If you choose the correct encoding when you export, the 5.1 data will be included in the exported file. It would be nice if Shotcut could read all of the container streams, but I’m satisfied with just importing the primary stream.

Also, don’t forget to use Shotcut’s support for hardware encoders. My Intel i7 processor supports Intel Quick Sync Video (QSV). I think most Intel processors since 2011 have some form of QSV. Look under Settings > Proxy > Use Hardware Encoder.

In one of my current projects, Shotcut renders about 45 frames per second (fps) with software encoding. When I select the “h264_qsv” or “hevc_qsv” options with hardware encoding enabled, the rate is around 170 fps.

Although I do many tasks in W10, Shotcut editing is mainly (but not exclusively) done in Linux Ubuntu Studio.
It allows proprietary drivers, so I can use Nvidia hardware encoding. I don’t usually measure the export speed but I did notice that it is less time consuming than software encoding.
In Ubuntu Studio, I use the JACK audio engine for low latency and it’s not like ASIO in W10, as it doesn’t require exclusivity, and this allows audio plugins to be connected between applications.
I have the computer with a dual boot and I can choose W10 or Linux.