[SOLVED] Extracting audio from video files -- which conversions are tricky?
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Extracting audio from video files -- which conversions are tricky?
I've been working more and more with music videos of choirs lately. I tend to download a video file, then convert it (using ffmpeg) to an audio file in one of the following formats: FLAC, OGG, WAV, AU.
I often edit the audio files using audacity.
The original files are either MP4 files or FLV files.
Can someone inform me as to whether there are better and worse choices for audio formats, or are the formats I mentioned without special problems?
FLAC is lossless. While some will have already been lost in the encoding for the video - It will at least retain what is there. I'd recommend that.
You can then export to whatever is suitable when needed.
The best thing to do generally is just to extract the raw audio stream as is and use that. The audio tracks of most media out there in the wild are already in one of the common lossy encodings; mp2, mp3, mp4, vorbis, wma, aac. "ffmpeg -acodec copy -vn" will extract the original audio stream from the source container. You can check the ffmpeg screen printout to see what the format/codec/stats are.
Your second best option would be to transfer it into a lossless format like flac or wav. This will give you an exact duplicate of the raw pcm audio -- including all the flaws that came from the previous lossy conversion. Note though that most people associate wav and flac with pristine CD-quality audio, and it can be easy to lose track of the ones that are actually lossy. Some people (like me) think that a lossless copy of a lossy recording is something of a travesty, except as a temporary step in a larger editing process.
As for editing, programs like audacity will likewise extract the source into a lossless format for internal use. So as long as the track sits in the editor you won't lose any quality (other than what you do to it in editing), but if you export it again into a lossy format you will incur further audio degradation.
In other words, as long as you keep either the original stream, or use a lossless codec, you'll maintain the best possible quality, but any conversion from one lossy codec to another will cause loss of sound quality, like making photocopies of photocopies.
Whether that's is a problem for you, or even noticeable, is up to you to decide.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.