openshot-qt icon indicating copy to clipboard operation
openshot-qt copied to clipboard

Audio accelerated and distorted in preview, but correct after export

Open katrinel-dot opened this issue 8 months ago • 7 comments

I am experiencing an issue with audio in OpenShot. During the preview of the video on the timeline, the audio plays in a sped-up and distorted manner, making it sound strange and unintelligible. However, when the video is exported, the audio plays correctly, as expected, with no acceleration or distortion. This problem occurs in any project I create, regardless of the audio file or settings used.

Steps to Reproduce the Issue: Open OpenShot and create a new project.

1- Import an audio file (e.g., MP3 or WAV).

2- Add the audio to the timeline.

3- Play the audio in the preview (editing screen). The audio will be accelerated and distorted.

4- Export the video. After exporting, the audio is correct, with no acceleration or distortion.

This bug started in the middle of a project where I made a whole introduction, it was playing well, I hibernate my pc and when I turn it on again it just breaks completely the audio. I tried seeing the old backups but all of them are strange like this one and when I create a new file it has the same corruption. I tried fresh-installing the OpenShot but nothing changed. Creating a new file doesn't solve the problem. Restarting the pc doesn't solve the problem. Nothing I tried solved the problem.

Additional Information: Operating System: Windows 10

OpenShot Version: latest (3.3.0)

Audio File Format: MP3/WAV (doesn't matter)

Project Settings: 30 fps

Hardware Acceleration: Disabled in OpenShot

Sample Rate: any

https://github.com/user-attachments/assets/ccc6f96c-452b-48f1-9205-f21ed8f38f7a

https://github.com/user-attachments/assets/bb0917f8-213e-4a62-9235-4c1abc4141aa

The first video is how it is playing as my almost final project The second video is how it was yesterday, before I added some things The problem did not star when I added stuff, but yes when I hibernated my pc.

katrinel-dot avatar Apr 22 '25 10:04 katrinel-dot

Hybernation and/or Sleep mode will cause issues for OpenShot. Often, the audio will not even play while editing.

Please do this:

  1. Close OpenShot, if running.
  2. Make a backup of c:\users\username.openshot_qt folder.
  3. Delete c:\users\username.openshot_qt folder.
  4. Restart your computer.
  5. Start OpenShot, open your project, and preview and see if the audio is good.

Hint: Whenver you are not working on your computer, ensure that your openshot project is saved and that OpenShot application is closed.

Colorjet3 avatar Apr 22 '25 20:04 Colorjet3

I tried and it still didn't work. Thanks for the quick reply tho.

katrinel-dot avatar Apr 22 '25 20:04 katrinel-dot

After reseting the pc completly (formatting the disk) the program works fine, but the problem isn't completly solved. The program itself corrupted into my system files because I fresh re-installed everything and still got the same issue. Continue replying to my original issue and I'll tell you if it worked or not, I have no idea how to replicate the issues but I tried literally everything.

katrinel-dot avatar Apr 22 '25 20:04 katrinel-dot

Hello @katrinel-dot I am a bit confused by your response.

You say "The program corrupted into my system files.....". What does this mean? Are you saying that installing OpenShot is corrupting your Windows 10? Please elaborate.

I am unable to replicate the issue in my environment.

Are you by any chance using a headset and/or a blue tooth audio device? If yes, then remove this device, restart your computer and try OpenShot again.

Colorjet3 avatar Apr 23 '25 17:04 Colorjet3

I am using windows 11. I am saying my windows files most likely interfered with the OpenShot itself and corrupted, even after re-installing, creating a new project, disconnect audio devices, disconnect Bluetooth adapters, reinstalling all the pc's drivers (not only sound). I tried using 2 different headsets, and both got the same problem, I recorded the video and the audio is accelerated with the preview itself, but when I export the video everything is fine, I changed the format of the audio to WAV, mp3 and mp2, but nothing changed. I got that the problem is just with the preview, video plays at a normal speed and the audio plays about 4x (tested with the same audio in audacity and 3x wasn't fast enough to get the openshot abnormal speed). Well after fresh installing windows everything was fine, so what I am saying is that the problem was: "openshot asking for windows for certain files like current audio device, current tick rate of the pc" Well it is between quotes because I have no idea if I am right but I think the connection between OpenShot and my headphones got corrupted in the way, changing a 1 to a 4.

If you have any more questions, I'd be happy to help. Software development isn't easy, and bugs are bound to happen—so I'm always glad to support you developers however I can.. After Sunday I don't need the openshot anymore so I can try to replicate the error.

katrinel-dot avatar Apr 23 '25 22:04 katrinel-dot

OpenShot does not work well with headsets. If you plug/unplug while OpenShot is open, that causes even more issues for OpenShot. The sample rate can get out of wack and the preview will suffer.

A few things to try:

  1. Whenever changing headsets or audio devices in general, ensure that OpenShot is first closed.

  2. Adjust Windows default audio sample rate:a. With OpenShot closed, go to Windows Control Panel, click on Hardware and Sound. b. In the Sound section click on "Manage audio devices". c. From the Sound screen find the output audio device that is set as "Default Device". Select it and click on Properties at the bottome of the page. d. Click on the Advanced tab and make a note of the sample rate in the "Default Format" section. e. Now start OpenShot, go to Edit | Preferences | Preview tab. f. Check to see if the "Default Audio Sample Rate" matches what you saw in step 2.d.

Headphones can have different sample rates vs. the normal 48000 or 44100 standard rates. You can change the headphone audio sample rate in Control Panel to something different that your headphones support and then restart OpenShot and see if that make it any better.

  1. Another option is to leave the Windows Control Panel sample rate as is, but in OpenShot, go to Edit | Preferences | Preview tab and change the "Playback Audio Device" from Default to "Windows Audio: yourdevice name" or "Direct Sound: yourdevicename". Each time you make a change make sure to restart OpenShot.

Colorjet3 avatar Apr 24 '25 13:04 Colorjet3

Any update on this @katrinel-dot?

Colorjet3 avatar May 01 '25 13:05 Colorjet3