xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.65k stars 92 forks source link

Get error msg "Invalid data found when processing input" When mouse hover on specified sound source. #1707

Closed zw963 closed 2 months ago

zw963 commented 3 months ago

Check following screenshot.

image

When i mouse hover on the sound source except the first one, get error message as above.

错误消息出现时,仍然能够听到声音,但是伴随很嘈杂的噪音,很沙哑的那种,几乎不可用。

I thought this issue probably related to #1540

Thanks.

Current used version:

goldendict-ng-git 24.05.13.r5565.06d4b62b-1 From Arch repo.

github-actions[bot] commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.

Check following screenshot.

image

When i mouse hover on the sound source except the first one, get error message as above.

When the error message appears, you can still hear the sound, but it is accompanied by a very loud noise, very scratchy, and almost unusable.

I thought this issue probably related to #1540

Thanks.

xiaoyifang commented 3 months ago

右键保存 audio .然后用其他播放器看下是否能正常播放。

另外是所有的单词都这样,还是个别单词,如果是个别单词,不排除是词典本身的问题。

github-actions[bot] commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.

Right-click to save the audio. Then use other players to see if it can play normally.

In addition, is this true for all words, or for individual words? If it is for individual words, it does not rule out that it is a problem with the dictionary itself.

zw963 commented 3 months ago

右键保存 audio .然后用其他播放器看下是否能正常播放。

另外是所有的单词都这样,还是个别单词,如果是个别单词,不排除是词典本身的问题。

因该是所有单词,只要这个单词存在如下截图的两个声音源,声音就会有问题。

image

我也上传了保存的声音文件到这里。

sounds.tar.gz

测试了下, vlc 可以正确播放没问题,mpv 播放时声音也很卡,和使用 goldendict 类似,goldendict 声音更差一些。

而且命令行播放时,输出好多错误。

 ╰─ $ mpv mediaenglishus_prontthithis_this__us_1.spx
 (+) Audio --aid=1 (speex 1ch 44100Hz)
AO: [pipewire] 44100Hz mono 1ch float
Error decoding audio.
Error decoding audio.

... 很多行一样的输出

Error decoding audio.
Error decoding audio.
A: 00:00:00 / 00:00:00 (70%)
Exiting... (End of file)

EDIT: 我通过将 sound back 设置改为 vlc --intf dummy --play-and-exit 临时的 workaround 了这个问题,现在声音正常了,但是感觉性能有些差,发音前能感觉到短暂等待。

github-actions[bot] commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.

Right-click to save the audio. Then use other players to see if it can play normally.

In addition, is this true for all words, or for individual words? If it is for individual words, it does not rule out that it is a problem with the dictionary itself.

Because it should be all words, as long as this word has two sound sources as shown in the screenshot below, there will be problems with the sound.

image

I also uploaded the saved sound files here.

sounds.tar.gz

After testing, vlc can be played correctly without any problem, and the sound is very stuck when playing mpv. It is similar to using goldendict, but the sound of goldendict is worse.

And when playing from the command line, a lot of errors are output.

 ╰─ $ mpv mediaenglishus_prontthithis_this__us_1.spx
 (+) Audio --aid=1 (speex 1ch 44100Hz)
AO: [pipewire] 44100Hz mono 1ch float
Error decoding audio.
Error decoding audio.

...many lines of the same output

Error decoding audio.
Error decoding audio.
A: 00:00:00 / 00:00:00 (70%)
Exiting... (End of file)
xiaoyifang commented 2 months ago

词典的声音如果有问题的话,需要词典制作者处理了

github-actions[bot] commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.

If there is a problem with the dictionary's voice, it needs to be addressed by the dictionary maker.

zw963 commented 2 months ago

词典的声音如果有问题的话,需要词典制作者处理了

  1. 如果你说是辞典的问题,但是 goldendict-git 里面的默认 QT multimedia 却工作的很好。(ffmpeg + libao 似乎同样的问题)

所以,我猜上面的问题应该 ng 都是可以解决的,而不是词典制作者处理,毕竟这些词典我用挺久的了。

github-actions[bot] commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.

If there is a problem with the dictionary’s voice, it needs to be addressed by the dictionary maker.

  1. If you say it is a dictionary problem, but the default QT multimedia in goldendict-git works very well. (ffmpeg + libao seems to have the same problem)

Therefore, I guess the above problems can be solved by ng rather than being handled by dictionary makers. After all, I have been using these dictionaries for a long time.

shenlebantongying commented 2 months ago

The audio works fine on macOS version. Test dict with the speex in question dsl.zip

This is a duplicate of https://github.com/xiaoyifang/goldendict-ng/issues/1612.

The root problem is that the newest FFmpeg (the one in Arch) has bugs on speex support.

VLC works because it invokes libspeex directly https://github.com/videolan/vlc/blob/309aecb876573d8240daab5d585d5efeaea1dc48/modules/codec/speex.c#L38

mpv doesn't work because it relies on FFmpeg.

default QT multimedia in goldendict-git works very well. (ffmpeg + libao seems to have the same problem)

In Qt5, the Qt multimedia uses GStreamer backend by default, which also supports speex.


A workaround is simply replacing qt6-multimedia-ffmpeg with qt6-multimedia-gstreamer for now.

https://archlinux.org/packages/extra/x86_64/qt6-multimedia-gstreamer/

xiaoyifang commented 2 months ago

2. 如果你说是辞典的问题,但是 goldendict-git 里面的默认 QT multimedia 却工作的很好。

目前gd-ng用的也是qtmultimedia. 不过qtmultimedia 在qt6.5之后用的底层也是ffmpeg。

这种问题, gd-ng目前不会处理的。

github-actions[bot] commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.

2. If you say it is a dictionary problem, but the default QT multimedia in goldendict-git works very well.

Currently, gd-ng also uses qtmultimedia. However, the bottom layer used by qtmultimedia after qt6.5 is also ffmpeg.

The root cause is still a problem with the voice file, which gd-ng will not currently handle.

shenlebantongying commented 2 months ago

Workaround in my above comment.

Related FFmpeg ticket-> https://trac.ffmpeg.org/ticket/11054

zw963 commented 2 months ago

A workaround is simply replacing qt6-multimedia-ffmpeg with qt6-multimedia-gstreamer for now.

I found i can install both package on Arch, they are not mutually exclusive.

 ╰─ $ pacman -Q |grep qt6-multimedia
qt6-multimedia 6.7.2-1
qt6-multimedia-ffmpeg 6.7.2-1
qt6-multimedia-gstreamer 6.7.2-1
shenlebantongying commented 2 months ago

Just uninstall one, or select a backend by setting env variable QT_MEDIA_BACKEND to gstreamer.

https://doc.qt.io/qt-6/qtmultimedia-index.html#changing-backends

zw963 commented 2 months ago

I switch to goldendict-ng, and try this issue again.

  1. When set global QT_MEDIA_BACKEND=gstreamer
  2. When change sound setting to QT as following screenshot

image

No any sound when mouse hover or click on icon, it still work when use vlc --intf dummy --play-and-exit

escape0707 commented 2 months ago

Yes. When I only install qt6-multimedia-gstreamer, and sue Qt Multimedia in goldendict-ng, the software won't pronounce anymore. I'll stick with using mplayer for the moment.