LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-11-2011, 01:42 AM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 506

Rep: Reputation: 47
Concatenate audio files & add chapter markers


Is there a program that will take all the audio files in a folder, concatenate them into one audio file, and add chapter markers based on the files' names? Thanks
 
Old 12-11-2011, 04:40 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by Geremia View Post
Is there a program that will take all the audio files in a folder, concatenate them into one audio file, and add chapter markers based on the files' names?
probably not - to begin with, I'm not sure if there is any audio file format that natively supports chaptering. I don't know any.
So you'd have to think of an add-on for indexing/chaptering.

Concatenating, however, is trivial with headerless audio file formats like the popular mp3 - you can really concatenate mp3 files without any further processing, because each data block can be looked at independently.
It is not trivial for file formats that do have a file header, like Windows wav or wma.

[X] Doc CPU
 
Old 12-11-2011, 12:50 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Your question is a lot like asking "can I throw several foods together into a bowl and have an edible dish?" The answer of course depends on what "foods" you use.

In this case, what exactly does "audio file" mean to you? There are many different container formats and codecs available, each with different capabilities. Whether they can be "wrapped" and "tagged" depends on which ones you use.

As mentioned by the Doc above, mpeg-based formats can generally be simply concatenated together because their codecs and containers are granular in nature. The combined file should play just fine. However, the metadata of the catted files, and the playing time in particular, may not perfectly match the exact nature of the contents.

If you're interested in mp3 files in particular, then you might check out mp3wrap, and it's inverse, mp3splt.

http://mp3wrap.sourceforge.net/
http://mp3splt.sourceforge.net/mp3splt_page/home.php


OTOH, also as mentioned, containers like wma and avi, to take another example, are non-granular and only have a single header block at the beginning of the file. Catting two of them together would usually only cause the player choke when it hit the second one.

On the gripping hand, I believe flac has a fairly flexible metadata system, with the ability to specify index points inside its stream. I suppose that would allow for multiple tracks to be combined. I'm not to familiar with how it works exactly though.

There are also file combinations like bin/cue or flac/cue, where the sound data is stored in one binary file and the meta-info describing the tracks it contains is stored in a separate text file.

Finally, even when there is a technique you can use, you often have to ensure that all the files have the same basic format, sample rate, and other parameters. You can't usually mix&match without converting everything into a unified format.
 
  


Reply

Tags
chapter, concatenate, mark



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to concatenate rows of 2 files ! noony123 Linux - Newbie 19 04-06-2011 10:11 AM
[SOLVED] Concatenate and labeling files wisnoskij Linux - Newbie 4 05-06-2010 06:58 AM
Adding chapter markers to videos nokangaroo Linux - Software 5 03-05-2010 04:02 AM
Script to concatenate several files docaia Linux - General 10 02-03-2008 01:59 PM
concatenate binary files???? justin19fl Linux - Newbie 6 05-14-2001 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration