Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 245111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:03:42+00:00 2026-05-11T21:03:42+00:00

I have multiple (between 40 and 50) MP3 files that I’d like to concatenate

  • 0

I have multiple (between 40 and 50) MP3 files that I’d like to concatenate into one file. What’s the best way to do this in Python?

Use fileinput module to loop through each line of each file and write it to an output file? Outsource to windows copy command?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:03:42+00:00Added an answer on May 11, 2026 at 9:03 pm

    Putting the bytes in those files together is easy… however I am not sure if that will cause a continuous play – I think it might if the files are using the same bitrate, but I’m not sure.

    from glob import iglob
    import shutil
    import os
    
    PATH = r'C:\music'
    
    destination = open('everything.mp3', 'wb')
    for filename in iglob(os.path.join(PATH, '*.mp3')):
        shutil.copyfileobj(open(filename, 'rb'), destination)
    destination.close()
    

    That will create a single “everything.mp3” file with all bytes of all mp3 files in C:\music concatenated together.

    If you want to pass the names of the files in command line, you can use sys.argv[1:] instead of iglob(...), etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple (8) WAR files and 1 EAR file that I want to
I have multiple text files with logged data like this: 6/23/09 17:00 0.443 6/23/09
I see that we have multiple url's as value of this attribute like in
We have multiple log files like database log, weblog, quartzlog in our application. Any
I have multiple projects with directory structure like this: /application/ /images/ /js/ /css/ /system/
I have multiple files where I am extracting text between two delimiters (START and
I have multiple files where I am extracting text between two delimiters (START and
I have a many-to-one relationship between submissions and assignments (a student may have multiple
Say I have a one-to-many relationship between clients and addresses. Clients can have multiple
I have multiple qmake .pro files which are called from a root .pro file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.