flaviotordini / minitube

YouTube app
https://flavio.tordini.org/minitube
GNU General Public License v3.0
366 stars 73 forks source link

Built minitube 3.0 with compiled `libmpv` on Ubuntu 18.04LTS. Video playback has no sound. #129

Open pc-magas opened 5 years ago

pc-magas commented 5 years ago

On ubuntu 18.04LTS I managed to built the minitube using a compiled version of libmpv.

First of all I installed the minitube requirements:

sudo apt install build-essential qt5-default qttools5-dev-tools qt5-qmake qtdeclarative5-dev libqt5sql5-sqlite libqt5x11extras5-dev libmpv-dev

Then I build the libmpv like this:

# Remove old libmpv
sudo apt-get purge libmpv && sudo apt-get autoremove
#Build later version
git clone https://github.com/mpv-player/mpv-build
cd mpv-build
echo --enable-libmpv-shared > mpv_options
./use-mpv-custom v0.29.0
./update
./rebuild -j4
sudo ./install

Afterwards I tried to build the minitube:

cd
git clone --recursive https://github.com/flaviotordini/minitube.git
qmake "DEFINES += APP_GOOGLE_API_KEY=YourAPIKeyHere"
make

And I run the locally-built minitube executable using these commands:

chmod +x build/target/minitube
build/target/minitube

Afterwards I searched for a video and played. The video plays but without sound also is not too smooth either? I assume that the libmpv libraries needs some extra? What I am missing?

flaviotordini commented 5 years ago

No, MPV doesn't need any extra. Maybe this has to do with what MPV configure has found on your system? Probably it needs headers (-dev packages) for, say, PulseAudio, OpenGL, etc.

pc-magas commented 5 years ago

I re-attempted it on a fresh installation of Ubuntu 18.04LTS. The steps I followed to build the minitube were:

1. Installation of libmpv 0.29.0:

  1. Depedency Istallation:
    sudo apt-get install git dh-autoreconf build-essential libfreetype6-dev libfribidi-dev libfontconfig1-dev yasm libmp3lame-dev libx264-dev libfdk-aac-dev python
  2. Get the buildscripts:
    git clone https://github.com/mpv-player/mpv-build.git
  3. Build libmpv with required settings:
    cd mpv-build
    echo --enable-libx264 >> ffmpeg_options
    echo --enable-libmp3lame >> ffmpeg_options
    echo --enable-libfdk-aac >> ffmpeg_options
    echo --enable-nonfree >> ffmpeg_options
    echo --enable-libmpv-shared > mpv_options
    ./use-mpv-custom v0.29.0
    ./update
    ./rebuild -j4
    sudo ./install
    cd ..

2. Installation of minitube via source code:

  1. Get dependencies (Excluding built libmpv)
sudo apt install build-essential qt5-default qttools5-dev-tools qt5-qmake qtdeclarative5-dev libqt5sql5-sqlite libqt5x11extras5-dev
  1. Clone minitube source code:

    git clone --recursive https://github.com/flaviotordini/minitube.git
  2. Build minitube:

    git checkout -b v3.0 3.0
    qmake "DEFINES += APP_GOOGLE_API_KEY=^API_KEY^"
    make

And the question when I launch the minitube I get the following response (video file): https://tinyurl.com/display-mintube

As you can see instead of playing the video it just hops to another one. So I wonder what's wrong.

flaviotordini commented 5 years ago

It has to do with libmpv. Maybe your build does not support HTTPS or something. Add DEFINES-=QT_NO_DEBUG_OUTPUT to qmake invokation to get debug messages.

pc-magas commented 5 years ago

I did that and got the following errors in my console:

[unknown] QObject::connect: invalid null parameter
[unknown] Cannot get video info
[unknown] QCoreApplication::postEvent: Unexpected null receiver
[unknown]   OpenType support missing for "Ubuntu", script 32
[unknown]   OpenType support missing for "Ubuntu", script 32
[unknown]   OpenType support missing for "Ubuntu", script 32
[unknown]   OpenType support missing for "Ubuntu", script 11
[unknown]   OpenType support missing for "Ubuntu", script 11
[unknown]   OpenType support missing for "Ubuntu", script 11

I also followed theese steps to rebuild the minitube as well as well:

I rebuilt and reinstalled the libmpv after reinstalling the libssl1.0-dev package.

Then afterwards I rebuilt the minitube:

qmake "DEFINES += APP_GOOGLE_API_KEY=^my_api_key^" "DEFINES-=QT_NO_DEBUG_OUTPUT" "LIBS+=/usr/local/lib/libmpv.so"
make clean
make
./build/target/minitube

I retried to launch it and I get the following errors:

[unknown] QObject::connect: invalid null parameter
[unknown]   OpenType support missing for "Ubuntu", script 11
[unknown]   OpenType support missing for "Ubuntu", script 11
[unknown] QCoreApplication::postEvent: Unexpected null receiver

I did manage to make the [unknown] Cannot get video info error but still the player jumps around to the videos and failt to play them.

mc4man commented 5 years ago

you can get a 3.1 minitube package for 18.04 here https://launchpad.net/~mc3man/+archive/ubuntu/bionic-media Note: at this point probably best to forget about minitube, nonsense..

benchile55 commented 4 years ago

@pc-magas @flaviotordini The same happens running minitube 3.3 in Manjaro linux I also tried inserting in mpv.conf:

cannot load libcuda.so.1

hwdec=auto ytdl-format=bestvideo[height<=?1080][vcodec!=?vp9]+bestaudio/best

But it still keeps skipping url tracks, and from time to time (after 3-5 skips) plays a video.. image