PDA

View Full Version : Adding support for SHN files



maggior
2008-03-12, 07:39
I just upgraded to squeezecenter from the last version of slimserver. It was actually easier than I thought it would be. It was nice that I didn't have to use custom startup scripts on my SuSe machine anymore.

Anyway, I noticed that SHN support is not included like it was before. I also don't see the conf file to edit to add the support.

With SqueezeCenter, how do I go about adding support for SHN like I had before?

Thanks!
Rich

Ben Sandee
2008-03-12, 08:18
On Wed, Mar 12, 2008 at 9:39 AM, maggior <
maggior.365z4o1205332802 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

>
>
> Anyway, I noticed that SHN support is not included like it was before.
> I also don't see the conf file to edit to add the support.


I would be surprised if the convert.conf were anywhere but
/etc/squeezecenter. Are you still looking in /etc/slimserver? The
web-modifyable pref files have been moved to the
/var/lib/squeezecenter/prefs directory, at least under Debian/Ubuntu.

Ben

maggior
2008-03-12, 08:18
OK, I found the convert.conf and the types.conf files. They are now in /etc/squeezecenter. I copied the entries as they were in the old slimserver but no joy. After restarting squeezecenter, the SHN file type shows up in the web page, but when I try to play an SHN file, I get an error "shorten: failed to write decompressed stream. shorten version 3.6.1."

Any ideas on why I would see this error?

Thanks!

Ben Sandee
2008-03-12, 08:32
On Wed, Mar 12, 2008 at 10:18 AM, maggior <
maggior.3660zc1205335203 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

>
> OK, I found the convert.conf and the types.conf files. They are now in
> /etc/squeezecenter. I copied the entries as they were in the old
> slimserver but no joy. After restarting squeezecenter, the SHN file
> type shows up in the web page, but when I try to play an SHN file, I
> get an error "shorten: failed to write decompressed stream. shorten
> version 3.6.1."


I would paste in the entries you added. Also, I was looking to see what
logging you could enable to see what's going on -- the only one that seemed
like it might be relevant is "formats.audio".

Ben

maggior
2008-03-12, 08:42
I took at look at the server log file and I see entries where it states that it cannot locate Slim/Formats/Shorten.pm.

I guess there is more to this than just editing some configuration files?

maggior
2008-03-12, 08:56
OK, so I've now eliminated the errors from the server log by copying the Shorten.pm file from a slimserver installation. However, I still get the error on the console about failing to write the decompressed stream.

Any ideas? I wonder why they ripped support for SHN out of squeezecenter. Ugh!

Ben Sandee
2008-03-12, 09:00
On Wed, Mar 12, 2008 at 10:42 AM, maggior <
maggior.36624z1205336701 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

>
> I took at look at the server log file and I see entries where it states
> that it cannot locate Slim/Formats/Shorten.pm.
>
> I guess there is more to this than just editing some configuration
> files?
>

That module is definitely gone/missing from 7.0. You could try just adding
the module as-is from 6.5, you can download it here:

http://svn.slimdevices.com/*checkout*/branches/6.5/server/Slim/Formats/Shorten.pm?rev=9178

Ben

Ben Sandee
2008-03-12, 09:20
On Wed, Mar 12, 2008 at 10:56 AM, maggior <
maggior.3662tz1205337601 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

>
> OK, so I've now eliminated the errors from the server log by copying the
> Shorten.pm file from a slimserver installation. However, I still get
> the error on the console about failing to write the decompressed
> stream.
>
> Any ideas? I wonder why they ripped support for SHN out of
> squeezecenter. Ugh!


I would have to believe it was inadvertent. This team does not make it a
habit of breaking compatibility, at least in my experience. A quick search
of bugzilla yielded zero results. I would file a bug if I were you.

Ben

kdf
2008-03-12, 10:12
> On Wed, Mar 12, 2008 at 10:56 AM, maggior <
> maggior.3662tz1205337601 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

> I would have to believe it was inadvertent. This team does not make it a
> habit of breaking compatibility, at least in my experience. A quick
> search
> of bugzilla yielded zero results. I would file a bug if I were you.

