Giter VIP home page Giter VIP logo

qtplayer's Introduction

基于Qt的多媒体播放器

这个播放器是大学时候做的毕业设计,使用qt+phonon实现,支持音视频播放,支持同步显示歌词。

主界面:

启动界面: 主界面如下图:

同步显示歌词:

安装方式:

以ubuntu为例:

安装依赖

sudo apt update
#安装qt环境:
sudo apt install qt4* -y
sudo apt install qtcreator -y
#安装phonon
sudo apt install build-essential phonon phonon-backend-gstreamer  phonon4qt5 phonon4qt5-backend-gstreamer -y
#安装解码器
sudo apt install ubuntu-restricted-extras -y

编译

终端进入项目目录,执行:

#生成Makrfile文件
qmake Player.pro
#编译
make
#运行
./Player

至此,你就可以看到启动界面了。

说明

phonon

因为phononqt5中貌似不支持了,所以建议使用qt4,另外phonon只是提供了媒体文件交互功能,并没有解码器,所以你的系统必须要有解码器支持。

歌词同步显示

歌词文件命名必须为歌曲文件名.lrc格式,以张国荣的怪你过分美丽这首歌为例:

歌曲文件:怪你过份美丽.mp3
歌词文件:怪你过份美丽.mp3.lrc

开始播放歌曲文件后,通过菜单->View->show lrc 来显示。

qtplayer's People

Contributors

liangliangyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qtplayer's Issues

App crashes on launch with: X Error of failed request: BadWindow (invalid Window parameter)

I get it compiled, but when I try to launch the app, it loads initial screen with progress bar and then crashes.
In terminal I get the following:

36-25% /Applications/MacPorts/QtPlayer.app/Contents/MacOS/Player
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Resource id in failed request:  0x10717710
  Serial number of failed request:  21
  Current serial number in output stream:  0

What may be going wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.