Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Audacity - file formats i can edit ? (Read 25625 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Audacity - file formats i can edit ?

a long time ago, i used audacity quite a bit to edit mp3 files.

i was wondering if i can use audacity to edit m4a files ?

when i read some instructions, it gave mention of exporting to wav and mp3, but nothing else ?

are these the only 2 file types that i can create ?

i want to input an m4a file, do some editing, and then output an m4a file

most of the editing is simple stuff, like deleting the start and finish of a file, and possibly do a crossfade ending.  and sometimes a tempo change.  that is what i did on the mp3 files in the past

thanks

Re: Audacity - file formats i can edit ?

Reply #1
You will need to install the FFmpeg Library Download  for Audacity
 To save to m4a you will need to go to Export - Export Audio... change Save as type to M4A (AAC)

Re: Audacity - file formats i can edit ?

Reply #2
thanks,  audacity is not the most intuitive of applications.  i recall that from when i used to use it.  but after i figured out how to do the things i wanted to do, it was an effective one.  so i guess i am gonna struggle all over again, trying to use it - LOL.

i was able to successfully clip off a start of a song (it had annoying teeth whistling), and save it successfully.  the only metadata that it did not save (that i am aware of) is the composer field, and the attached front picture.  but i was able to reload that. 

and now i have a song that i dont have to grit for the first 5 seconds !!!

thank you

Re: Audacity - file formats i can edit ?

Reply #3
I'm not saying this is audible, but just something to know: when you open a lossy file with Audacity and save it back as lossy, it is not a "lossless" tranaction.  You have effectively transcoded the file from lossy to lossy.

If you want lossless editing of MP3/AAC, you can use mp3DirectCut:
https://mpesch3.de/

Re: Audacity - file formats i can edit ?

Reply #4
gosh, i didnt know that i did that ?  i opened an m4a file.  did my cut, and then saved it as an m4a file.

i have used mp3directcut in the past quite a few times on my previous computer.  that is real easy to use.  i guess from the name of it, i figured it only worked on mp3s.  but if it also works on m4as, i will use it for all my cutting

still need to use audacity for tempo changes, and other stuff.  so glad i downloaded it

Re: Audacity - file formats i can edit ?

Reply #5
i currently have directcut on my computer.  i guess i must have cut some mp3 files with it.  it wont find any m4a files.  i am on version 2.11.  is there a later version that supports m4a files ?

Re: Audacity - file formats i can edit ?

Reply #6
i tried to download the latest version of mp3directcut, but after clicking, nothing happened.  i went to the nch website.  it is not mentioned.  they do have a wavepad editor for $70.  sounds like a pretty good program.  i dont mind a one time $70 purchase.  it sounds like it does a lot more things than directcut does ?  anyone use it before ?

Re: Audacity - file formats i can edit ?

Reply #7
i tried to download the latest version of mp3directcut, but after clicking, nothing happened.  i went to the nch website.  it is not mentioned.  they do have a wavepad editor for $70.  sounds like a pretty good program.
With wavepad it will still be lossy when you are editing m4a files and saving again.

Re: Audacity - file formats i can edit ?

Reply #8
i see.  even though i import and export in m4a format, the editing is done in a lossy format ?

gosh, that is ridiculously misleading by nch

i am not having any success downloading the most recent version of mp3directcut.  if i am eventually able to use it to cut an m4a file, will it still be a lossless file, after i cut it ?

Re: Audacity - file formats i can edit ?

Reply #9
Did you use the link I provided?  Yes, other than the edited parts the remainder of the file is unchanged.

i see.  even though i import and export in m4a format, the editing is done in a lossy format ?
Not exactly.  Audacity opens the file into 32-bit floating point PCM; no loss there.  All editing is done in 32-bit as well.  The "loss" is in the exporting back to MP3 or AAC.  You've taken a file already lossy to the original source and lossy-encoded it a second time.  The degree to which people believe this is audible, however, is greatly exaggerated.  If the original file is low-bitrate, you can introduce audible artifacts by "transcoding"; if the original is higher bitrate (for argument sake, say 192kbps or more), differences are likely to be inaudible.  In contrast, mp3DirectCut edits the content of the target MP3 or AAC frames and never converts the file out of its original format.  Hope that makes sense.

Re: Audacity - file formats i can edit ?

Reply #10
hi ab,

yes, i did use the link you provided.  your explanation about directcut makes perfect sense.  i simply lopped off a portion of the file, and it never changed anything about the format, so the same format is there.

what is confusing is that you are describing the m4a as a lossy to the original (i am assuming you are talking about a wav file ?).  i was thinking that the m4a is LOSSLESS ?

so i am inputting a lossless, doing some editing, and then outputting a lossless.

you also just mentioned that the unchanged portion of it stays the same.  it would seem to me then that this particular file is still lossless.  cuz i simply cut off a portion of it.  did not change anything about what i kept.

but i would not be able to use audacity for a tempo change, and keep it lossless, cuz now i am attempting to edit the complete file.  so if i am understanding you correctly, if i attempt to keep a changed portion of the song, then that portion will not be lossless.  whether i can tell the difference is all subjective.  but at least analytically, the output is no longer lossless.

it is great to at least understand the situation, cuz then i can make decisions about it - depending on how much i like the song, and how irritating the irritating portion is.

if i really like an end result to whatever i am doing, my thought process (based upon your explanation) is that i can convert my wv file to a wav.  do whatever editing i want to do with audacity or directcut.  output to a wav.  and then convert it to an m4a.  and then type in all the metadata.  i would probably be willing to do that for at least some songs.  others i will either tolerate or simply delete.

i hope i made sense to you.  and you can tell me if i am understanding the situation or not - LOL.

Re: Audacity - file formats i can edit ?

Reply #11
i logged into my admin account, and was able to download the upgraded mp3directcut.  version 2.34.  it does allow for aac, but not for m4a.  so i dont think directcut is gonna work for me for my m4a lossless library.

Re: Audacity - file formats i can edit ?

Reply #12
i was thinking that the m4a is LOSSLESS ?
It's confusing because M4A is the file extension Apple uses for both AAC lossy and ALAC Apple Lossless. Which codec are your files?

Re: Audacity - file formats i can edit ?

Reply #13
all of my files are lossless.  that is the whole purpose of this project, having a terrabyte ipod with everything being lossless.  that can be verified by viewing the "kind" option in itunes.  it clearly says apple lossless.  when i convert in foobar, i click on apple lossless.

 

Re: Audacity - file formats i can edit ?

Reply #14
boy, these results are really confusing

1) me and my imagination by guy mitchell.  the convert to apple lossless takes 7.36 MB, and lasts 2:59.  i lopped off the initial teeth whistling, and now the file takes up 9.6 MB, but only lasts 2:47.

