There are two standard ways of doing this: a for loop, and the find command. The next step is to get this working with multiple files. Or, a bit more readably: ffprobe -show_streams -select_streams a:0 -v quiet file.mp3 | grep -F 'bit_rate=320000' &įfmpeg -i file.mp3 -c:a libmp3lame -b:a 192k temp.mp3 & ![]() This means that you can chain that command with the ffmpeg command: ffprobe -show_streams -select_streams a:0 -v quiet file.mp3 | grep -F 'bit_rate=320000' & ffmpeg -i file.mp3 -c:a libmp3lame -b:a 192k temp.mp3 & mv temp.mp3 file.mp3 ![]() If you run it on anything with a different bit rate, you won't get any output at all grep will fail to make a match, and will exit with a status of 1. If you run this on a 320k kbps MP3, you'll get a line like this: bit_rate=32000 grep will only print those lines that match a given pattern - in this case, lines that contain the string bit_rate=320000. The pipe ( |) takes the standard output of ffprobe and feeds it to grep. show_streams tells ffprobe to show information about individual streams -select_streams tells it which ones to select, and a:0 means 'the first audio stream (this is important for MP3 files in the case of cover art, which is stored as a video stream). To check that what bit rate a file has, you can use ffprobe: ffprobe -show_streams -select_streams a:0 -v quiet file.mp3 | grep -F 'bit_rate=320000' The & there means that the mv command won't be executed unless ffmpeg exits with a status of 0 (which means success). You could combine these into a single line: ffmpeg -i file.mp3 -c:a libmp3lame -b:a 192k temp.mp3 & mv temp.mp3 file.mp3 For a single file, you could do: ffmpeg -i file.mp3 -c:a libmp3lame -b:a 192k temp.mp3 There is no tool that I am aware of that can read media files and then over-write the input straight away: you need to use an intermediate file. First of all: sudo apt-get install ffmpeg It’s possible that compatibility concerns with particular audio formats, the want for additional functionality that XRECODE doesn’t have, or the desire to locate an alternative that’s easier on the wallet led to this decision.Lame is perfectly suited to this task, but I'm going to use ffmpeg and ffprobe for this answer, because I know them like the back of my hand and because they can be generalised to more than just MP3s. In spite of the strengths of XRECODE, there are a number of other reasons why one should look for alternatives. ![]() Each has its own features to meet the different audio conversion needs of users. Along with FFmpeg, File Converter, fre:ac, Exact Audio Copy, and Format Factory are also great choices. FFmpeg, a free and open-source multimedia framework with powerful audio conversion features, is one of the best options to XRECODE. But users have more than 50 alternatives to choose from on systems like Windows, Linux, BSD, Mac, and Wine. It has become more common as an Audio Converter, which is a type of software for audio and music. It also has the useful trait of being able to pull audio from video files. XRECODE is known for being able to convert multiple audio files quickly and at the same time, taking advantage of multi-core CPUs. Factors to Consider When Choosing XRECODE Alternatives.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |