msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.3k stars 1.22k forks source link

Gstreamer: sound distortion #4161

Closed vedard closed 6 years ago

vedard commented 6 years ago

Hi, i'm having a problem while playing an audio file with gstreamer in a music player that i've made. The sound is really distorted. I can reproduce this with gst-play:

$ gst-play-1.0.exe test.mp3
(gst-play-1.0:8928): GStreamer-WARNING **: 00:05:00.642: Failed to load plugin 'C:\msys64\mingw32\lib\gstreamer-1.0\libgstopencv.dll': 'C:\msys64\mingw32\lib\gstreamer-1.0\libgstopencv.dll': The specified module could not be found.

The 'C:\msys64\mingw32\lib\gstreamer-1.0\libgstopencv.dll' exists

Here is the related package i have installed:

mingw-w64-i686-SDL2
mingw-w64-i686-a52dec
mingw-w64-i686-adwaita-icon-theme
mingw-w64-i686-atk
mingw-w64-i686-binutils
mingw-w64-i686-brotli
mingw-w64-i686-bzip2
mingw-w64-i686-c-ares
mingw-w64-i686-ca-certificates
mingw-w64-i686-cairo
mingw-w64-i686-chromaprint
mingw-w64-i686-crt-git
mingw-w64-i686-curl
mingw-w64-i686-daala-git
mingw-w64-i686-djvulibre
mingw-w64-i686-expat
mingw-w64-i686-faac
mingw-w64-i686-faad2
mingw-w64-i686-fdk-aac
mingw-w64-i686-fftw
mingw-w64-i686-flac
mingw-w64-i686-flif
mingw-w64-i686-fluidsynth
mingw-w64-i686-fontconfig
mingw-w64-i686-freeglut
mingw-w64-i686-freetype
mingw-w64-i686-fribidi
mingw-w64-i686-gcc
mingw-w64-i686-gcc-libgfortran
mingw-w64-i686-gcc-libs
mingw-w64-i686-gdk-pixbuf2
mingw-w64-i686-gettext
mingw-w64-i686-giflib
mingw-w64-i686-glib-networking
mingw-w64-i686-glib2
mingw-w64-i686-gmp
mingw-w64-i686-gnutls
mingw-w64-i686-gobject-introspection-runtime
mingw-w64-i686-graphene
mingw-w64-i686-graphite2
mingw-w64-i686-gsfonts
mingw-w64-i686-gsl
mingw-w64-i686-gsm
mingw-w64-i686-gst-libav
mingw-w64-i686-gst-plugins-bad
mingw-w64-i686-gst-plugins-base
mingw-w64-i686-gst-plugins-good
mingw-w64-i686-gst-plugins-ugly
mingw-w64-i686-gst-python
mingw-w64-i686-gstreamer
mingw-w64-i686-gtk3
mingw-w64-i686-harfbuzz
mingw-w64-i686-headers-git
mingw-w64-i686-hicolor-icon-theme
mingw-w64-i686-ilmbase
mingw-w64-i686-imagemagick
mingw-w64-i686-intel-tbb
mingw-w64-i686-isl
mingw-w64-i686-jansson
mingw-w64-i686-jasper
mingw-w64-i686-jbigkit
mingw-w64-i686-json-glib
mingw-w64-i686-l-smash
mingw-w64-i686-ladspa-sdk
mingw-w64-i686-lame
mingw-w64-i686-lcms2
mingw-w64-i686-libass
mingw-w64-i686-libbs2b
mingw-w64-i686-libcaca
mingw-w64-i686-libcddb
mingw-w64-i686-libcdio
mingw-w64-i686-libcroco
mingw-w64-i686-libdca
mingw-w64-i686-libdvdcss
mingw-w64-i686-libdvdnav
mingw-w64-i686-libdvdread
mingw-w64-i686-libepoxy
mingw-w64-i686-libexif
mingw-w64-i686-libffi
mingw-w64-i686-libgcrypt
mingw-w64-i686-libgme
mingw-w64-i686-libgpg-error
mingw-w64-i686-libiconv
mingw-w64-i686-libidn2
mingw-w64-i686-libjpeg-turbo
mingw-w64-i686-liblqr
mingw-w64-i686-libmetalink
mingw-w64-i686-libmodplug
mingw-w64-i686-libmpeg2-git
mingw-w64-i686-libnice
mingw-w64-i686-libogg
mingw-w64-i686-libpng
mingw-w64-i686-libpsl
mingw-w64-i686-libraqm
mingw-w64-i686-librsvg
mingw-w64-i686-libshout
mingw-w64-i686-libsndfile
mingw-w64-i686-libsoup
mingw-w64-i686-libsrtp
mingw-w64-i686-libssh2
mingw-w64-i686-libsystre
mingw-w64-i686-libtasn1
mingw-w64-i686-libtheora
mingw-w64-i686-libtiff
mingw-w64-i686-libtool
mingw-w64-i686-libtre-git
mingw-w64-i686-libunistring
mingw-w64-i686-libvorbis
mingw-w64-i686-libvorbisidec-svn
mingw-w64-i686-libvpx
mingw-w64-i686-libwebp
mingw-w64-i686-libwinpthread-git
mingw-w64-i686-libxml2
mingw-w64-i686-libxslt
mingw-w64-i686-lzo2
mingw-w64-i686-mpc
mingw-w64-i686-mpdecimal
mingw-w64-i686-mpfr
mingw-w64-i686-mpg123
mingw-w64-i686-ncurses
mingw-w64-i686-nettle
mingw-w64-i686-nghttp2
mingw-w64-i686-openal
mingw-w64-i686-openblas
mingw-w64-i686-opencore-amr
mingw-w64-i686-opencv
mingw-w64-i686-openexr
mingw-w64-i686-openh264
mingw-w64-i686-openjpeg2
mingw-w64-i686-openssl
mingw-w64-i686-opus
mingw-w64-i686-orc
mingw-w64-i686-p11-kit
mingw-w64-i686-pango
mingw-w64-i686-pcre
mingw-w64-i686-pixman
mingw-w64-i686-portaudio
mingw-w64-i686-pygobject-devel
mingw-w64-i686-python3
mingw-w64-i686-python3-cairo
mingw-w64-i686-python3-gobject
mingw-w64-i686-python3-lxml
mingw-w64-i686-python3-pip
mingw-w64-i686-python3-setuptools
mingw-w64-i686-readline
mingw-w64-i686-rtmpdump-git
mingw-w64-i686-shared-mime-info
mingw-w64-i686-soundtouch
mingw-w64-i686-speex
mingw-w64-i686-speexdsp
mingw-w64-i686-sqlite3
mingw-w64-i686-srt
mingw-w64-i686-swig
mingw-w64-i686-taglib
mingw-w64-i686-tcl
mingw-w64-i686-termcap
mingw-w64-i686-tk
mingw-w64-i686-ttf-dejavu
mingw-w64-i686-twolame
mingw-w64-i686-vo-amrwbenc
mingw-w64-i686-vulkan
mingw-w64-i686-wavpack
mingw-w64-i686-windows-default-manifest
mingw-w64-i686-wineditline
mingw-w64-i686-winpthreads-git
mingw-w64-i686-x264-git
mingw-w64-i686-x265
mingw-w64-i686-xz
mingw-w64-i686-zbar
mingw-w64-i686-zlib
lazka commented 6 years ago

