I’m ditching streaming services and just going with local music. However all my CDs are converted to either flac or 320kbps mp3 files on my PC and thus far too large for the limited storage I have on my phone.

I was hoping there might be an app that would automatically downconvert to something like 128kbps and then copy over to the Music directory on my phone. A bit like how Calibre can automatically convert eBook files (e.g. mobi to epub) and then send them to your ereader?

  • Scrath@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    54 minutes ago

    This might be a bit overkill for what you want but you could try using a selfhosted music server like navidrome and streaming to your phone. I use symfonium on on phone which can be configured to request the streamed music to be transcoded to a smaller size for streaming from mobile network or for caching it on your phones storage for offline listening.

    Given that symfonium supports a lot of self hosted media providers from which to pull, you could also try sharing your music locally using samba. I’m not sure if the transcoding still works in that case though (it would obviously have to be done on your phone)

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 hours ago

    It’s not really an “App” but tools like ffmpeg or sox or lame can do that no problem. It might take a while to convert your entire collection though … but depending on the size might just take a night or, few nights.

    If you have a ridiculously large collection and do want it “on demand” you could also use e.g. inotify to monitor directories, e.g. ~/Music/ForPhone/ so that any file added to that directory gets converted.

    FWIW I’d use a phone with a microSD card as those days one can get a 1To for less than 100€ so probably no conversion needed even for a large collection.

    Edit: based on a recent conversation I’d try transcoding capabilities of LMS https://github.com/epoupon/lms cf https://lms-demo.poupon.dev/settings from their demo instance

    • zingo@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      41 minutes ago

      LMS is an awesome app. It’s a shame things like Navidrome gets all the attention when LMS is so much better.

  • Ardens@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    6 hours ago

    Well, it’s not great to take an already compressed audiostream like 320kbps mp3, and then compress it again. Use your FLACs if possible. Then, I’d recommend that you use .ogg - they give better compression (smaller files), but with better sound than mp3…

    There’s a lot of apps out there, but AFAIK not anyone who does this automatically for you.

  • RoadTrain@lemdro.id
    link
    fedilink
    English
    arrow-up
    11
    ·
    9 hours ago

    For lower bitrates, I’d suggest using a different codec than MP3. Opus is really solid, and at 128 kbps it will probably get you quality similar to MP3 at 192 kbps. Or you could go lower, and 96 kbps with Opus will be similar to MP3 at 128 kbps. I don’t know an app that will do it automatically, but the CLI tools are really simple to use: you point them at the FLAC and tell it the target bitrate and that’s it.

    Alternatively, if you have access to a macOS machine, their AAC encoder is really good and likely superior to any MP3 encoder at equivalent bitrates.

    • entropicdrift@lemmy.sdf.org
      link
      fedilink
      arrow-up
      6
      ·
      5 hours ago

      This, @Thorned_Rose@sh.itjust.works.

      I’m an audio engineer and can confirm that if you want the best quality audio for the file size, you want Opus. Opus at 128kbps is considered transparent, so it’s roughly as good as 320kbps MP3s, but y’know, less than half the size.

      • RoadTrain@lemdro.id
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 hours ago

        Hey! Good to know about the 128 kbps threshold.

        What’s your take on MP3 bitrates? I’ve read some posts online claiming that 320 kbps is overkill most of, if not all of, the time. They claimed that there is little to no gain going above around 220 kbps. In your experience, is there any truth to this?

        • entropicdrift@lemmy.sdf.org
          link
          fedilink
          arrow-up
          1
          ·
          1 hour ago

          Generally this is true, but it depends on the encoder used. Back during the huge boom of MP3 popularity in the late 90s and early 00s, it likely did make a difference, so if you’re looking at MP3s that were encoded back then I would go for 320kbps every time just to be safe, but modern encoders generally do much better like you said.

          These days if I were encoding an MP3 I’d use LAME at -V0 setting, letting it lower the bitrate where it can without sacrificing quality. That said, per this test from 2014 that I found as a source on Wikipedia, a 96kbps VBR Opus file is at least as good if not better than an MP3 with -V 5 as the setting on LAME with approximately a 135kbps bitrate.

  • throbbing_banjo@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    8 hours ago

    Have you considered self-hosting Plexamp? It supports lossless quality and lets you both steam and download your music at any bitrate you want (even 128 if you really have to, but fuck me that hurts to type.

    That’s what I do, and before long trips with spotty service I’ll download a dozen albums or so in flac so I’ve got a decent lossless selection for flights/etc

    • Thorned_Rose@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 hours ago

      You are correct and I don’t normally like to listen to anything less than 320kbps. BUT, my phone does not have expandable memory so it’s hard limited. And where I listen to most of my music while travelling is in the car using the car’s speakers which aren’t going to make much difference listening to 128vs 320. Even when streaming music, I’m not going to get 320. I may go up to 192kbps instead of 128 but I doubt it will make much audible difference with shitty car speakers.

      • Domi@lemmy.secnd.me
        link
        fedilink
        arrow-up
        15
        ·
        edit-2
        9 hours ago

        If your device supports it, you might want to encode to Opus instead. Opus produces much higher quality files at much smaller file sizes than MP3.

        For example, Opus at 128kbps is considered transparent when compared to the source file. You can probably go down to 64-96kbps when its just for playback in your car.

        https://wiki.xiph.org/Opus_Recommended_Settings

        As for transcoding them, you might want to check out ffmpegfs: https://github.com/nschlia/ffmpegfs

        It can create a “virtual” drive based on your source files and automatically transcodes them when you drag & drop files from there onto your device.

  • harc@szmer.info
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    11 hours ago

    Handbreak could be used for that and automatically run for set directories if i remember correctly.

  • Eugenia@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    12 hours ago

    Navidrome does that. You have to setup a PC, or a raspberry Pi with navidrome, and then use a client like Symfonium (costs $5, not open source, but it’s the best subsonic client out there), and tell it to automatically downconvert music when played via the phone. I have a Raspberry Pi 3B+, with just 1 GB of RAM, running navidrome. DietPi + navidrome (which is installable directly via dietpi’s software selection), together they take just 80-120 MB of RAM!

    I had Jellyfin before that, and Emby, and they were dogs. 1 GB of RAM was not enough for them, they’d swap with an additional 200-300 MB of RAM. And they were slow with large music libraries too. Navidrome/Subsonic don’t have such issues. Big music libraries are handled fast with their db/engine.

    If you prefer to not use a server, there are encoding shell scripts that do batch-encoding: https://github.com/caleis/flac2mp3/blob/master/flac2mp3.sh

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    13
    ·
    17 hours ago

    Not sure if it’s exactly what you’re looking for - but subsonic/airsonic/etc. can do on-the-fly conversions when downloading to mobile devices. There are several mobile apps available that will cache files locally as well.

  • themeatbridge@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    17 hours ago

    Can you stream from your pc? I set up Jellyfin and Tailscale, and all my music (and movies and tv shows) are on my computer, accessible from anywhere.

    • Thorned_Rose@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 hours ago

      I don’t want to be reliant on an internet connection to play music. Hence, why I prefer everything to be local on my phone. I also don’t want to open our home server up to the outside world.

          • themeatbridge@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            6 hours ago

            This is a valid question, but it’s hard to answer because it depends on the security of your own network. Tailscale creates a secure tunnel directly into your home network, but if your home network is compromised then it’s not secure.

            Could Tailscale be compromised? I think it would be difficult but not impossible. It’s safe enough for personal use, certainly, but I wouldn’t use it to protect state secrets.

            And if you have it on your phone, and someone gets access to your phone, then they can access your home network. How secure is your phone? Do you use biometrics or a password keeper? Do you leave your laptop unlocked?

            Security is a mixed topic, and it’s impossible to pull one thread from the sweater without unraveling the whole thing. Sometimes the illusion of security is as effective as actually being secure, and sometimes it isn’t at all.

          • anon5621@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            10 hours ago

            I am using public vps as entry point with reverse tunnel to home server with SSL

    • db2@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      16 hours ago

      It would be simple to throw a script together that would take a flac or whatever as input, reencode to whatever with ffmpeg, then move the result to a specific location.

  • floo@retrolemmy.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    15 hours ago

    You can use Plex to stream music from your own server. The mobile app is called Plexamp, and it’s pretty great.

      • floo@retrolemmy.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 hours ago

        I was gonna say that Plexamp allows for local downloads from your server onto your device, but if you don’t wanna ever use an Internet connection at all, I guess that’s different.

  • Cora@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    17 hours ago

    I don’t know about automatic, but I also have music locally on my phone after moving away from streaming services.

    I use fre:ac to convert from FLAC to MP3, and then just save it in a separate folder. Then when I’m done I move the folder to the phone and delete it from the computer so I just have FLAC on my computer.

    Not automatic, but that’s how I usually do it.

    • Thorned_Rose@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 hours ago

      I was considering doing that sort of thing if I couldn’t find anything automatic. It’s just annoying as I buy new music and have to convert along the way, especially as I have memory impairment and can forget to clean up afterwards.

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    16 hours ago

    Not automatic (I think) and a bit clunky but the Strawberry music player does have a transcode feature so you could select music files and transcode them a certain way output to another folder. It’s not something I ever do but I did a quick test to a USB drive and it seems to work okay. It’s an option if you opt to use a gui to click through.

    OTOH if you’re happy using the terminal and/or scripting then ffmpeg would be a better bet.

    PS - Strawberry does have a panel where it lists “Devices” and maybe your phone could show up there and the transcoding would work a bit more automatically, wasn’t able to test that here.