View Full Version : Converting WMV to MP4/MKV without losing quality?
kolamorx
11th September 2019, 09:32
Is it possible to convert WMV to MP4/MKV without losing quality?
videoh
11th September 2019, 14:58
Re-muxing does not alter the elementary streams.
manolito
11th September 2019, 16:46
Re-muxing does not alter the elementary streams.
This is true, but AFAIK it works only for an MKV container and not for MP4. Or did I miss some new features of the MP4 container format?
Out of curiosity I tried to repack a WMV2 file into an MP4 container, but all my tools failed. FFMpeg gave me this error:
codec not currently supported in container
MP4Box quit with an unknown error, and MkvToMp4 insisted on recoding the streams to AVC/AAC.
kolamorx
11th September 2019, 17:02
AFAIK it works only for an MKV container
Which tool can do it?
Stereodude
11th September 2019, 17:17
Which tool can do it?
Like this for a simple wmv with one audio and video track:
ffmpeg.exe -i "source.wmv" -c:v copy -c:a copy "output.mkv"
Keep in mind the audio and video codecs in the resulting .mkv are still the same as the source .wmv. This conversion may not help you play the file on some device / software if that's what you're trying to do with this "conversion".
stax76
11th September 2019, 21:27
@kolamorx
If you need a GUI maybe try staxrip, it supports stream copy for audio and video and it supports ffmpeg as muxer.
If want to use or learn the command line then maybe try PowerShell.
kolamorx
11th September 2019, 22:48
Like this for a simple wmv with one audio and video track:
ffmpeg.exe -i "source.wmv" -c:v copy -c:a copy "output.mkv"
This works well, thank you.
wimm
7th January 2020, 13:54
Yes. Try to use some video converters. I use Joyoshare Video Converter. It can convert WMV to MP4/MKV without losing quality.
stax76
7th January 2020, 14:28
Yes. Try to use some video converters. I use Joyoshare Video Converter. It can convert WMV to MP4/MKV without losing quality.
Commercial ffmpeg GUIs are usually garbage, it's true.
StainlessS
30th April 2020, 14:31
DEMO.BAT
REM https://forum.doom9.org/showthread.php?p=1908619#post1908619
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."
REM Where to place OUTPUT files, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
REM ****** Un-REM [ie SELECT] ONLY one of below lines, Comment out ie REM the remaining lines.
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *****************************************************************************************.
)
Pause
REM ... Above Command lines, What they do if UnREM'ed (and all others REM'ed, UnREM=UnCOMMENT ) :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Convert Video to MagicYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (4) Convert Video to v410 Uncompressed 4:4:4 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (5) Convert Video to r210 Uncompressed RGB 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (6) Remux, copy both video and audio (output MKV - see file extension at the end of the Remux line, ie MKV).
REM (7) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (8) Skip any video, Convert Audio to 16 bit PCM (output WAV).
REM *****************************************************************************************.
REM In the UnREM'ed command Line [ie without a preceding REM]:-
REM '-vcodec utvideo' means convert video using utvideo codec.
REM '-vcodec copy' means copy video rather than convert.
REM '-vn' means no video output, use instead of eg '-vcodec utvideo'
REM '-acodec pcm_s16le' means convert audio using pcm_s16le codec.
REM '-acodec copy' means copy audio rather than convert.
REM '-an' means no audio output, use instead of eg '-acodec pcm_s16le'
REM The file extension at end of the line determines output container, eg '.AVI'
REM
REM From Command line with ffmpeg somewhere in your environment PATH:-
REM 'ffmpeg -codecs >D:\ffmpeg_codecs.txt'
REM Writes a txt file of ffmpeg available codecs to D:\
REM At start of txt file it shows a 'legend' or 'key' for codecs that can be used for video and audio,
REM use only ENCODING SUPPORTED codecs, prefereably LOSSLESS.
REM Supported codecs will vary with ffmpeg version.
REM *****************************************************************************************.
REM out line 1, and un-REM line 6 for remux to MKV, change output extension on line 6 [at the end of line] to MP4 for mp4.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.