It was deliberate, more or less for the very reasons you are seeing. SHN
is a broken format. The only known way to get duration, size and bitrate
data (required for SB to play tracks) is to extract to WAV and redirect to
/dev/null (a problem on windows), then it's extracted to WAV again for
playback. The header is also different depending on versions. Some of
the things that never worked right (and consequently had no official
support) were removed for SC7 (note several skins which are no longer with
us). This was one of them.
http://bugs.slimdevices.com/show_bug.cgi?id=4877
-kdf

maggior
2008-03-12, 11:06
That's a bummer. It worked on this machine using SlimServer 6.5.4 (or whatever the last version was before moving to squeezecenter). So I don't think I'm seeing a problem with SHN itself.

Part of what I thought was great about the squeezebox and slimserver was the format support. I guess I'll roll back to slimserver on this machine. I'd rather not have to hack this in to work. On my main system where I only use FLAC and mp3 I'll consider moving to squeezecenter.

Thanks for the info.

peter
2008-03-12, 11:19
maggior wrote:
> That's a bummer. It worked on this machine using SlimServer 6.5.4 (or
> whatever the last version was before moving to squeezecenter). So I
> don't think I'm seeing a problem with SHN itself.
>
> Part of what I thought was great about the squeezebox and slimserver
> was the format support. I guess I'll roll back to slimserver on this
> machine. I'd rather not have to hack this in to work. On my main
> system where I only use FLAC and mp3 I'll consider moving to
> squeezecenter.
>

Why not use shnconv to convert your SHN files to flac?

find / -name \*.shn | shnconv -o flac

The great thing about lossless formats is that conversion is also lossless.

Regards,
Peter

maggior
2008-03-12, 11:32
I know I can convert the files with relative ease, but it was nice to just be able to play them natively.

I've rolled back and SHN is now working again. I may move to squeezecenter on my main server since the seemless integration of squeezenetwork is really nice.

kdf
2008-03-12, 11:32
If you want SHN back to exactly what was always in SS/SC, you can have it as it was by reversing:
http://svn.slimdevices.com/?rev=12843&view=rev

