1

Tried all various commands with ffmpeg and also tried using mkvconvert and while they both instantly convert or extract the .opus from the .webm file.. the problem is the output file is always slightly smaller in size, instead of being the exact same... and as a result when I try to open the files with Windows Media Player I get an error message:


Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file.


Screenshot - size comparison ffmpeg -i "%%~na.webm" -c:a copy "%%~na.opus"

The only way I've found to correctly convert the files manually is simply open each of the WebM files in Notepad++ and then Save as .opus. And it works perfectly. But I want to be able to do the same thing automatically with ffmpeg.

Already searched for like a few hours, and tried lots of commands, but nothing worked.

Also tried mkvextract "%%~na.webm" tracks 0:"%%~na.opus"" which has the same error problem. Screenshot - file comparison

goldnick7
  • 372
  • 2
  • 14

1 Answers1

0

ren "%%~na.webm" "%%~na.opus" works perfectly.

goldnick7
  • 372
  • 2
  • 14
  • 1
    This is a bad idea. Renaming the file doesn't change the format. It may satisfy WMP, but a genuine `.opus` file doesn't contain any of the metadata structures present in a WebM file nor can it contain video or other data streams. Other players expecting a genuine opus file will fail. – Gyan Dec 21 '20 at 09:27
  • Yeah no problem, I can any time convert them to opus using ffmpeg if I need to. – goldnick7 Dec 21 '20 at 17:51