Can someone please help me with this command? The audio won't convert to the desired codec nor bitrate. It just creates a copy of the original and changes the output to the desired (.mp4).
set avidemux="C:\Program Files\Avidemux 2.7 VC++ 64bits\avidemux.exe"
set videocodec=copy
set audiocodec=AAC
set audiobitrate=160
for %%f in (*.mkv) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --audio-bitrate %audiobitrate% --load "%%f" --save "%%f.mp4" --quit
+ Reply to Thread
Results 1 to 13 of 13
-
-
I don't know what the issue is with avidemux, but you could use ffmpeg instead:
Code:set avidemux="ffmpeg.exe" set videocodec=copy set audiocodec=aac set audiobitrate=160k for %%f in (*.mkv) do %avidemux% -i "%%f" -c:v %videocodec% -c:a %audiocodec% -b:a %audiobitrate% "%%f.mp4"
-
-
ffmpeg is far more amazing than avidemux. Some basic info:
https://ffmpeg.org/documentation.html
https://ostechnix.com/20-ffmpeg-commands-beginners/
https://www.programminglogic.com/list-of-basic-ffmpeg-commands/
By the way, maybe avidemux needs "AAC" to be lower case too. -
I noticed recently, while trying to help someone with a similar issue, that many options have been removed from Avidemux 2.7 as compared with earlier versions. No idea why.
In particular --audio-bitrate is no longer available.
https://forum.videohelp.com/threads/398292-Help-using-avidemux-command-line
Learning how to use ffmpeg might be wiser, as it is improving over time, not regressing, but if you absolutely, positively got to use Avidemux CLI, try to get v. 2.6 instead.
And I don't think that the arguments are case-sensitive, but "AAC" is apparently no longer accepted, it has to be a specific implementation like "FDK_AAC".
Code:--audio-codec, set audio codec (copy|Lame|FDK_AAC|LavAC3|Opus|TwoLame|...) (one arg )
http://avidemux.sourceforge.net/doc/en/command.xml.html
Moreover, do you by any chance have the link for all the commands available for ffmpeg?
@ jagabo
set avidemux="ffmpeg.exe"Last edited by abolibibelot; 10th Aug 2020 at 03:22.
-
-
Last edited by ProWo; 16th Mar 2021 at 07:34. Reason: wrong reply
-
Can someone tell me what I am doing wrong regarding ffmpeg.exe because I am trying to convert the mkv audio to HE-AAC while retaining the video copy. And, if possible, can you also provide a command for Change High Profile Level 5.1 to 4.1? Thank you.
1) Trying to convert mkv audio using HE-AAC codec (see .bat command script below):
set avidemux="ffmpeg.exe"
set videocodec=copy
set audiocodec=HE-AAC
set audiobitrate=56k
for %%f in (*.mkv) do %avidemux% -i "%%f" -c:v %videocodec% -c:a %audiocodec% -b:a %audiobitrate% "%%f.mp4"
2) Changing High Profile Level 5.1 to 4.1 without re-encoding. -
I get "Unkown encoder 'HE-AAC". I believe you need a build of ffmpeg that includes libfdk_aac. By the way, put "pause" at the end of your batch file so you can see the error message(s).
Last edited by jagabo; 16th Mar 2021 at 05:48.
-
Thanks. I tried adding the libfdk_aac in the batch as well, but it was ineffective. Nonetheless, I finally figured out the Avidemux encoding scripts using python scripts (.py). And in case you are interested, there's a video on youtube (https://www.youtube.com/watch?v=pxMeIU-ghXY) regarding its process, and I will attach two python scripts, in .txt, that I created (HE-AAC & LC-AAC) for you. Keep in mind that you will have to change the file extension of the .txt to .py, and thanks again.
-
Most builds of ffmpeg.exe don't include libfdk_aac because it's not "free". This site's build it has it build in:
https://www.reddit.com/user/VeritablePornocopium/comments/ccilei/ffmpeg_with_libfdk_aa...r_windows_x64/
And a batch file that uses it:
Code:set avidemux=ffmpeg.exe set videocodec=copy set audiocodec=libfdk_aac -profile:a aac_he set audiobitrate=56k for %%f in (*.mkv) do %avidemux% -y -i "%%f" -c:v %videocodec% -c:a %audiocodec% -b:a %audiobitrate% "%%f.mp4" pause
-
Thanks. I appreciate all the assistance. Moreover, I figured out how to reduce the Profile Level to my desired level, but in this case, 4.1.
set avidemux="ffmpeg.exe"
set videocodec=copy
set audiocodec=copy
for %%f in (*.mkv) do %avidemux% -i "%%f" -c:v %videocodec% -c:a %audiocodec% -bsf:v h264_metadata=level=41 "%%f.mp4"
pause
Similar Threads
-
has there EVER been a solution to Avidemux's no batch problem?
By KneeRow in forum Video ConversionReplies: 1Last Post: 23rd Aug 2019, 14:28 -
How to get started with avidemux, edit and convert any video format
By Baldrick in forum User guidesReplies: 114Last Post: 16th Nov 2017, 15:29 -
are there bugs in avidemux 2.6.21 additing audio & convert audio to stereo?
By rama in forum EditingReplies: 0Last Post: 7th May 2017, 04:06 -
VirtualDub - Batch Convert - MP4 To Uncompressed Video With No Audio
By TheRandomOne in forum Video ConversionReplies: 5Last Post: 26th Nov 2015, 02:28 -
Avidemux does not work when I try to convert movie audio from ac3 to aac
By sportflyer in forum Video ConversionReplies: 13Last Post: 3rd Nov 2015, 09:55