• Em Adespoton@lemmy.ca
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    15 days ago

    It’s tricky; you really need to do spectral analysis to see if there are any obvious bands of audio missing or patterns in the output that suggest it’s been previously compressed, or was originally sampled at a suboptimal rate.

    Ffprobe will get you most of the way there:

    ffprobe -v error -show_format -show_streams -print_format json “file.flac”

    That reads the file metadata and audio stream headers to identify the digital encoding of the source files.

    But the only way to be certain is to have the original audio that’s been ffmpeg compressed, because someone could easily have live recorded in mono to audiocassette, then recorded that to PCM 8 bit audio, then burned that to a red book audio track on a CD, then ripped that to FLAC. At which point the headers will indicate it’s 44.1kHz 16-bit 2 channel PCM uncompressed audio.