2) lover please by clyde mcphatter.  the convert to apple lossless takes 12.4 MB, and lasts 1:58.  i lopped off the last 3 seconds, because it was basically just silence, with audacity.  i now have a file that is only 6.58 MB, and lasts 1:55.  when i do a tempo change on that of +12%, i end up with a file that is 5.99 MB, and lasts 1:44.

the only thing that makes sense is the tempo change result.  a fairly proportional cut in both the megabytes and length of song.

but the other stuff is just strange.  with imagination, all i do is lop of the first 12 seconds, and now the file is bigger ?  and with lover please, i lop off 3 seconds at the end, and i lose almost half of file size.

by viewing these results, i see no way of predicting what the program is gonna do ???

Re: Audacity - file formats i can edit ?

Reply #15
boy, these results are really confusing

1) me and my imagination by guy mitchell.  the convert to apple lossless takes 7.36 MB, and lasts 2:59.  i lopped off the initial teeth whistling, and now the file takes up 9.6 MB, but only lasts 2:47.

I know its an old song, but 7.36 MB for a song that lasts 2:59 seems on the small side for a lossless file.

Re: Audacity - file formats i can edit ?

Reply #16
Audacity itself isn't doing much in terms of decoding and encoding formats and codecs by itself, it's the libraries you install along with it, which do the decoding/encoding and muxing. Any file you import is decoded into its uncompressed sample format.
When you export audio to a file, it'll use whatever encoder you like to render that file as whatever codec and format.

You can even use external programs:

  • File > Export > Export Audio... (Shift + Ctrl + E)
There on the bottom right, should be a pull-down menu, click on it and one of the options should be "(external program)".
This allows you to select whatever application to render the audio with. However there are limitations: that program must read the incoming data from STDIN and write to a file. Not all encoding tool can do that.

Audacity uses mostly lavf and lavcoded internally (those are the FFmpeg libs), and some other libraries (for instance libflac).
I never used Audacity on Windows or on a Mac, so I can't say how it uses libraries or external programs on those OSes. But I'm very sure you can just rely on external encoders "just to be sure".

Since you use .m4a files which are lossless (I'd assume they contain ALAC), you should be able to use an external program to render those files with your favorite encoder - the one you trust the most, I suppose.
To add to the confusion, there is also MPEG-4 ALS and MPEG-4 SLS which are also contained in .m4a files and are also lossless, but aren't ALAC...

Re: Audacity - file formats i can edit ?

Reply #17
boy, these results are really confusing

1) me and my imagination by guy mitchell.  the convert to apple lossless takes 7.36 MB, and lasts 2:59.  i lopped off the initial teeth whistling, and now the file takes up 9.6 MB, but only lasts 2:47.

I know its an old song, but 7.36 MB for a song that lasts 2:59 seems on the small side for a lossless file.

Using ffmpeg, it maybe thinks that ".m4a" means the user wants AAC? @HA-User , what do the Audacity-processed files show up as?


