Bug 334197 - Dvb-t HD channels corrupt audio, slow video, but records fine.
Summary: Dvb-t HD channels corrupt audio, slow video, but records fine.
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Ubuntu Linux
: NOR major (vote)
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-01 23:03 UTC by kdebugs@lingaroo.com
Modified: 2017-10-04 09:05 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugs@lingaroo.com 2014-05-01 23:03:16 UTC
Worked perfectly on ubuntu 13.10.  
Problem apparent after fresh install of 14.04
Using pctv 290e USB stick and same config as before, all HD channels produce horrendously distorted audio and slow playback of video.  Recording via "instant record" works perfectly however even though the on-screen video is running way behind.
a w_scan with output for vlc and subsequent HD playback in vlc is perfect, so it's not the stick - this only happens in kaffeine.  
SD channels work perfectly.

Reproducible: Always

Steps to Reproduce:
1.  Open "digital TV"
2. Select any HD channel from the menu
3. double click
Actual Results:  
Horrendously Distorted audio / slow-motion video

Expected Results:  
clear audio and normal speed playback. (works fine in vlc)

Qt: 4.8.6
KDE Development Platform: 4.13.0
Vanilla ubuntu 14.04 out of the box install except for compiled bumblebee nvidia modules
Comment 1 basilic 2014-05-10 21:36:15 UTC
I have the same problem on a fresh install of Xubuntu 14.04

HD channel = Horrendously Distorted audio.

If record with Kaffeine and play with VLC the sound are OK

Open dvb with vlc all are OK.
Comment 2 Gunnar Degnbol 2014-05-18 19:48:04 UTC
Same problem in Ubuntu 14.04.

It sounds like 16-bit sound samples being interpreted as 8-bit samples. The high 8 bits of each sample, which are meaningful low-quality audio, are interlaced with the low 8 bits, which are random noise without the high bits. The result is slow sound with horrible noise.
Comment 3 Hadrien 2014-05-24 13:39:53 UTC
I built Kaffeine from the GIT repository on Ubuntu 14.04 x64, and that version runs without problem.
Comment 4 kdebugs@lingaroo.com 2014-05-24 21:25:31 UTC
Thanks Hadrien.  I just built it from the git repository and yes problem gone. (ver 1.3-git)
Comment 5 T 2014-06-10 11:26:13 UTC
Why was there a fault, is it a fixed bug, or just a bad compile in the repositories for 14.04?.

How about a link to the Git repository and some better instructions for mere mortals to fix this problem? Any idea when a fix will trickle through to Ubuntu?
Comment 6 kdebugs@lingaroo.com 2014-06-10 11:49:41 UTC
Hi T,
The version that comes with 14.04 uses xine as a playback engine, which is where the fault must lie (IMHO).  The newer version in the git repository uses vlc instead.  The instructions in the README file don't include the required livblc-dev library, so I've put it below.   It also didn't work for me unless I created a build directory and ran cmake from there.
Here is how I built mine and fixed the problem:

cd ~
sudo apt-get install g++ cmake git libqt4-dev kdelibs5-dev libx11-dev libxss-dev libvlc-dev
git clone git://anongit.kde.org/kaffeine
mkdir build
cd build
cmake ../kaffeine
make
sudo make install

that puts the kaffeine binary in /usr/local/bin which should be in your path, so just type kaffeine to run.

Hope that helps.
M
Comment 7 T 2014-06-10 13:09:54 UTC
Thanks very much for that, I'm testing the instructions now. Should 
help others as well.

Tony

kdebugs@lingaroo.com



-----Original Message-----
From: kdebugs <kdebugs@lingaroo.com>
To: drajdoyle <drajdoyle@aol.com>
Sent: Tue, 10 Jun 2014 12:49
Subject: [kaffeine] [Bug 334197] Dvb-t HD channels corrupt audio, slow 
video, but records fine.


https://bugs.kde.org/show_bug.cgi?id=334197

--- Comment #6 from kdebugs@lingaroo.com <kdebugs@lingaroo.com> ---
Hi T,
The version that comes with 14.04 uses xine as a playback engine, which 
is
where the fault must lie (IMHO).  The newer version in the git 
repository uses
vlc instead.  The instructions in the README file don't include the 
required
livblc-dev library, so I've put it below.   It also didn't work for me 
unless I
created a build directory and ran cmake from there.
Here is how I built mine and fixed the problem:

cd ~
sudo apt-get install g++ cmake git libqt4-dev kdelibs5-dev libx11-dev
libxss-dev libvlc-dev
git clone git://anongit.kde.org/kaffeine
mkdir build
cd build
cmake ../kaffeine
make
sudo make install

that puts the kaffeine binary in /usr/local/bin which should be in your 
path,
so just type kaffeine to run.

Hope that helps.
M

