transcoding from FLAC

Posted by: reedes

transcoding from FLAC - 05/08/2002 07:58

This is experimental, but may be of interest.

I'm listening to a flac-encoded track on my Rio Receiver right now.

For those unfamilar with flac, it's a lossless audio codec. The quality isn't diminished from that ripped from the CD.

Using JRec, it can be transcoded to MP3 (losing something in the transistion no doubt) in order to play on the Rio using the following transcoder command:

/bin/sh -c '/usr/local/bin/flac -d -s - | /usr/local/bin/lame -ms -- silent -'

I call this experimental because the standard Rio client will not automatically switch to the next song at the end of a song. I haven't tried the other Rio clients yet, but it should be possible to modify them if necessary to force a track switch when the data for a song ends.

Or better yet, native flac support would be preferred and would eliminate the transcoding step.

A minor fix to jrec was needed to support this. It's in CVS now.

--Reed (http://jreceiver.sourceforge.net)
Posted by: reedes

Re: transcoding from FLAC - 06/08/2002 20:22

An update:

Like the standard client, it appears that Rioplay is unable to transition from the completed play of a transcoded tune (of arbitrary length) to the next tune in a playlist. Tried with both ogg->mp3 and flac->mp3 transcodings.

The Reza client doesn't appear to work with jrec yet and hangs during initialization. Either that or I don't have it properly configured yet.

--Reed
Posted by: dionysus

Re: transcoding from FLAC - 11/08/2002 01:44

You're probably missing your favourites for Reza's client.. check this message:

http://rioreceiver.comms.net/php/showthreaded.php?Cat=&Board=Technical&Number=2166&page=0&view=collapsed&sb=5&o=7


-mark
Posted by: mef

Re: transcoding from FLAC - 12/08/2002 11:02

How many people actually or would prefer to use FLAC as their native storage format for audio?
Posted by: reedes

Re: transcoding from FLAC - 12/08/2002 12:01

I prefer a lossless storage format for a couple of reasons:

First, lossy encoders can introduce artifacts. For those who are encoding large CD collections, it requires that either they tolerate those artifacts or spend time (lots of it no doubt) to eliminate them.

Second, the price of large hard drives continues to drop, so larger audio files aren't as much of an issue.

I have no clue what is planned for the alternative Rio clients, but if they should decide to support flac or another lossless format, it's fairly trivial to host from jrec.

--Reed (http://jreceiver.sourceforge.net)
Posted by: dionysus

Re: transcoding from FLAC - 12/08/2002 12:23

What's the point if you have to convert to mp3 before playback on the rio receiver?

(or can native flac support be put into the receiver?)

How big are those files anyways (for an album?)

-m

Posted by: andy

Re: transcoding from FLAC - 12/08/2002 15:09

We can't add native FLAC support to the standard client. However we have a choice of two alternate client apps now, so it could be added to them quite easily.
Posted by: reedes

Re: transcoding from FLAC - 12/08/2002 17:02

> What's the point if you have to convert to mp3 before
> playback on the rio receiver?

Ideally the Rio client would support multiple formats (mp3, ogg, flac, etc.) natively. Where it cannot it should be able to play audio that's been transcoded by the server and support track switching on files of indeterminate length.

> How big are those files anyways (for an album?)

Roughly 3x the size of an MP3 encoded at 256kbps.

http://flac.sourceforge.net/comparison.html

Scroll down to see the compression ratios for the different lossless codecs.

--Reed (http://jreceiver.sourceforge.net)
Posted by: dschuetz

Re: transcoding from FLAC - 13/08/2002 09:43

> What's the point if you have to convert to mp3 before
> playback on the rio receiver?

Archives, or playback on non-Rio hardware. If I'm going to go through the trouble to re-rip my entire collection (and now that I have an 18-CD SCSI jukebox, I'm looking at doing that), I want to only do it once. If I can possibly find a good lossless format, then it makes sense to rip it to that format and use that as the basis for later, downgraded, files.

If you can automatically transcode, even better -- then WinAmp could play (maybe), ogg transcodings of flac files (unless you could get a flac plugin), while the Rio gets 256k MP3s. And when you hook up your walkman, it gets 96-128k (depending on whether you're planning to be jogging or fishing ). All from one "flawless" source.

Maybe.

Can flac be put into the Rio? Not into the native client (there are no hooks for expanding that), but the alternative clients that are popping up might be made to support it. However, the same problems that came with Ogg come with FLAC or anything else -- the Rio only does integer math. So you need a good, fast, integer-only decoder.

Posted by: reedes

Re: transcoding from FLAC - 13/08/2002 10:21

dschuetz wrote:

> the same problems that came with Ogg come with FLAC or
> anything else -- the Rio only does integer math. So you
> need a good, fast, integer-only decoder.

Covered. From the flac feature page:

"FLAC is asymmetric in favor of decode speed. Decoding
requires only integer arithmetic, and is much less compute-intensive than for most perceptual codecs. Real-time decode performance is easily achievable on even modest hardare."

The other lossless codecs may be similar but I haven't checked.

Your mention of downgrading gets me to thinking. The Jrec server supports transcoding between formats. It could also transparently support downgrades -- allowing the bulk download of playlists of highly-compressed mp3 from your pristine flac source for burning on CD or storing on a portable mp3 player where space is at a premium. Ideally, it'll cache the compressed tracks on an LRU basis to avoid re-compression of the most frequently 'downgraded' tracks.

--Reed http://jreceiver.sourceforge.net
Posted by: reza

Re: transcoding from FLAC - 14/08/2002 03:10

I didn't realize that FLAC decoding was integer-based. I originally wanted to add FLAC support to my client, but realized how it really didn't have a very fast processor and was worried that it couldn't support FLAC. I'm going to go ahead and experiment with adding FLAC support in the next major release.

As to the bootup problems, yeah, it seemed as if you had an empty favourites list, then it would hang on startup. I traced the problem down. If anyone is interested, here's the fix :

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/grrr/rrr/list.c.diff?r1=1.2&r2=1.3

I'll also look into better integrating jRec into my client.

Reza
Posted by: reedes

Re: transcoding from FLAC - 14/08/2002 10:44

Excellent. If flac support can be achieved, it would be a SIGNIFICANT step forward both for the Rio and for console players in general. It will bring the Rio into the realm of the audiophile who will have nothing to do with lossy codecs.

As David Schuetz points out on the jreceiver_user Yahoo Group, it'll make the Rios scarcer than ever. Now is the time to hoard. heheh

--Reed http://jreceiver.sourceforge.net