Edit: And as long as cutting is all you want, you might try https://github.com/mifi/lossless-cut .

Re: Audacity - file formats i can edit ?

Reply #18
all of my files are lossless.
Ok, then I'm sorry for taking you on a detour to mp3DirectCut; Audacity works fine with lossless files.  Just be sure that you are exporting to ALAC correctly:

https://manual.audacityteam.org/man/tutorial_exporting_to_itunes.html#alac

On my PC, the output via this method is 24-bit so it's larger than the original.  If you want 16-bit, try this commandline:

Code: [Select]
ffmpeg -i - -acodec alac -sample_fmt s16p "%f"
Tags do not seem to survive the export so they'll need to be re-added.

Re: Audacity - file formats i can edit ?

Reply #19
okay guys, i have some answers.  things are beginning to make sense.  how to fix them, i am not sure.  i am reasonably knowledgeable, and can have a discussion with you about bit rates and stuff.  but when you start asking me to fix command lines, and stuff like that - i am a little beyond my league.

in any case, i examined me and my imagination.  the only way i know of to look at the kind of file is to load it into itunes.  the original file is apple lossless.  the bit rate is 343, which i think is still quite a bit higher than an mp3, for example.  i am not real familiar with bit rate, but i know the higher the number, the better chance for a good sound.  i am wondering if one reason why this might be small for a lossless file is simply because of the song, itself.  it has a nice melody to it, but it is mostly guy singing, and a bit of music.  the amount of actual music being recorded is small, compared to a song with a bunch of instruments, etc.  that is just a guess on my part, based upon my limited knowledge of the situation.

the lopped off version of me and my imagination is at 479 kbps.  it is an aac file !!.  but it is at 479 kbps, higher than the 343 of the alac version.  which i am guessing is the reason why it takes up more megabytes.

the original lover please comes in at 879 kbps, encoded with refalac 1.71 Apple Lossless Encoder 723.  the 2 edited versions of it come in at 478 and 481 kbps and are AAC files.

they are encoded with lavf55.33.100 -  one question i have about foobar is that when i click on convert, there are 3 separate lines where you can click on apple lossless.  i always just click on the top one, to be consistent.  but i cant find out what the difference between the 3 lines is ?  but i highly suspect that there is some difference, and it is not just a bug.

so audacity is putting out aac files, instead of alac files.

i know this is a lot to digest, so i hope i am not confusing you guys.

but at least now, the results i got make sense to me

polemon was giving me advice on how to circumvent the audacity encoders, and use some sort of external ones.  which probably fixes my problem.  but it was getting beyond my comfort zone of being able to do what he was telling me to do

Re: Audacity - file formats i can edit ?

Reply #20
i downloaded LosslessCut.  i opened up hey jude.  it tells me that it is not a native file.  but it still plays.   am gonna lop off after 3:12.  i was able to figure out how to get my start and end points, and the first part is green.  when i go to export, it shows lossless cut (csv), timestamps (csv), timestamps (tsv/txt).  and there is an llc version.  i tried one of them, and it turned into a microsoft excel file.

i have not been able to figure out how to save it as a music file.  but being it came in as a non-native file,  i am not confident that this program is gonna work for me ?

the file that i opened was an apple lossless file, just converted from wv to m4a by foobar.

Re: Audacity - file formats i can edit ?

Reply #21
When using Lossless Cut did you use the Export button in the bottom right?

Re: Audacity - file formats i can edit ?

Reply #22
nope, never saw it !!

this program works well, for me - when all i have to do is cut off something.  it basically does the same thing that mp3directcut does for me, with mp3 files.

hey jude full length came in at a bit rate of 925.  i cut it to 3:12, and has a bit rate of 916.  i loaded it into itunes, and it is an apple LOSSLESS file.

i checked a few of the songs in itunes.  the bit rates vary by quite a bit.  but the sample size seems to always be 16 bit.  and the sample rate always seems to be 44.100 khz

btw, when i did the export, i left all the defaults the same
cut mode - keyframe cut
enable mov faststart - yes
preserve all mp4/mov metadata - no
shift timestamps - make zero

since i knew nothing about that, i wasnt gonna monkey around with it.

Re: Audacity - file formats i can edit ?

Reply #23
i cut it off at 3:12, instead of 3:09, cuz that gives me the possibility of doing a 3-second fade out in the future, if we get audacity able to output an alac file, instead of an aac file.

but the song is now enjoyable to me

Re: Audacity - file formats i can edit ?

Reply #24
with hey jude, i cut off the end of the song

i went back to use it for me and my imagination, where i am cutting of at the start of the song.  i got the green part okay.  it says segment to export - starting at 00:00:11.694 to the finish.  the kilobytes did get smaller, from 7543 to 7058.  when i play it, it plays 12 seconds of silence, and then plays the cut song.