--
You are receiving this mail because:
You are on the CC list for the bug.
Comment 8 T 2014-06-10 13:17:13 UTC
The following packages have unmet dependencies.
  libvlc-dev : Depends: libvlc5 (= 2.1.4-0ubuntu14.04.1) but 2.1.5~ppa2 
is to be installed
E: Unable to correct problems, you have held broken packages.

>>>>>>>>

The build didn't work, either

CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:
QT_QT_INCLUDE_DIR
    used as include directory in directory 
/home/tony/build/CMakeFiles/CMakeTmp

CMake Error: Internal CMake error, TryCompile configure of cmake failed

CMake Error at 
/usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 
(message):
   Unable to compile a basic Qt application.  Qt has not been found 
correctly.
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/tony/build/CMakeFiles/CMakeOutput.log".
See also "/home/tony/build/CMakeFiles/CMakeError.log".

T.


-----Original Message-----
From: kdebugs <kdebugs@lingaroo.com>
To: drajdoyle <drajdoyle@aol.com>
Sent: Tue, 10 Jun 2014 12:49
Subject: [kaffeine] [Bug 334197] Dvb-t HD channels corrupt audio, slow 
video, but records fine.


https://bugs.kde.org/show_bug.cgi?id=334197

--- Comment #6 from kdebugs@lingaroo.com <kdebugs@lingaroo.com> ---
Hi T,
The version that comes with 14.04 uses xine as a playback engine, which 
is
where the fault must lie (IMHO).  The newer version in the git 
repository uses
vlc instead.  The instructions in the README file don't include the 
required
livblc-dev library, so I've put it below.   It also didn't work for me 
unless I
created a build directory and ran cmake from there.
Here is how I built mine and fixed the problem:

cd ~
sudo apt-get install g++ cmake git libqt4-dev kdelibs5-dev libx11-dev
libxss-dev libvlc-dev
git clone git://anongit.kde.org/kaffeine
mkdir build
cd build
cmake ../kaffeine
make
sudo make install

that puts the kaffeine binary in /usr/local/bin which should be in your 
path,
so just type kaffeine to run.

Hope that helps.
M

--
You are receiving this mail because:
You are on the CC list for the bug.
Comment 9 kdebugs@lingaroo.com 2014-06-10 13:35:03 UTC
Hi Tony,

The build won't work until the correctly libraries are installed.

The latest libvlc-dev from the official repositories is
libvlc-dev    2.1.4-0ubuntu14.04.1 

Your message indicates your system is trying to install version 2.1.5~ppa2, so looks like you have installed a ppa repository at some point which houses a newer version of libvlc-dev, which is not compatible, hence your problem

You will need to remove that repository, run a sudo apt-get update and try my instrucs again.
No point proceeding to the build until you can get the correct version of libvlc-dev installed.
To remove, you will need to identify which ppa you have added that is causing the problem, then remove it with
 sudo apt-add-repository -r <your ppa>

You can look in /etc/apt/sources.list.d to see if you can see which is the ppa causing the conflict.

M

>The following packages have unmet dependencies. libvlc-dev : Depends: libvlc5 (= >2.1.4-0ubuntu14.04.1) but 2.1.5~ppa2 is to be installed E: Unable to correct problems, you have >held broken packages.
Comment 10 kdebugs@lingaroo.com 2014-06-10 13:43:43 UTC
is this the one you have in /etc/apt/sources.list.d ?
if so,

sudo apt-add-repository -r ppa:mc3man/trusty-media
sudo apt-get update

You can always add the ppa again after you've built kaffeine
Comment 11 T 2014-06-10 14:33:59 UTC
Cheers for the help. I'll keep looking into why the Kaffeine compile 
didn't work.

/etc/apt/sources.list             is the correct link for the sources,

The problem is (probably)  updated VLC to try to try to fix the 8 bit 
sound on HD TV error.
I'll try to fix that, removing the PPA was not enough, I need to 
regress VLC .  Also, Multimedia settings are set to VLC so I can't 
uninstall easily.
Comment 12 Hadrien 2014-06-10 17:43:57 UTC
I don't know if this will help, but just in case, here is the procedure I used to build Kaffeine from Git on Ubuntu 14.04:

In a terminal:

sudo apt-get install build-essential
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install kdelibs4-dev
sudo apt-get install kdelibs5-dev
sudo apt-get install libxss-dev
sudo apt-get install libx11-dev
sudo apt-get install qt5-default
sudo apt-get install libvlc-dev

git clone git://anongit.kde.org/kaffeine
cd kaffeine
gedit CMakeLists.txt

Line 12 of, CMakeLists.txt, add this line: add_definitions(-fPIC)
...
11 : add_definitions(${KDE4_DEFINITIONS})
12 : add_definitions(-fPIC)
13 : if(STRICT_BUILD)
...

