Re: Playing certain downloaded youtube video files with audio works with vlc-player, but not with xine

Xavier Bachelot <[email protected]> Wed, 6 May 2020 23:54:57 +0200
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
On 4/24/20 8:25 PM, Ken Moffat via xine-devel wrote:
> On Fri, Apr 24, 2020 at 02:19:51PM +0000, Tirili via xine-devel wrote:
>> Using version 2020.03.24 of youtube-dl (see https://youtube-dl.org/) and running
>>
>> python youtube-dl https://www.youtube.com/watch?v=oDAFPDqQ7Yk
>>
>> to download a video (in this case it is a small example), an .mkv-file is created.
>> When you try to run this file using the vlc-player, everything works including audio,
>> but when you run it with xine on the same machine, you get the error message
>> "The stream '(filename)' uses an unsupported codec:
>> (null)Audio Codec: Opus Audio (ffmpeg)(0x0)
>> Sart playback anyway?"
>> with the two options "Yes" and "No".
>> When you click "yes", the file is played without sound.
>>
>> This bug could be reproduced by two other users in the freenode channel #xine,
>> so it seems to be independent of the user's system setup.
>>
>> I have already sent this bug to the xine-bugs mailing list, but I was told, that it might not be used anymore.
> 
> Youtube, and youtube-dl, have used opus for a while now.  Sounds
> like a distro problem, ffmpeg should be built against libopus, which
> comes from https://archive.mozilla.org/pub/opus/ - if you are
> building ffmpeg yourself, ensure that libopus is mentioned as an
> external library by the configure output, and similarly in Enabled
> decoders.  Otherwise, raise a ticket at your distro.
> 

I'm one of the 2 that tested the video after Tirili's request on IRC.
I'm testing on Fedora with xine-ui 0.99.12, xine-lib 1.2.10 and ffmpeg 
4.4.2 from RPM Fusion and no audio.

xine --verbose says :

ffmpeg_audio_dec: couldn't open decoder
audio_decoder: no plugin available to handle 'Opus Audio'

ffplay is playing the video with sound, so it seems to support the fact 
that the ffmpeg build is not the issue.

That is confirmed by the following :

$ ffplay -formats | grep -i opus
ffplay version 4.2.2 Copyright (c) 2003-2019 the FFmpeg developers
   built with gcc 10 (GCC)
   configuration: --prefix=/usr --bindir=/usr/bin 
--datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg 
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man 
--arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
-fstack-protector-strong -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 
--extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libvo-amrwbenc --enable-version3 --enable-bzlib 
--disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt 
--enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d 
--enable-libass --enable-libbluray --enable-libcdio --enable-libdrm 
--enable-libjack --enable-libfreetype --enable-libfribidi 
--enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal 
--enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus 
--enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr 
--enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis 
--enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvpx 
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg 
--enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc 
--enable-pthreads --disable-static --enable-shared --enable-gpl 
--disable-debug --disable-stripping --shlibdir=/usr/lib64 
--enable-libmfx --enable-runtime-cpudetect
   libavutil      56. 31.100 / 56. 31.100
   libavcodec     58. 54.100 / 58. 54.100
   libavformat    58. 29.100 / 58. 29.100
   libavdevice    58.  8.100 / 58.  8.100
   libavfilter     7. 57.100 /  7. 57.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  5.100 /  5.  5.100
   libswresample   3.  5.100 /  3.  5.100
   libpostproc    55.  5.100 / 55.  5.100
   E opus            Ogg Opus

I'm probably missing something, but I don't know what...
Any advice to debug further ?

Regards,
Xavier