This is just a change to convert.conf, types.conf and adding the Formats/Shorten.pm module (which you've already done). Any remaining issues re basically the quirks of the format/codec itself, whatever it is that's causing the stream write failure.

-kdf

maggior
2008-03-12, 12:33
Hi kdf -

I changed those exact things and it didn't work. I don't know how it could be due to the quirkyness of the format since I've done nothing with the shorten binary and am using the same .shn file to test.

I wonder if there is a temporary file that is created as part of the process that and the write fails because the squeezecenter user doesn't have permission to write to the location. Once significant difference between slimserver and squeezecenter is the fact that a different user account is used.

Reading the bug report, I see it was quite deliberate to remove it.

Thanks,
Rich

trazom
2008-07-03, 10:03
... well, would be great if Slim could re-integrate shn-reading - soooooo many shn files around...

dminches
2008-08-31, 06:56
Was this ever resolved or are Shns unplayable on Squeezecenter?

peter
2008-08-31, 13:43
dminches wrote:
> Was this ever resolved or are Shns unplayable on Squeezecenter?
>

How many lossless formats do we need when they're all so easily
converted to flac? Isn't SHN dead?

Regards,
Peter

andyg
2008-08-31, 14:02
I think we dropped SHN support because it's a vastly inferior format to FLAC, is not easy to parse and doesn't even support proper tags. I think it was around before FLAC but has been surpassed by it in every way. Time to convert your files I think.

http://en.wikipedia.org/wiki/Shorten

atrocity
2008-08-31, 19:54
I think it was around before FLAC

It was. I remember when Shorten was new and the greatest thing since sliced bread in the live music trading world, because it finally freed traders from having to deal with the often horrible job others would do copying audio discs. Yeah, the smaller file size was a nice bonus, but it was more important that it prevented a lot of *crap* from getting copied and then badly re-copied and again badly re-copied.

When FLAC first started getting traded, people were talking about the slightly smaller file size, but I think I was one of many who had absolutely no idea about the tagging capabilities. Oops.

maggior
2008-08-31, 21:12
I think we dropped SHN support because it's a vastly inferior format to FLAC, is not easy to parse and doesn't even support proper tags. I think it was around before FLAC but has been surpassed by it in every way. Time to convert your files I think.

http://en.wikipedia.org/wiki/Shorten

Yes it was around before FLAC and yes it is inferior in a number of ways. I could understand if it was an issue of adding support, but it was there and subsequently removed. Yes, I could convert my files, but I have quite a number of SHNs in my archives that I bring back out now and then.

I never resolved the issue other than by leaving a server running 6.5.4.

It's water under the bridge now, but I think a better approach would have been to leave the support there and deprecate it - meaning don't change the code and any new bugs reported would be immediately closed because the format is "no longer supported and the existing functionality is as-is".

APE is falling out of favor as a suitable format, does that mean it will be next on the chopping block? What about when TNGFF files (The Next Great File Format) come around to overthrow FLAC?

Yeah, it doesn't make sense to create new SHNs today, but there are many of them floating around, especially from the concert trading community.

Mitch Harding
2008-08-31, 22:04
Personally I convert all SHNs that I find into FLAC before adding them
to my library. I did that without even knowing that SHN was
unsupported -- I did it so that I'd have a smaller number of file
formats in my library, and because of FLAC's superior tagging
capabilities. For me having my music properly and consistently tagged
is very important.

On Sun, Aug 31, 2008 at 11:12 PM, maggior
<maggior.3f1jiz1220242501 (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
> andyg;334917 Wrote:
>> I think we dropped SHN support because it's a vastly inferior format to
>> FLAC, is not easy to parse and doesn't even support proper tags. I
>> think it was around before FLAC but has been surpassed by it in every
>> way. Time to convert your files I think.
>>
>> http://en.wikipedia.org/wiki/Shorten
>
> Yes it was around before FLAC and yes it is inferior in a number of
> ways. I could understand if it was an issue of adding support, but it
> was there and subsequently removed. Yes, I could convert my files, but
> I have quite a number of SHNs in my archives that I bring back out now
> and then.
>
> I never resolved the issue other than by leaving a server running
> 6.5.4.
>
> It's water under the bridge now, but I think a better approach would
> have been to leave the support there and deprecate it - meaning don't
> change the code and any new bugs reported would be immediately closed
> because the format is "no longer supported and the existing
> functionality is as-is".
>
> APE is falling out of favor as a suitable format, does that mean it
> will be next on the chopping block? What about when TNGFF files (The
> Next Great File Format) come around to overthrow FLAC?
>
> Yeah, it doesn't make sense to create new SHNs today, but there are
> many of them floating around, especially from the concert trading
> community.
>
>
> --
> maggior
>
> Rich
> ---------
> Setup: 2 SB3s, 1 duet. SuSE 10.2 Server running SqueezeCenter 7.2
> ------------------------------------------------------------------------
> maggior's Profile: http://forums.slimdevices.com/member.php?userid=9080
> View this thread: http://forums.slimdevices.com/showthread.php?t=44644
>
>

bephillips
2008-09-01, 15:48
Yeah, these days, if I download a show that's in SHN format, the first thing I do is convert to flac, so I can tag, then I add to the library.

niuphan
2008-09-27, 12:08
I've got over 100 GB of shn that I would prefer not to convert if I don't have to. I enjoyed the SHN support that existed in the previous versions.

I read through this thread and don't quite understand what needs to be modified in order to get shn working. Has anyone had success with this?

winsall
2008-11-19, 22:23
I've got over 100 GB of shn that I would prefer not to convert if I don't have to. I enjoyed the SHN support that existed in the previous versions.

I read through this thread and don't quite understand what needs to be modified in order to get shn working. Has anyone had success with this?


I concur. I too am disappointed to see a lack of support for such a major format like Shorten. There is support for a number of formats I have never even seen used in practice and regardless of it's inferiority, SHN is very established and widespread. I like that you have embraced FLAC but cant you just backend convert SHN to FLAC like before? I really love my new Boom but this is a Bummer.