Again in the terminal:

cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
make
sudo make install
Comment 13 T 2014-06-10 18:15:29 UTC
Adding - add_definitions(-fPIC)   to CMakeLists.txt seemed to do the 
trick - compileing kaffeine 1.3-git

I now have HD TV sound back on 14.04.

however, note: kdelibs4-dev - didn't install.
Comment 14 Hadrien 2014-06-10 18:29:21 UTC
(In reply to comment #13)
> Adding - add_definitions(-fPIC)   to CMakeLists.txt seemed to do the 
> trick - compileing kaffeine 1.3-git
> 
> I now have HD TV sound back on 14.04.
> 
> however, note: kdelibs4-dev - didn't install.

kdelibs4-dev was probably not needed. I was in a retry&error mode until the build succeeded. It's nice you eventually got it working.

I hope an official new version will be released because the GIT build with VLC as the playback engine is really great. Switching channels is faster and the video decoding is smoother.
Comment 15 Christoph Feck 2014-07-21 13:38:49 UTC
Unless someone steps up as a new maintainer, there will be no release of the VLC-based version (which "needs some love", according to former maintainer).

See http://linuxgrandma.blogspot.de/2013/12/love-and-maintenance-needed-kaffeine.html

Since you seem to have the required hardware, how about joining the list and offer help?
Comment 16 Mauro Carvalho Chehab 2016-06-01 10:27:57 UTC
We just released version 2.0.1 of Kaffeine, with libVLC and using Qt5/KF5.

It should fix HD slowness, as it will use the GPU to accelerate video decoding.

Could you please test the upstream version and see if it works? The README file contains instructions about how to compile it. The dependencies there were updated to reflect the current needs for both Debian and Fedora. If you find the need of some extra package, please report for us to add there.

You can find it at our git repository:

https://quickgit.kde.org/?p=kaffeine.git

As this BZ is on an old version that we're not maintaining anymore, I'm closing the bug. If you find similar issues with version 2.0.1, please re-open.
Comment 17 Hadrien 2016-06-01 20:49:33 UTC
It's nice to see that the project is living.

So I tried the latest git code (commit 199edfa1c3bbcf20ce4b321e6f7dcfe288982303). Here are my remarks:
I'm on Ubuntu 16.04 so I looked in the README in the section about Debian. Those packages were not found with apt: libqt5-sql-sqlite libkf5kdbusaddons-dev, but I've been able to build the source anyway.

The program starts without problem but all my settings (including channels) were lost.

The TV does not work at all, I've got this error (in a terminal) when I start the program:
core libvlc error: No plugins found! Check your VLC installation.
01-06-16 22:45:48.202 [System  ] VlcMediaWidget::init: cannot create vlc instance ""
Comment 18 Hadrien 2016-06-01 20:53:21 UTC
(In reply to Hadrien from comment #17)
> The TV does not work at all, I've got this error (in a terminal) when I
> start the program:
> core libvlc error: No plugins found! Check your VLC installation.
> 01-06-16 22:45:48.202 [System  ] VlcMediaWidget::init: cannot create vlc
> instance ""

I tried to reinstall vlc and it fixed the problem:
sudo apt install vlc
Comment 19 Mauro Carvalho Chehab 2016-06-02 09:00:31 UTC
(In reply to Hadrien from comment #17)
> It's nice to see that the project is living.
> 
> So I tried the latest git code (commit
> 199edfa1c3bbcf20ce4b321e6f7dcfe288982303). Here are my remarks:
> I'm on Ubuntu 16.04 so I looked in the README in the section about Debian.
> Those packages were not found with apt: libqt5-sql-sqlite
> libkf5kdbusaddons-dev, but I've been able to build the source anyway.
> 
> The program starts without problem but all my settings (including channels)
> were lost.
> 
> The TV does not work at all, I've got this error (in a terminal) when I
> start the program:
> core libvlc error: No plugins found! Check your VLC installation.
> 01-06-16 22:45:48.202 [System  ] VlcMediaWidget::init: cannot create vlc
> instance ""

(In reply to Hadrien from comment #18)
> I tried to reinstall vlc and it fixed the problem:
> sudo apt install vlc

Hadrien,

Thanks for checking it! I double checked here, and indeed libqt5-sql-sqlite
and libkf5kdbusaddons-dev don't exist on Debian sid and on Ubuntu 16.04. So, I removed them from the README file and added "vlc".
Comment 20 Hadrien 2016-06-02 19:21:41 UTC
(In reply to Mauro Carvalho Chehab from comment #19)
> Thanks for checking it! I double checked here, and indeed libqt5-sql-sqlite
> and libkf5kdbusaddons-dev don't exist on Debian sid and on Ubuntu 16.04. So,
> I removed them from the README file and added "vlc".

Nice! Thanks for your work, Mauro.