Bug#881536: ffmpeg: Breaks sound in kodi

2017-12-16 Thread Stefan Hachmann
On Sat, 18 Nov 2017 16:18:10 + James Cowgill  wrote:

> Thanks. Reassigning the bug to kodi.
> 
> I think fixing the audio is easier than fixing the video (which only
> works due to a workaround patch in ffmpeg). Maybe removing this decode
> call is all that is needed?
> https://anonscm.debian.org/git/pkg-multimedia/kodi.git/tree/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp#n489

Yes, works fine after removal of decode call (with 17.6 from debian git[1]).
Thanks. :-)

[1] To compile it, directory 'kodi-17.6+dfsg1/addons/' have to be
completed with missing library.* directories ...

Best regards,
Stefan


Patch:
--- a/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
@@ -486,7 +486,7 @@
 // guess next pts
 m_audioClock += audioframe.duration;

-int ret = m_pAudioCodec->Decode(nullptr, 0, DVD_NOPTS_VALUE, 
DVD_NOPTS_VALUE);
+int ret = 0;
 if (ret < 0)
 {
   CLog::Log(LOGERROR, "CVideoPlayerAudio::DecodeFrame - Decode Error. 
Skipping audio packet (%d)", ret);

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Processed: Re: Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-18 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 kodi 2:17.3+dfsg1-5
Bug #881536 [ffmpeg] ffmpeg: Breaks sound in kodi
Bug reassigned from package 'ffmpeg' to 'kodi'.
No longer marked as found in versions ffmpeg/7:3.4-2.
Ignoring request to alter fixed versions of bug #881536 to the same values 
previously set
Bug #881536 [kodi] ffmpeg: Breaks sound in kodi
Marked as found in versions kodi/2:17.3+dfsg1-5.

-- 
881536: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881536
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-18 Thread James Cowgill
Control: reassign -1 kodi 2:17.3+dfsg1-5

Hi,

On 13/11/17 17:53, Robert Luberda wrote:
> Viktor Malyarchuk pisze:
> 
> Hi
> 
>> just want to confirm that
>>
>> gcc -shared shim.c -olibshim.so
>> LD_PRELOAD=$(pwd)/libshim.so kodi-standalone
>>
>> indeed fixed the audio problem with kodi.
> 
> I can confirm that too.

Thanks. Reassigning the bug to kodi.

I think fixing the audio is easier than fixing the video (which only
works due to a workaround patch in ffmpeg). Maybe removing this decode
call is all that is needed?
https://anonscm.debian.org/git/pkg-multimedia/kodi.git/tree/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp#n489

James



signature.asc
Description: OpenPGP digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-15 Thread maze
> I can
> reproduce the bug, but only for videos containing aac audio and only
> in
> kodi.

Affects .mp2 audio used in live tv streams (.ts) as well.
The workaround fixes that as well, though. 

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-14 Thread Fabian Greffrath
Am Montag, den 13.11.2017, 18:53 +0100 schrieb Robert Luberda:
> I can confirm that too.

Impressive! Good work, James.

 - Fabian


signature.asc
Description: This is a digitally signed message part
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-13 Thread Robert Luberda
Viktor Malyarchuk pisze:

Hi

> just want to confirm that
> 
> gcc -shared shim.c -olibshim.so
> LD_PRELOAD=$(pwd)/libshim.so kodi-standalone
> 
> indeed fixed the audio problem with kodi.

I can confirm that too.

Thanks a lot,
robert

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-12 Thread Viktor Malyarchuk
Hi James,

just want to confirm that

gcc -shared shim.c -olibshim.so
LD_PRELOAD=$(pwd)/libshim.so kodi-standalone

indeed fixed the audio problem with kodi.

Best regards,
Viktor Malyarchuk
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-12 Thread James Cowgill
Hi,

On 12/11/17 20:32, Robert Luberda wrote:
> Package: ffmpeg
> Version: 7:3.4-2
> Severity: important
> 
> The latest ffmpeg makes sound in kodi to be scratchy, i.e. containing some 
> additional noise that makes watching videos in kodi uncomfortable/annoying.
> 
> Downgrading ffmpeg and dependent libraries to version 3.3.4-2+b3 fixes the
> issue (makes sound in kodi clear).

This is likely to be related to #879673 / #881286 which has a workaround
which I hoped would work, but doesn't seem to in every case. I can
reproduce the bug, but only for videos containing aac audio and only in
kodi.

I have attached a LD_PRELOAD shim which will cause any drain packets
sent to avcodec_decode_audio4 to be dropped (see the above bugs and
links for why this may be relevant). Could you compile it and run kodi
like this:

 gcc -shared shim.c -olibshim.so
 LD_PRELOAD=$(pwd)/libshim.so kodi-standalone

If that fixes your audio problems, then this is almost certainly #881286
in kodi (where kodi flagrantly violates the ffmpeg API).

Thanks,
James
#define _GNU_SOURCE
#include 
#include 

// Mini version of AVPacket
typedef struct AVPacket {
   void *buf;
   int64_t pts;
   int64_t dts;
   uint8_t *data;
   int   size;
} AVPacket;

int avcodec_decode_audio4(void* a, void* b, int* got_frame_ptr, const AVPacket* pkt)
{
// Ignore null packets
if (pkt->size == 0)
{
*got_frame_ptr = 0;
return 0;
}

// Forward to real function
int (*orig_decode)(void*, void*, int*, const AVPacket*) =
dlsym(RTLD_NEXT, "avcodec_decode_audio4");
return orig_decode(a, b, got_frame_ptr, pkt);
}


signature.asc
Description: OpenPGP digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#881536: ffmpeg: Breaks sound in kodi

2017-11-12 Thread Robert Luberda
Package: ffmpeg
Version: 7:3.4-2
Severity: important

The latest ffmpeg makes sound in kodi to be scratchy, i.e. containing some 
additional noise that makes watching videos in kodi uncomfortable/annoying.

Downgrading ffmpeg and dependent libraries to version 3.3.4-2+b3 fixes the
issue (makes sound in kodi clear).

Regards,
robert


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (990, 'unstable-debug'), (990, 'stable-updates'), (990, 
'unstable'), (990, 'testing'), (990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), 
LANGUAGE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ffmpeg depends on:
ii  libavcodec577:3.4-2
ii  libavdevice57   7:3.4-2
ii  libavfilter67:3.4-2
ii  libavformat57   7:3.4-2
ii  libavresample3  7:3.4-2
ii  libavutil55 7:3.4-2
ii  libc6   2.24-17
ii  libpostproc54   7:3.4-2
ii  libsdl2-2.0-0   2.0.7+dfsg1-3
ii  libswresample2  7:3.4-2
ii  libswscale4 7:3.4-2

ffmpeg recommends no packages.

Versions of packages ffmpeg suggests:
pn  ffmpeg-doc  

-- no debconf information

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers