Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility to automatically merge gapless tracks #63

Open
SeeSpotRun opened this issue Mar 6, 2016 · 1 comment
Open

Utility to automatically merge gapless tracks #63

SeeSpotRun opened this issue Mar 6, 2016 · 1 comment

Comments

@SeeSpotRun
Copy link

Some music players are limited to mp3 format files, which generally don't handle gapless playback well. One workaround for playing gapless content seamlessly on these devices is to merge gapless files into a single mp3 track. The existing trackcat utility isn't really set up for this case without significant manual input.

I wrote a quick concept at https://gist.github.com/SeeSpotRun/bcc5f415f897ad9914dc which scans files in a folder, detects which tracks have gapless transitions (based on lack of silence at the end of the track), and writes the converted mp3 files to an output folder.

The question is whether to develop this up to a stand-alone utilitity, or to incorporate it as an option in either trackcat or track2track. I had a quick look at the latter option but it looked like it was going to get messy...

@SeeSpotRun
Copy link
Author

I managed to crudely incorporate this option into track2track (but probably broke a few things along the way): https://github.com/SeeSpotRun/python-audio-tools/tree/feature/track2track-merge-gapless.
Edit: usecase example:

$ track2track /mnt/Music/"Abbey Road"/*.flac  -d /mnt/Music/converted/ -t mp3 --merge-gapless

[ 1/10]  /mnt/Music/Abbey Road/05 Octopus's Garden.flac -> /mnt/Music/converted/05 - Octopus's Garden.mp3
[ 2/10]  /mnt/Music/Abbey Road/04 Oh! Darling.flac -> /mnt/Music/converted/04 - Oh! Darling.mp3
[ 3/10]  /mnt/Music/Abbey Road/02 Something.flac -> /mnt/Music/converted/02 - Something.mp3
[ 4/10]  /mnt/Music/Abbey Road/03 Maxwell's Silver Hammer.flac -> /mnt/Music/converted/03 - Maxwell's Silver Hammer.mp3
[ 5/10]  /mnt/Music/Abbey Road/01 Come Together.flac -> /mnt/Music/converted/01 - Come Together.mp3
[ 6/10]  /mnt/Music/Abbey Road/07 Here Comes the Sun.flac -> /mnt/Music/converted/07 - Here Comes the Sun.mp3
[ 7/10]  /mnt/Music/Abbey Road/08 Because.flac -> /mnt/Music/converted/08 - Because.mp3
[ 8/10]  /mnt/Music/Abbey Road/06 I Want You (She's So Heavy).flac -> /mnt/Music/converted/06 - I Want You (She's So Heavy).mp3
[ 9/10]  /mnt/Music/Abbey Road/14 Golden Slumbers.flac
        +/mnt/Music/Abbey Road/15 Carry That Weight.flac
        +/mnt/Music/Abbey Road/16 The End.flac -> /mnt/Music/converted/14 - Golden Slumbers++.mp3
[10/10]  /mnt/Music/Abbey Road/09 You Never Give Me Your Money.flac
        +/mnt/Music/Abbey Road/10 Sun King.flac
        +/mnt/Music/Abbey Road/11 Mean Mr. Mustard.flac
        +/mnt/Music/Abbey Road/12 Polythene Pam.flac
        +/mnt/Music/Abbey Road/13 She Came In Through the Bathroom Window.flac -> /mnt/Music/converted/09 - You Never Give Me Your Money++++.mp3

If anyone else finds this useful I can put a bit more effort into it, otherwise it's working as-is for what I want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant