Split Audio into separate files based on timestamps

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Mikestriken
Posts: 5
Joined: Wed Mar 17, 2021 10:11 pm
Operating System: Windows 10

Split Audio into separate files based on timestamps

Post by Mikestriken » Wed Mar 17, 2021 10:19 pm

Hello, I want to split a couple of long mp3 sound files into separate smaller mp3 files. I figured out how to split it based on the silence of a track using the silence finder, but I want to not have to manually go through each label checking if it's in the right place. I would rather be able to split a track based on timestamps.

for instance, I have downloaded youtube video that encompasses the entire soundtrack for Medal of Honor Pacific Assault and converted it into mp3 format:
https://www.youtube.com/watch?v=91c5UXsn22s&ab_channel=SOVIETNIK

In the description of the video the uploader has listed all the timestamps for when each song is and provided a title for each track it needs to be split into.

Is there any way to automate this process, bonus points if you can include the title and add a prefix like "Medal of Honor Pacific Assault - *title of track*" :P

jademan
Forum Crew
Posts: 1171
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Please select

Re: Split Audio into separate files based on timestamps

Post by jademan » Thu Mar 18, 2021 7:47 pm

Mikestriken wrote:
Wed Mar 17, 2021 10:19 pm
Is there any way to automate this process,
Yes, Audacity can import labels from a text file. See: https://manual.audacityteam.org/man/fil ... tml#labels

Then you can Export Multiple selecting to split and name files via label information.

I hope this helps. :D

Mikestriken
Posts: 5
Joined: Wed Mar 17, 2021 10:11 pm
Operating System: Windows 10

Re: Split Audio into separate files based on timestamps

Post by Mikestriken » Fri Mar 19, 2021 2:38 am

jademan wrote:
Thu Mar 18, 2021 7:47 pm
Mikestriken wrote:
Wed Mar 17, 2021 10:19 pm
Is there any way to automate this process,
Yes, Audacity can import labels from a text file. See: =https://manual.audacityteam.org/man/im ... ing Labels

Then you can Export Multiple selecting to split and name files via label information.

I hope this helps. :D
I get an error 404 from your link ;(

waxcylinder
Forum Staff
Posts: 14574
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Split Audio into separate files based on timestamps

Post by waxcylinder » Fri Mar 19, 2021 10:43 am

Mikestriken wrote:
Fri Mar 19, 2021 2:38 am
I get an error 404 from your link ;(
I fixed the link.

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

jademan
Forum Crew
Posts: 1171
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Please select

Re: Split Audio into separate files based on timestamps

Post by jademan » Fri Mar 19, 2021 11:00 am

Thank you, Peter. :D

Mikestriken
Posts: 5
Joined: Wed Mar 17, 2021 10:11 pm
Operating System: Windows 10

Re: Split Audio into separate files based on timestamps

Post by Mikestriken » Fri Mar 19, 2021 9:57 pm

jademan wrote:
Fri Mar 19, 2021 11:00 am
Thank you, Peter. :D
Is there any method to switch the time into minutes : seconds format instead of just seconds?

jademan
Forum Crew
Posts: 1171
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Please select

Re: Split Audio into separate files based on timestamps

Post by jademan » Sat Mar 20, 2021 11:31 am

Mikestriken wrote:
Fri Mar 19, 2021 9:57 pm
Is there any method to switch the time into minutes : seconds format instead of just seconds?
If there is any such conversion in Audacity, I am not aware of this.

For data format conversion, I think you want to look at a spreadsheet program such as LibreOffice Calc.

For Calc, to convert from time format, e.g., 1:30.123 to seconds you could use a formula:" =B2*86400", yielding the contents of cell "B2" to 90.123. And in case you are wondering, 86400 is the number of seconds in a day, which is a "magic" number used internally by Calc.

I hope this helps. :D

Mikestriken
Posts: 5
Joined: Wed Mar 17, 2021 10:11 pm
Operating System: Windows 10

Re: Split Audio into separate files based on timestamps

Post by Mikestriken » Sun Mar 21, 2021 7:50 am

jademan wrote:
Sat Mar 20, 2021 11:31 am
Mikestriken wrote:
Fri Mar 19, 2021 9:57 pm
Is there any method to switch the time into minutes : seconds format instead of just seconds?
If there is any such conversion in Audacity, I am not aware of this.

For data format conversion, I think you want to look at a spreadsheet program such as LibreOffice Calc.

For Calc, to convert from time format, e.g., 1:30.123 to seconds you could use a formula:" =B2*86400", yielding the contents of cell "B2" to 90.123. And in case you are wondering, 86400 is the number of seconds in a day, which is a "magic" number used internally by Calc.

I hope this helps. :D
Sadly the result is an "#VALUE!" error and it refuses to convert :/

jademan
Forum Crew
Posts: 1171
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Please select

Re: Split Audio into separate files based on timestamps

Post by jademan » Sun Mar 21, 2021 11:22 am

Mikestriken wrote:
Sun Mar 21, 2021 7:50 am
Sadly the result is an "#VALUE!" error and it refuses to convert :/
It works for me:
Untitled.png
Untitled.png (12.05 KiB) Viewed 246 times

Mikestriken
Posts: 5
Joined: Wed Mar 17, 2021 10:11 pm
Operating System: Windows 10

Re: Split Audio into separate files based on timestamps

Post by Mikestriken » Mon Mar 22, 2021 4:50 am

It works when I manually reinput the data but after copying and pasting the data into the spreadsheet it will not work.
"0:00​ - Main Theme
2:15​ - Classic Theme
6:17​ - MOHPA E3
6:38​ - Bootcamp
7:56​ - Jeep Ride
10:35​ - PT Boat
14:10​ - Tower Battle
15:37​ - The Jungle
16:13​ - Rescue Pilot
17:13​ - Truck Ride
17:47​ - Ride to Sub
19:26​ - Hold off Attackers
21:40​ - Ending on Sub
21:57​ - To Guadancanal
22:42​ - MMG Standoff
23:18​ - Guy Gets Shot
24:00​ - Tense River
26:29​ - Spooky Level
30:31​ - Reinforcements
31:06​ - Regroup
35:20​ - Interrogate Soldier
35:38​ - Endless Patrol
36:19​ - No Fear
36:55​ - Flying
38:01​ - Bog
41:39​ - Wonder
42:38​ - Sneak
42:57​ - Jeep Ride 2
45:07​ - Intro Music A
47:20​ - Intro Music B
48:59​ - Intro Music C
49:32​ - Intro Music D
50:40​ - Intro Music E
51:32​ - Intro Music F
52:18​ - Intro Music G
53:30​ - Intro Music H
55:23​ - Intro Music I
55:34​ - Intro Music J
55:42​ - Intro Music K
59:29​ - Intro Movie Music
01:00:18​ - Stealth Music A
01:03:04​ - Stealth Music B
01:05:14​ - Stealth Music C
01:08:36​ - Stealth Music D
01:10:58​ - Tense Action
01:12:50​ - Heroic 1
01:14:29​ - Heroic 2
01:15:42​ - Level Music
01:18:22​ - Ending Music
01:18:38​ - Ending Music 2
01:19:01​ - GC2 All Remix
01:21:00​ - GC9b1_ltrt_edit
01:22:16​ - GC257_ltrt_edit
01:22:53​ - GC257_ltrt_edit2
01:24:21​ - GC1410_ltrt
01:26:56​ - sample
01:27:01​ - Cinematic Ending
01:27:55​ - Cinematic Ending 2"

Post Reply