Install FFmpeg flac eric@ray:~$ sudo apt install FFmpeg flac Install lame faac eric@ray:~$ sudo apt install lame faac Convert a video with the .ape extension to m4a (mp4) format 1. First, use the ffmpeg command or flac command to convert it to mav format, and then use lame to convert wav to mp4 format eric@ray:~/Music$ ffmpeg -i Gracie-Theme.ape Gracie-Theme.wav ##or eric@ray:~/Music$ flac -d Gracie-Theme.flac Gracie-Theme.wav 2. Use the lame command to compress it into MP3 ##Use lame command: Use VBR dynamic bit rate compression, 0 means the highest quality, 9 means the lowest quality, the default is 4 eric@ray:~/Music$ lame -v Gracie-Theme.wav ##Or use faac encoding to get m4a (mp4) or mp3 format files: 100 means the highest quality is 100% eric@ray:~/Music$ faac -w -q 100 Gracie-Theme.wav -o Gracie-Theme.mp4 3. You can also use ffmpeg to compress to get m4a format: #Here we use the built-in aac encoding of ffmpeg, and set the bit rate to a fixed 320k eric@ray:~/Music$ ffmpeg -i Gracie-Theme.wav -strict experimental -c:a aac -b:a 320k Gracie-Theme.m4a #You can also use ffmpeg to decompress and compress in one command: -map_metadata means to keep the song metadata, i.e. name, singer, etc. eric@ray:~/Music$ ffmpeg -i Gracie-Theme.flac -ab 320k -map_metadata 0 Gracie-Theme.m4a 4. Batch scripts #!/bin/bash for FILE in *.ape; do ffmpeg -i "$FILE" temp.wav; lame -b 320 temp.wav "${FILE%.*}.mp3"; rm temp.wav done For an ape/flac file containing multiple songs In this case, there is usually a cue file, which contains the album name, singer name, name of each song, and time range of the ape/flac file. You can first use the above method to convert the entire file into Mp3 format, and then use the mp3splt tool to split it. Split cue file into mp3: eric@ray:~/Music$mp3splt -c song.cue -o @n.@t song.mp3 Common parameters: @a: singer name @b: Album title @t:Song title @n: track number Audio Merger # Audio merging (two audios overlap) eric@ray:~/Music$ffmpeg -i first.mp3 -i second.mp3 -filter_complex amix=inputs=2:duration=first:dropout_transition=2 -f mp3 third.mp3 #Two audio splicing eric@ray:~/Music$ffmpeg -i d1.mp3 -i d2.mp3 -filter_complex '[0:0] [1:0] concat=n=2:v=0:a=1 [a]' -map [a] j5.mp3 #Three audio splicing eric@ray:~/Music$ffmpeg -i title.wav -i content.WAV -i end.wav -filter_complex '[0:0] [1:0] [2:0] concat=n=3:v=0:a=1 [a]' -map [a] synthesis.wav References FFmpeg and AAC Encoding Guide https://trac.ffmpeg.org/wiki/Encode/AAC The above Linux command method to achieve audio format conversion and splicing is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to determine if the Linux system is installed on VMware
>>: JavaScript built-in date and time formatting time example code
1. WebDesignerWall 2. Veerle's Blog 3. Tutori...
Table of contents Preface Installation and Usage ...
> Deploy MySQL 5.7 cluster master & slave ...
Recently I used MySQL to export table data to an ...
1. position : fixed Locked position (relative to ...
Table of contents Written in front Several storag...
In writing styles, we can often see this situatio...
Table of contents Project Background Improvement ...
background Last week the company trained on MySQL...
1. Mirror images disappear in 50 and 93 [root@h50...
I don’t know if you have ever encountered such a ...
SVN is the abbreviation of subversion, an open so...
1.1 General marking A general tag consists of an ...
Before installing Tomcat, install the JDK environ...
Find the running container id docker ps Find the ...