• floquant@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    3
    arrow-down
    2
    ·
    edit-2
    5 hours ago

    Audio CDs contain 44.1kHz 16-bit PCM. If you got FLACs out you transcoded them, and transcoding from lossy to lossless is generally undesirable

    EDIT: I stand corrected, I forgot that PCM is not a codec.

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 hours ago

      I’m pretty sure if you rip CDs directly to FLAC, it’s a perfect copy assuming you’re using good software. PCM isn’t lossy or lossless because it’s not a compressed format, it’s an uncompressed bitstream. Think of it like the original data. If it was burned to a CD as digital MP3 data and then ripped that to FLAC, then yes you’d be going from lossy compressed to lossless, which would hide the fact that quality was lost when it went to MP3 in the first place.

      Just as an example, you can rip a CD directly to FLAC (you should also find and use the correct sample offset for your CD drive), rip the cue sheet for track alignment, then burn the FLAC back to a new CD using the cuesheet (and the correct write offset configuration), and you’ll get a CD with the exact bit for bit pattern of “pits” burned into the data layer.

      You can then rip both CDs to a raw uncompressed wav file (wav is basically just a container for PCM data) and then you’ll be able to MD5sum both wav files and see that they are identical.

      This is how I test my FLAC rips to make sure I’m preserving everything. This is also how CD checksum databases (like CDDB) work - people across the globe can rip to wav or flac and because it’s the same master of the CD, they’ll get identical checksums, and even after converting the PCM/wav into a flac you are still able to checksum and verify it’s identical bit for bit.

      • floquant@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        I stand corrected, thanks for taking the time to write an informative comment. I haven’t ripped a CD in like 15 years :P

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 hours ago

          No problem! You can tell I went deep down the rabbithole a while back lol - I had to rip my dad’s CD collection and assure him that what came out of the toslink to his DAC was identical coming from a FLAC as would come from a CD player with optical out.

    • Scoopta@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      7 hours ago

      But CDs are lossless to start? Raw PCM is raw digital audio data, it’s completely uncompressed lossless audio so transcoding to flac is the most sensible thing to do. The flac will just be transcoded back to raw PCM for output anyway, as raw PCM is what audio hardware accepts for playback.

    • Yerbouti
      link
      fedilink
      arrow-up
      2
      ·
      7 hours ago

      PCM Wav is uncompressed (best quality) and FLAC is lossless compression. FLAC will keep the audio quality while significantly reducing size of the file so ripping a CD to FLAC is a good idea.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        Fun fact, wav != PCM. Wav is a Microsoft developed format that while most often contains PCM data can actually contain a wide variety of different audio formats including MP3 data. Yes, while rare, you can put MP3 audio into the wav container and have a .wav that is compressed. CDs also do not use the wav container for their audio and there are other file formats in addition to wav which can contain PCM including aiff and au

        • Yerbouti
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          13 minutes ago

          That’s right, it’s actually LPCM that isn’t compressed. I don’t think I’ve ever seen people using wav as a container for compressed audio but it’s indeed possible, thanks for the clarification.

    • Ghoelian@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      3
      ·
      7 hours ago

      I have had a few (I think only 2) CDs that actually included a few different formats in the filesystem, otoh ogg, flac, MP3, and wav. That was a nice surprise when I was preparing to rip them.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        They were probably a variant of the unofficial format known as an MP3 CD. Basically CDs which contain computer audio files. CD Audio discs as specified by the redbook standard do not even have a filesystem and don’t contain files.

        • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          19 minutes ago

          I am pretty sure they experienced some KDE Ingenuity.

          Example:

          You can see they can’t be real files due to their total size:

          Unfortunately, at least on Arch it seems a bit broken. The CD keeps spinning at low speed with audible random searches and the file transfer speed is abysmal. Copying out one 3.5MiB MP3 took it almost 2 minutes.

      • TheBrideWoreCrimson@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        6 hours ago

        Konqueror, IIRC, will show you “virtual” MP3s & FLACs, complete with file sizes and all, when you put in an audio CD. You can copy these files to your hard disk. They are created on the fly, though.