Hello,
Exporting to mp4 from Magic Studio seems to always use a low audio bitrate of 132kbps, even though the audio track used for the source is much higher.
How can I increase the audio bitrate?
Thanks in advance.
mp4 audio bitrate
Re: mp4 audio bitrate
For .movs, the audio will not be compressed in order to preserve maximum quality.
Re: mp4 audio bitrate
Thanks. Indeed I noticed audio rate is around 1.4Mbps for .mov files, but the file size is huge (pro-res).Wolf_T wrote:For .movs, the audio will not be compressed in order to preserve maximum quality.
Any idea how to get higher audio rate in .mp4 files? Can Magic please make this a feature for next update please? This is after-all a "music" visualizer.
Thanks a lot.
-
- Posts: 719
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: mp4 audio bitrate
I vaguely remember using ffmpeg to replace the audio in an mp4 file, which it could do without re-encoding the video. The process ran very quickly, even with a 40 minute video.
I think that you could get any bit rate with that approach.
I'll see if I can find my ffmpeg command string.
I think that you could get any bit rate with that approach.
I'll see if I can find my ffmpeg command string.
-
- Posts: 719
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: mp4 audio bitrate
Replacing an mp4 audio file can be done! Windows example follows.
Sorry, I don't have time at the moment to simplify the following into a simple command for one file. Hopefully the following will be useful, or at least inspiration for your own internet search (or ChatGPT query).
I found the ffmpeg string (in bold below), but clearly it was something that I'd found or adapted from an internet post - as I don't fully understand it! Furthermore it was within a Windows batch file, invoked from a second batch file which was designed to operate on a directory containing many mp4 files. I can't attach batch files, but following are the filenames and contents.
StartRemux.bat
Notes
What does the following ffmpeg command string do? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
This FFmpeg command performs the following tasks:
This command is essentially remuxing the audio and video streams of the two input files into a single output MP4 file while converting the audio to AAC format.
How do I change the following ffmpeg command string if I want to spacify the audio bitrate? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
To specify the audio bitrate in the FFmpeg command, you can add the "-b:a" option followed by the desired bitrate value, in bits per second. Here is an example:
In this example, the audio bitrate is set to 128 kilobits per second (128k). You can adjust this value to a different value as needed.
Sorry, I don't have time at the moment to simplify the following into a simple command for one file. Hopefully the following will be useful, or at least inspiration for your own internet search (or ChatGPT query).
I found the ffmpeg string (in bold below), but clearly it was something that I'd found or adapted from an internet post - as I don't fully understand it! Furthermore it was within a Windows batch file, invoked from a second batch file which was designed to operate on a directory containing many mp4 files. I can't attach batch files, but following are the filenames and contents.
StartRemux.bat
- for %%F in (*.mp4) do remux_settings_.bat "%%F"
- ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4
Notes
- The batch files must run in a directory with no spaces in the filepath, likewise filenames must have no spaces.
The video and replacement audio files must be in the same directory as the batch files.
The video and audio files must have the same base name.
A copy of ffmpeg must be in the same directory (or on the Windows search path).
To start the process, open a PowerShell Window (shift-rightclick on the directory), then type ".\startremux"
What does the following ffmpeg command string do? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
This FFmpeg command performs the following tasks:
- 1) Takes two inputs: an MP4 video file and a WAV audio file, both of which have the same base file name, directory and path as the batch script or command line argument that is running this FFmpeg command.
2) Copies the video stream of the MP4 file (-c:v copy) and encodes the audio stream of the WAV file into Advanced Audio Coding (AAC) format (-c:a aac).
3) Maps the first input file's video stream (00) and the second input file's audio stream (10) to the output file.
4) Generates an output MP4 file with "_n" added to the end of its base file name, which is the same as the input files' directory and path.
This command is essentially remuxing the audio and video streams of the two input files into a single output MP4 file while converting the audio to AAC format.
How do I change the following ffmpeg command string if I want to spacify the audio bitrate? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
To specify the audio bitrate in the FFmpeg command, you can add the "-b:a" option followed by the desired bitrate value, in bits per second. Here is an example:
- ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -b:a 128k -map 00 -map 10 %~d1%~p1%~n1_n.mp4
In this example, the audio bitrate is set to 128 kilobits per second (128k). You can adjust this value to a different value as needed.
Re: mp4 audio bitrate
Many thanks Terry!
Terry Payman wrote:Replacing an mp4 audio file can be done! Windows example follows.
Sorry, I don't have time at the moment to simplify the following into a simple command for one file. Hopefully the following will be useful, or at least inspiration for your own internet search (or ChatGPT query).
I found the ffmpeg string (in bold below), but clearly it was something that I'd found or adapted from an internet post - as I don't fully understand it! Furthermore it was within a Windows batch file, invoked from a second batch file which was designed to operate on a directory containing many mp4 files. I can't attach batch files, but following are the filenames and contents.
StartRemux.batremux_settings_.bat
- for %%F in (*.mp4) do remux_settings_.bat "%%F"
- ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4
NotesWith no time to remember or figure out what all the ffmpeg switches do I asked ChatGPT!
- The batch files must run in a directory with no spaces in the filepath, likewise filenames must have no spaces.
The video and replacement audio files must be in the same directory as the batch files.
The video and audio files must have the same base name.
A copy of ffmpeg must be in the same directory (or on the Windows search path).
To start the process, open a PowerShell Window (shift-rightclick on the directory), then type ".\startremux"
What does the following ffmpeg command string do? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
This FFmpeg command performs the following tasks:
- 1) Takes two inputs: an MP4 video file and a WAV audio file, both of which have the same base file name, directory and path as the batch script or command line argument that is running this FFmpeg command.
2) Copies the video stream of the MP4 file (-c:v copy) and encodes the audio stream of the WAV file into Advanced Audio Coding (AAC) format (-c:a aac).
3) Maps the first input file's video stream (00) and the second input file's audio stream (10) to the output file.
4) Generates an output MP4 file with "_n" added to the end of its base file name, which is the same as the input files' directory and path.
This command is essentially remuxing the audio and video streams of the two input files into a single output MP4 file while converting the audio to AAC format.
How do I change the following ffmpeg command string if I want to spacify the audio bitrate? "ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -map 00 -map 10 %~d1%~p1%~n1_n.mp4"
To specify the audio bitrate in the FFmpeg command, you can add the "-b:a" option followed by the desired bitrate value, in bits per second. Here is an example:
- ffmpeg.exe -i %~d1%~p1%~n1.mp4 -i %~d1%~p1%~n1.wav -c:v copy -c:a aac -b:a 128k -map 00 -map 10 %~d1%~p1%~n1_n.mp4
In this example, the audio bitrate is set to 128 kilobits per second (128k). You can adjust this value to a different value as needed.