Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th September 2019, 09:32   #1  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Converting WMV to MP4/MKV without losing quality?

Is it possible to convert WMV to MP4/MKV without losing quality?
kolamorx is offline   Reply With Quote
Old 11th September 2019, 14:58   #2  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Re-muxing does not alter the elementary streams.
videoh is offline   Reply With Quote
Old 11th September 2019, 16:46   #3  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by videoh View Post
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:
Quote:
codec not currently supported in container
MP4Box quit with an unknown error, and MkvToMp4 insisted on recoding the streams to AVC/AAC.
manolito is offline   Reply With Quote
Old 11th September 2019, 17:02   #4  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Quote:
Originally Posted by manolito View Post
AFAIK it works only for an MKV container
Which tool can do it?

Last edited by kolamorx; 11th September 2019 at 17:05.
kolamorx is offline   Reply With Quote
Old 11th September 2019, 17:17   #5  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by kolamorx View Post
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".

Last edited by Stereodude; 11th September 2019 at 17:20.
Stereodude is offline   Reply With Quote
Old 11th September 2019, 21:27   #6  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
@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.
stax76 is offline   Reply With Quote
Old 11th September 2019, 22:48   #7  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Quote:
Originally Posted by Stereodude View Post
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.
kolamorx is offline   Reply With Quote
Old 7th January 2020, 13:54   #8  |  Link
wimm
Registered User
 
Join Date: Dec 2019
Posts: 1
Yes. Try to use some video converters. I use Joyoshare Video Converter. It can convert WMV to MP4/MKV without losing quality.
wimm is offline   Reply With Quote
Old 7th January 2020, 14:28   #9  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by wimm View Post
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.
stax76 is offline   Reply With Quote
Old 30th April 2020, 14:31   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DEMO.BAT
Code:
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 30th April 2020 at 14:33.
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.