Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Flac support?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 1:19 pm    Post subject: Flac support? Reply with quote

Hi,

I seem to have some troubles with flac and ffmpeg.

I have extracted some flac sounds from hydrogen drumkits.
Hydrogen plays them well (eventhough the sound is crapy but that's a problem with hydrogen), as well as flac123.
Xine also reads them without gstreamer support.

The problem is, I can't read them with ffplay or mplayer.
I have tried jack earlier this day and it worked with mplayer -ao jack foo.flac but the sound was worse than hydrogen.

file reports me that this files are:
Code:
test.flac: FLAC audio bitstream data, 16 bit, mono, 44.1 kHz, 17361 samples


ffplay:
Code:
» ffplay test.flac
[flac @ 0xb7f24670]Could not find codec parameters (Audio: flac)
test.flac: could not find codec parameters


mplayer:
Code:
» mplayer test.flac
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.86GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

Playing test.flac.
Audio file file format detected.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Unknown/missing audio format -> no sound
ADecoder init failed :(
Cannot find codec for audio format 0x43614C66.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Video: no video


Exiting... (End of file)


Is it normal to see that: [flac @ 0xb7f24670] and Cannot find codec for audio format 0x43614C66?

And finally, there is no 'flac' use flag for mplayer and ffmpeg, so is it unsupported?
Back to top
View user's profile Send private message
mattsteven
Apprentice
Apprentice


Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Mon Aug 20, 2007 1:24 pm    Post subject: Reply with quote

There are a few ebuilds out there that will use something if it's on the system even if there's no USE flag for it.

Try merging flac and then re-merge those programs. Also ensure ogg is in your use flags.
_________________
Matthew Steven
Linux-only desktop since 1998
Graying hair since 2006
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 1:45 pm    Post subject: Reply with quote

OK, so while I was compiling mplayer, I have checked the configure.log.

There is no 'flac' anywhere, which means that it is not even tested. If at least it was tested and not found, I could understand but that is weird.
The version I am using is media-video/mplayer-1.0.20070622-r1.

Plus, if you set the verbose level high, mplayer gives you the configure flags used for compilation:
Code:
» mplayer -v test.flac 2>/dev/null | grep Configuration:
Configuration: --cc=i686-pc-linux-gnu-gcc --host-cc=i686-pc-linux-gnu-gcc --prefix=/usr --confdir=/etc/mplayer --datadir=/usr/share/mplayer --libdir=/usr/lib --enable-largefiles --enable-menu --enable-network --disable-tv-bsdbt848 --disable-faad-external --disable-libcdio --enable-bl --disable-enca --disable-ftp --disable-vstream --disable-libdv --charset=UTF-8 --disable-lirc --disable-lircc --enable-joystick --disable-rtc --disable-dvb --disable-dvbhead --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-pvr --disable-pnm --disable-speex --disable-xanim --disable-twolame --disable-toolame --realcodecsdir=/opt/RealPlayer/codecs --disable-directfb --disable-ivtv --disable-ggi --disable-md5sum --disable-fbdev --disable-mga --disable-xmga --disable-vesa --disable-vidix-internal --disable-vidix-external --disable-zr --enable-gui --enable-xvmc --with-xvmclib=XvMCW --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-arts --disable-nas --disable-ossaudio --enable-runtime-cpudetection --disable-3dnow --disable-3dnowext --disable-ssse3 --disable-altivec


As you can see, where is no flac here either :(
Back to top
View user's profile Send private message
mattsteven
Apprentice
Apprentice


Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Mon Aug 20, 2007 2:34 pm    Post subject: Reply with quote

My mplayer at least uses ffmpeg to decode flac.
_________________
Matthew Steven
Linux-only desktop since 1998
Graying hair since 2006
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 6:21 pm    Post subject: Reply with quote

Yes, it tries, but even ffplay ffmpeg'splayer, doesn't play anything :s
Back to top
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Mon Aug 20, 2007 6:43 pm    Post subject: Reply with quote

That's odd - FLAC should be built into ffmpeg. What's the result of "nm -D /usr/lib/libavcodec.so | grep -i flac"? And what version of ffmpeg do you have installed?
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 7:03 pm    Post subject: Reply with quote

I got something if you check the symbols:

Code:
» nm -D /usr/lib/libavcodec.so | grep -i flac
0037c340 D flac_decoder
0037c380 D flac_encoder


And for my ffmpeg version:
Code:
media-video/ffmpeg-0.4.9_p20070325


By the way:
Code:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-dv1394 --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-pthreads --enable-xvid --enable-x11grab --enable-libogg --enable-libdts --enable-x264 --enable-libfaad --enable-libfaac --enable-amr-nb --enable-amr-wb --enable-amr-if2 --enable-gpl --enable-pp --disable-strip --enable-swscaler
Back to top
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Mon Aug 20, 2007 7:47 pm    Post subject: Reply with quote

You could try upgrading - I've got 20070330 installed (which is flagged stable, unlike 20070325).
Back to top
View user's profile Send private message
mattsteven
Apprentice
Apprentice


Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Mon Aug 20, 2007 7:49 pm    Post subject: Reply with quote

What happens when you try this?

Code:
 flac -c -d /path/to.flac | aplay


If you don't get good playback there your problem may be outside of flac and with your sound system.
_________________
Matthew Steven
Linux-only desktop since 1998
Graying hair since 2006
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 10:02 pm    Post subject: Reply with quote

Ahhh and unfortunately, it works :)
But the flac support is somewhere, hydrogen is using it, Wine as well.
mplayer and ffmpeg, or just ffmpeg seems to be the problem :s

So I suppose the problem doesn't come not from alsa (hydrogen is using alsa).

Maybe I should try another version ffmpeg...
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Mon Aug 20, 2007 10:19 pm    Post subject: Reply with quote

Updated to the most recent version in portage: "ffmpeg-0.4.9_p20070325"
Still no progress.

I stopped the compilation at some points to see some big multiple-lines compilation.
I saw some flac.c and flacenc.c so it's not hopeless :)
Back to top
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Mon Aug 20, 2007 10:53 pm    Post subject: Reply with quote

If "ffmpeg-0.4.9_p20070325" is the most recent version you have in portage then you need to update your tree - "0.4.9_p20070616-r1" is the most recent (with 0.4.9_p20070330 being the latest stable).
Back to top
View user's profile Send private message
LiLoRoX
n00b
n00b


Joined: 20 Jan 2007
Posts: 39
Location: Roanne (FR)

PostPosted: Tue Aug 21, 2007 8:08 am    Post subject: Reply with quote

Yes you're right. Actually, it isn't my most recent, I just didn't pay enough attention :)
And I don't remember why, but I blocked the 20070330 but now it is the version I have.

Anyway, I have discovered something.
I was always trying with the same flacs, so I decided to take a longer sound (the flac sounds I am using are1 or 2 seconds long).
I converted a wav to flac and it works.... (yeah sorry I suck :))
But not with all of them.
The short ones don't work with ffmpeg, only the ones longer than a few seconds apparently.... (less than 70 KB)

So finally, I can say it :)
It seems to be a bug from ffmpeg.
If you want to try the same sounds as I did, try to find some very short flac sounds or go there and try with any drumkit.
You can extract the flac from the h2drumkit files by simply renaming them to .tar.gz, the flacs are in a sub directory.

EDIT: submitted bug #189697
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum