Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 596822

Summary: <media-video/mplayer-1.3 fails to play some FLAC files
Product: Gentoo Linux Reporter: konsolebox <konsolebox>
Component: Current packagesAssignee: media-video herd <media-video>
Status: UNCONFIRMED ---    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch from Slackware

Description konsolebox 2016-10-11 08:10:52 UTC
Created attachment 449788 [details, diff]
Patch from Slackware

See https://www.linuxquestions.org/questions/slackware-14/mplayer-current-cant-play-some-flac-files-4175574554/ for details.

The attached fix patch is something I stole from Slackware.  See MPlayer.demux_lavf.flac.diff.gz	in http://mirrors.slackware.com/slackware/slackware-current/source/xap/MPlayer/.  Please give credit if possible if this is applied.

And here's how I applied it to the ebuild.

--- mplayer-1.2.1.ebuild.orig	2016-10-11 08:04:57.103870029 +0000
+++ mplayer-1.2.1.ebuild	2016-10-11 07:53:44.012877594 +0000
@@ -266,6 +266,8 @@
 		epatch "${FILESDIR}/${PN}-1.2-get_buffer.patch"
 		epatch "${FILESDIR}/${PN}-1.2_pre20150730-encode.patch"
 	fi
+
+	epatch "${FILESDIR}/${PN}-1.2-force-demux-flac-with-lavf.patch"
 }
 
 src_configure() {
Comment 1 konsolebox 2016-10-11 08:13:07 UTC
Sorry I meant mplayer 1.2.1.  I didn't try applying it with 1.2 (-r2).
Comment 2 alcyone 2017-10-25 18:18:16 UTC
Never had a problem with this before, but now I have with mplayer-1.3.0-r3. Due to various build errors I cannot emerge later versions of mplayer to test where this has changed.


$ mplayer *03*.flac
MPlayer 1.3.0-5.4.0 (C) 2000-2016 MPlayer Team

Playing Party Zone 2 - 03 - Urban Cookie Collective - Sail Away.flac.
libavformat version 57.83.100 (external)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 57.107.100 (external)
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
[flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x43614C66.
Audio: no sound
Video: no video


Exiting... (End of file)

$ mplayer -demuxer lavf *03*.flac
MPlayer 1.3.0-5.4.0 (C) 2000-2016 MPlayer Team

Playing Party Zone 2 - 03 - Urban Cookie Collective - Sail Away.flac.
libavformat version 57.83.100 (external)
libavformat file format detected.
[lavf] stream 0: audio (flac), -aid 0
Clip info:
 ARTIST: Urban Cookie Collective/ Sail Away
 ALBUM: Party Zone 2
 TITLE: Urban Cookie Collective/ Sail Away
 track: 03
 CDDB: 05116712
 REPLAYGAIN_REFERENCE_LOUDNESS: 89.0 dB
 REPLAYGAIN_TRACK_GAIN: -5.60 dB
 REPLAYGAIN_TRACK_PEAK: 0.86596680
 REPLAYGAIN_ALBUM_GAIN: -5.28 dB
 REPLAYGAIN_ALBUM_PEAK: 0.86596680
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 57.107.100 (external)
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   7.6 (07.6) of 203.9 (03:23.8)  0.8% 

Exiting... (Quit)


# emerge --info
Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r4, 4.13.4-gentoo-ayanami x86_64)
=================================================================
System uname: Linux-4.13.4-gentoo-ayanami-x86_64-AMD_FX-tm-9590_Eight-Core_Processor-with-gentoo-2.4.1
KiB Mem:    32841780 total,   3875092 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 25 Oct 2017 00:00:01 +0000
Head commit of repository gentoo: ba7a11d8dc579a245da74e765096468f178e4414
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.1::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.7.7/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=bdver2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=bdver2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://192.168.7.7/ http://trumpetti.atm.tut.fi/gentoo/ http://ftp.df.lth.se/pub/gentoo/ http://mirror.mdfnet.se/gentoo"
LANG="fi_FI.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/mnt/portagetmpfs"
USE="X a52 aac aacplus aacs aalib acl acpi alsa amd64 amr ass audiofile berkdb bluray branding bs2b bzip2 cairo cdda cddb cdparanoia cdr cjk cli cracklib crypt cups cxx dbus device-mapper dri dts dvb dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran g3dvl gdbm gegl gif glamor gsm gtk iconv java joystick jpeg jpeg2k lame lcms ldap libass libcaca libnotify lm_sensors lzma lzo mad mikmod mng modules mp3 mp4 mpeg multilib ncurses nls normalize nptl nvenc nvidia offensive ogg opengl openmp pam pango pcre pdf pgo png ppds qt3support readline rr232x rtc rtmp sdl seccomp session sift spell ssl startup-notification svg tcpd theora tiff truetype udev uiuc unicode usb uvm vaapi vcd vdpau vorbis vpx webp wxwidgets x264 x265 xattr xcb xcomposite xml xv xvfb xvid xvmc yuv4mpeg zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev joystick roccat_konepuremilitary" KERNEL="linux" L10N="fi en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fi en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="vesa nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 konsolebox 2017-10-25 22:52:35 UTC
(In reply to alcyone from comment #2)
> Never had a problem with this before, but now I have with mplayer-1.3.0-r3.
> Due to various build errors I cannot emerge later versions of mplayer to
> test where this has changed.
> 
> 
> $ mplayer *03*.flac
> MPlayer 1.3.0-5.4.0 (C) 2000-2016 MPlayer Team
> 
> Playing Party Zone 2 - 03 - Urban Cookie Collective - Sail Away.flac.
> libavformat version 57.83.100 (external)
> Audio only file format detected.
> Load subtitles in ./
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> libavcodec version 57.107.100 (external)
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> [flac @ 0x7f1661d7fec0]Got unexpected packet size after a partial decode
> ADecoder init failed :(
> ADecoder init failed :(
> Cannot find codec for audio format 0x43614C66.
> Audio: no sound
> Video: no video
> 
> 
> Exiting... (End of file)
> 
> $ mplayer -demuxer lavf *03*.flac
> MPlayer 1.3.0-5.4.0 (C) 2000-2016 MPlayer Team
> 
> Playing Party Zone 2 - 03 - Urban Cookie Collective - Sail Away.flac.
> libavformat version 57.83.100 (external)
> libavformat file format detected.
> [lavf] stream 0: audio (flac), -aid 0
> Clip info:
>  ARTIST: Urban Cookie Collective/ Sail Away
>  ALBUM: Party Zone 2
>  TITLE: Urban Cookie Collective/ Sail Away
>  track: 03
>  CDDB: 05116712
>  REPLAYGAIN_REFERENCE_LOUDNESS: 89.0 dB
>  REPLAYGAIN_TRACK_GAIN: -5.60 dB
>  REPLAYGAIN_TRACK_PEAK: 0.86596680
>  REPLAYGAIN_ALBUM_GAIN: -5.28 dB
>  REPLAYGAIN_ALBUM_PEAK: 0.86596680
> Load subtitles in ./
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> libavcodec version 57.107.100 (external)
> AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
> Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
> ==========================================================================
> AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
> Video: no video
> Starting playback...
> A:   7.6 (07.6) of 203.9 (03:23.8)  0.8% 
> 
> Exiting... (Quit)

I checked libmpdemux/demux_lavf.c of mplayer 1.3.0. It seems like "flac" is still not included there. Try applying the patch, or try manually adding "flac" in demux_lavf.c if you want to have "lavf" as a default demuxer.