So apparently all my video converters cannot convert a MKV video if it has Opus audio. Google hasn't helped much, something about ffmpeg command lines and ffbatch. I tried ffbatch but it keeps asking for various different base files
+ Reply to Thread
Results 1 to 25 of 25
-
Windows 10, MPC-BE
-
You should quote the entire error message.
Make sure you have a ffmpeg with all the external libraries built in -- usually called a "static" build. Ffmpeg.exe should be something like 65 MB. If it's much smaller a bunch of dll are needed. The build from this site is a static build:
https://www.videohelp.com/download/ffmpeg-4.3.1-win64-static.zip -
Thanks that worked. For the batch command is it possible to make it a bat file? Maybe also pointing to mkv files on the desktop?
Windows 10, MPC-BE -
-
I created the batch file and clicking it opens cmd for an instant and disappears
Windows 10, MPC-BE -
I see now I have to move all ffmpegfiles on the desktop but is there a cleaner way via shortcuts?
Windows 10, MPC-BE -
Just specify the full path to ffmpeg.exe in the batch file. I also recommend you put a pause at the end of the batch file so you can see any error messages. Something like:
Code:for %%f in (*.mkv) do "c:\program files\ffmpeg\bin\ffmpeg.exe" -i "%%f" -c:v copy -c:a aac "%%f.aac.mp4" pause
-
thanks guys. one last thing. the output name is good but can it be pointed to a dir as well?
Windows 10, MPC-BE -
Just change the output filename. For example, this will create a folder called New and encode the new file to that folder with the same name as the original file:
Code:md New for %%f in (*.mkv) do "c:\program files\ffmpeg\bin\ffmpeg.exe" -i "%%f" -c:v copy -c:a aac "New\%%f" pause
-
Isn't the extension required as well?
Code:for %%F in (*.mkv) do "C:\wherever\ffmpeg\is located\ffmpeg.exe" -i "%%F" -c:v copy -c:a aac "%%~nF.mp4"
Code:ffmpeg -i "input.mkv" -vn -c:a pcm_s16le -f wav - | qaac - -o "audio.m4a" ffmpeg -i "input.mkv" -i "audio.m4a" -map 0:0 -map 1:0 -c:v copy -c:a copy "output.mkv"
But again it's more complicated, next level stuff. At least, if using ffmpeg's internal AAC encoder, it would be advised to specify a higher bitrate than the default 128kbps, by adding for instance “-b:a 192k”.
Code:for %%F in (*.mkv) do "C:\wherever\ffmpeg\is located\ffmpeg.exe" -i "%%F" -c:v copy -c:a aac -b:a 192k "%%~nF.mp4"
And wouldn't that folder be placed in the folder of ffmpeg?
Code:CD "C:\Users\[user name]\Desktop" md "New"
Code:C: CD "C:\Users\[user name]\Desktop" md "New"
I tried your method and also tried using a full path to desktop but neither worked -
No, it will be created in the same folder as the batch file.
I believe you can make up for ffmpeg's aac's inferior performance by specifying a higher bitrate than the default (128k). Something like "-b:a 192k".
And you don't have to use aac at all. I just picked it because it's a commonly used audio codec.Last edited by jagabo; 30th Dec 2020 at 21:51.
-
Sorry, what I meant was that the folders, locations are inconvenient. I still have to put the mkvs in the ffmpeg folder and create a new folder on desktop for output. But not a big deal since mkvs with Opus audio is rare. I should email the converter people to tell them the apps need Opus support
Windows 10, MPC-BE -
Sorry, what I meant was that the folders, locations are inconvenient. I still have to put the mkvs in the ffmpeg folder and create a new folder on desktop for output.
With more experience one can type custom commands from the command prompt (it can be preferred if it's a simple command used once or very occasionally, otherwise creating a script is preferred for commands that are more complex or used regularly).
There's also a way to make it so that a batch script processes any relevant file that is dragged-and-dropped onto its icon (so it can be put on the desktop for instance if used very often), this may be more convenient to you ; I have seen scripts meant to do that around here, but have never tried, someone may chime in to elaborate on that.
I should email the converter people to tell them the apps need Opus support
@jagabo
And you don't have to use aac at all. I just picked it because it's a commonly used audio codec.(As I did when mentioning the intricacies of various AAC encoders... When I try to teach my mother something on tha computer I'm always tempted to mention several possible ways of doing the same thing, but she stops me right away : one way is enough for my little head, she says...)
{1} There are enough copies of ffmpeg.exe on a video enthusiast's system nowadays, you don't want to create moar on your own...
{2} I have been reporting the same bug to the developpers of Bulk Rename Utility for 2 years, it still hasn't been corrected... Just sent a rather pis*ed off message a few days ago when I tried the newest version and noticed with utter dismay that it was still there. (For those interested : when applying any name change, then undoing said operation, the files' timestamps get shifted back by 1 or 2 hour(s), apparently depending on the current DST settings ; and get shifted back again if another renaming operation is undone, and so forth ; this, despite the fact that any option pertaining to voluntarily modifying the timestamps is disabled. I noticed it first when doing a full comparison between my main all-purpose storage HDD and its backup — some files were detected as different by WinMerge in size + date analysis, and indeed the dates were shifted by 2 hours on the active HDD, sometimes 4 hours if I had undone two renaming operations...)Last edited by abolibibelot; 31st Dec 2020 at 04:13.
-
I tried AVC and Aimersoft VC and they didn't convert at all. I posted on here months ago for the same problem but I was looking for a VC that properly works with the styles in ASS subs. I believe I even tried Handbrake and mkvtoolnix and they did successfully "convert" but the videos were not playable on ps3, and still were not re-convertible in other apps. I have emailed them a few times already but maybe they don't care to modernize their apps for a fairly new audio format.
Windows 10, MPC-BE -
With the bat file I gave in post #13 (once you've changed the path to ffmpeg.exe) all you have to do is copy the batch file to the folder full of MKV files you want to convert, then double click on it.
To quickly convert individual files you can put this batch file in your SendTo folder with the name ConvertAudioToAAC.bat. You only have to do this once. Then in Explorer you can right click on any video file and select Send To -> ConvertAudioToAAC.bat.
Code:"c:\program files\ffmpeg\bin\ffmpeg.exe" -i "%~dpnx1" -c:v copy -c:a aac "%~dpn1.aac%~x1"
-
MKVToolNix (GUI for mkvmerge which can also be used through command line) doesn't reencode anything by design, it only allows to add or reorganize streams in MKV files. It should be fully compatible with ASS subtitles, and seemingly has been for a long time (the MKV movie that is mentioned in this thread was generated with a 2015 build of mkvmerge, and it contains ASS files of a sophistication level I had never encountered before, with for instance translated rotated newspaper titles that move in perfect sync with the backward zoom + left travelling, truly awesome work).
Handbrake, on the other hand, always reencodes video streams (only the audio can be copied unchanged in “pass through” mode), so it's not ideal for this particular task (you only want to convert the audio, converting the video as well would unnecessarily degrade the quality while also taking much longer).
A video converted by Handbrake which is not playable on a (relatively old) standalone device : may be related with a “variable framerate” flag. Or an out of specifications AVC profile. Someone may elaborate on that.
“AVC” AFAIK is the generic name of the H.264 codec (Advanced Video Codec), it would be surprising if a video conversion utility had that exact name. Don't know about Aimerfoft VC.
If you absolutely, positively want a GUI, then perhaps the oft mentioned (by its author it would seem) clever FFmpeg GUI may suit your needs (disclaimer : I haven't tried it).
@jagabo
Code:"c:\program files\ffmpeg\bin\ffmpeg.exe" -i "%~dpnx1" -c:v copy -c:a aac "%~dpn1.aac%~x1"
Last edited by abolibibelot; 31st Dec 2020 at 08:07.
-
Yes.
It means argument #1 on the command line. Drag/drop or SendTo is the equivalent of typing the command with with the filename as argument #1. If you drag/drop multiple files they will be %1, %2, %3, etc.
No, but I used the former for consistency with the output filename. Also, %1 will already have quotes if there is a space in the filename. "%1" will then have two quotes ""x:\the path\to\filename.ext"" and will fail. %dpnx1 will never have quotes so you have to supply your own. "%dpnx1".
%% is required in a for loop in a batch file. % works when there is no for loop.
Similar Threads
-
Audio Sync problems using TSMuxer and converting a Eac3 MKV to AC3 Atmos
By damo17 in forum Video ConversionReplies: 2Last Post: 20th Nov 2019, 22:50 -
MP4 audio reports AAC but is actually Opus. Possible to repair?
By Dsme217 in forum Newbie / General discussionsReplies: 7Last Post: 5th Mar 2019, 14:44 -
Video is muted after multiplexing with Opus audio
By TeNSoR in forum AudioReplies: 9Last Post: 15th Jul 2018, 16:04 -
Dealing with OPUS audio of MP4/WEBM/MKV
By ConverterCrazy in forum Newbie / General discussionsReplies: 3Last Post: 31st Dec 2017, 01:36 -
no audio after converting MKV to MP4
By Frustrated Geezer in forum Newbie / General discussionsReplies: 7Last Post: 29th Sep 2017, 06:32