That's because recent gstreamer switched from directsoundsink to wasapisink by default, but the later has still problems. This might work: gst-play-1.0.exe --audiosink directsoundsink

The opencv element is likely erroring out because opencv isn't installed, but unless you need it you can ignore the error.

Alexpux commented 6 years ago

The problem here is that gst-plugins-bad not rebuilded after opencv updated

Alexpux commented 6 years ago

Seems gst plugin for opencv need to be fixed for opencv-3.4.2:

../../../gst-plugins-bad-1.14.2/ext/opencv/gsthanddetect.cpp:497:40: error: 'CV_RGB' was not declared in this scope
         cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0);
                                        ^~~~~~
../../../gst-plugins-bad-1.14.2/ext/opencv/gsthanddetect.cpp:497:40: note: suggested alternative: 'CV_C'
         cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0);
                                        ^~~~~~
                                        CV_C
../../../gst-plugins-bad-1.14.2/ext/opencv/gsthanddetect.cpp:603:42: error: 'CV_RGB' was not declared in this scope
           cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0);
                                          ^~~~~~
../../../gst-plugins-bad-1.14.2/ext/opencv/gsthanddetect.cpp:603:42: note: suggested alternative: 'CV_C'
           cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0);
                                          ^~~~~~
                                          CV_C
../../../gst-plugins-bad-1.14.2/ext/opencv/gsttemplatematch.cpp: In function 'GstFlowReturn gst_template_match_transform_ip(GstOpencvVideoFilter*, GstBuffer*, IplImage*)':
../../../gst-plugins-bad-1.14.2/ext/opencv/gsttemplatematch.cpp:376:17: error: 'CV_RGB' was not declared in this scope
         color = CV_RGB (255, 255 - pow (255, best_res), 32);
                 ^~~~~~
../../../gst-plugins-bad-1.14.2/ext/opencv/gsttemplatematch.cpp:376:17: note: suggested alternative: 'CV_C'
         color = CV_RGB (255, 255 - pow (255, best_res), 32);
                 ^~~~~~
                 CV_C
../../../gst-plugins-bad-1.14.2/ext/opencv/gsttemplatematch.cpp:378:17: error: 'CV_RGB' was not declared in this scope
         color = CV_RGB (255, 32, 32);
                 ^~~~~~
../../../gst-plugins-bad-1.14.2/ext/opencv/gsttemplatematch.cpp:378:17: note: suggested alternative: 'CV_C'
         color = CV_RGB (255, 32, 32);
                 ^~~~~~
                 CV_C
lazka commented 6 years ago

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c247745faaf885fd3fa094198fc0ea288e295dbf

Alexpux commented 6 years ago

@lazka thanks for link

vedard commented 6 years ago

The directsoundsink fix my problem. Thanks you!