bpa wrote: > I think I understand what you're saying. I assumed that Flac was trying > to do a Linux "seek" on the input file to implement "skip" and it > couldn't do a "seek" on stdin piped input.
I missed something so my HTTP comment was incorrect (I thought the OP was talking about some streams) but I don't think it changes the conclusion. The following rule does not work Code: -------------------- flc flc transcode * # IFT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d} [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ - -------------------- AFAIK, when using a rule from stdin, LMS does not expect the transcoders to do anything wrt seeking. It does the seek on behalf and then send the remaining bytes to the transcoder. That applies wherever stdin is generated from (remote or local). But a rule that allows "I" and uses flac will start the "flac" process at the seeked position (if any). So if there is no seek, flac will see a STREAMINFO header and will generate a proper wav header that pleases sox. But as soon as there is a seek, that header disappears and especially sample_count is unknown, so the wav header is absent or incorrect and sox fails. I don't use cuesheets, but I think it's a seek for the 2nd track, which would match the OP's experience. I think that if we want to use flac with seek, we have to use raw pcm for sox input, so a rule like Code: -------------------- flc flc transcode * # IFT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d} [flac] -dcs $START$ $END$ --force-raw-format --sign=signed --endian=little -- - | [sox] -q -t raw --encoding signed-integer -b 16 $RESAMPLE$ -c $CHANNELS$ -L - -t flac -C 0 - -------------------- So far, it works if I use it a general rule (flc flc * * ) whether there is a seek or not (careful, when used as a general rule, $RESAMPLE$ is not defined, so must force -r xxxxx for test). But I need to verify that more and find a solution for the sample size as well LMS 7.9 on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3 ------------------------------------------------------------------------ philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261 View this thread: http://forums.slimdevices.com/showthread.php?t=113308 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix