Bug 3446 - Transcode pipe processes not terminated
: Transcode pipe processes not terminated
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Transcoding
: 6.2.2
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-25 07:47 UTC by Hartvig Ekner
Modified: 2006-05-25 17:00 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hartvig Ekner 2006-05-25 07:47:39 UTC
When doing a transcoding pipe like this:

mov flc * *
        [faad] -w -f 2 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -

The first process in the pipe (faad) is not terminated by the server if one switches to a new song mid-stream. The "flac" process immediately dies. If the song plays to the end, then both processes disappear as expected. On a fast PC the "faad" process decodes the rest of the song after a song switch, and disappears after a few seconds (thus not causing any problems), but on my slow server (a 533 MHz EPIA board), it can take up to 30 seconds or longer. And if I switch song again within these 30 secs, and again and again, then suddenly the PC is swamped with faad's (and it takes longer and longer for them to disappear), and the "active one" cannot decode in real time any longer until some of the old ones finishes off (which takes a LONG time now).

If I only have one process in the pipe, ala:

mov wav * *
       [faad] -w -f 2 $FILE$

things seem to work (ie. no left-over processes at song switch), but this stresses my WiFi more, which is why I want flac compression also.

I think the problem must somehow be related to how the pipe is built and taken down in the slimserver Perl script. If I just pipe "faad" into "more" in a shell pipe and exit "more", the faad process immediately dies. So the shell pipe works, but the slimserver one doesn't.
Comment 1 Dan Sully 2006-05-25 09:17:28 UTC
I believe this is a faad bug. Search forums.slimdevices.com for faad
Comment 2 Hartvig Ekner 2006-05-25 13:07:02 UTC
I found it, and it was indeed a faad bug. Problem solved - Thanks!