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 > Video Encoding > New and alternative video codecs
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th June 2009, 11:45   #1  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
MOV to WMV encoding with FFMPEG (poor quality)

Hello,

I need to convert MOV files to WMV and thought of the powerful FFMPEG converter. However by doing

ffmpeg -i test.mov test.wmv

I would get a small and very poor quality output.

I dont understand how to figure out the best switches for WMV settings and can't find anything on google. It seems everyone is converting WMV to MOV for their Ipods. But no one the other way around.

Can please someone knowledgeable help me with this how to encode HQ with WMV?

Many Thanks,
Houmie
Houmie is offline   Reply With Quote
Old 4th June 2009, 11:49   #2  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
just raise the bitrate ... ffmpeg will use otherwise 200kbs

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 4th June 2009, 13:29   #3  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Quote:
Originally Posted by buzzqw View Post
just raise the bitrate ... ffmpeg will use otherwise 200kbs

BHH

Thanks for the answer.

I tried this last night:

ffmpeg -i test.mov -b 8000 test.wmv

But it didnt have whatsoever effect on the output. Am I using the switch correctly or was the value simply too high?
Houmie is offline   Reply With Quote
Old 4th June 2009, 13:40   #4  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
better to write 8000k

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 4th June 2009, 13:43   #5  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
ohh I missed the K. Makes sense. I give it a go tonight.

Many Thanks
Houmie is offline   Reply With Quote
Old 4th June 2009, 13:55   #6  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
On a second thought, is there any tool that could read my MOV file and letting me know how much bitrate its encoded in first place? so that I match the WMV's output's bitrate as the same value as the MOV input file?
Houmie is offline   Reply With Quote
Old 4th June 2009, 14:10   #7  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
try with mediainfo

or.. (but i don't know if works with wmv codec) try the -sameq switch

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 4th June 2009, 14:21   #8  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by Houmie View Post
ffmpeg -i test.mov test.wmv
With this commandline, ffmpeg defaults to its msmpeg4(v3) encoder. FFmpeg also has wmv1 (Windows Media Video v7) and wmv2 (WMV v8) codecs but they have pretty much the same quality as msmpeg4. There are no wmv3 (WMV v9) or VC-1 encoders -- use Microsoft's tools for them.

In addition to using a higher bitrate, you should also encode in 2-pass mode (-pass 1 for the first pass and -pass 2 for the second). There are also many encoding parameters to tweak. FFmpeg FAQ suggests these for high-quality MPEG-4 encoding:
Code:
-mbd rd -flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -g 300
Why do you want to encode to WMV, is there some device you're targeting, or perhaps Silverlight?

Last edited by nm; 4th June 2009 at 14:24.
nm is offline   Reply With Quote
Old 4th June 2009, 15:39   #9  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Hi,

Thanks for your response.

Quote:
Originally Posted by nm View Post
With this commandline, ffmpeg defaults to its msmpeg4(v3) encoder. FFmpeg also has wmv1 (Windows Media Video v7) and wmv2 (WMV v8) codecs but they have pretty much the same quality as msmpeg4. There are no wmv3 (WMV v9) or VC-1 encoders -- use Microsoft's tools for them.
Hmm I think its because MS doesn't like anyone else using their encoding. Hence the old maybe still free version of WMV(v3). Hmmm I will try your settings tonight and hope its good quality. But how could I use MS tools? MS doesn't like MOV and Quicktime Pro doesnt like WMV. So I would have to make a 2 pass XVID avi and then convert it with a MS tool (but where do I get it?) to WMV, right?

Quote:
Why do you want to encode to WMV, is there some device you're targeting, or perhaps Silverlight?
Actually no. I am so used to MS Movie Maker 2.6, and my Lumix DIgital Camera records in MOV. Movie Maker can't read MOV nor XVID Avis. I have to fallback to WMV. Unless there is any other free authoring tool like Movie Maker, I have no choice.

Thanks
Houmie is offline   Reply With Quote
Old 4th June 2009, 16:12   #10  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by Houmie View Post
Hmm I think its because MS doesn't like anyone else using their encoding.
Nope, it's just because nobody has bothered to write an encoder for FFmpeg. I'd guess Microsoft would be only happy to see more support for their formats.

Quote:
But how could I use MS tools? MS doesn't like MOV and Quicktime Pro doesnt like WMV.
See the WMV9/VC-1 sticky. For example, WMNicEnc uses AviSynth for input, so it should work with your files. This might be a bit more tricky than using ffmpeg though, and definitely much slower.

Quote:
Actually no. I am so used to MS Movie Maker 2.6, and my Lumix DIgital Camera records in MOV. Movie Maker can't read MOV nor XVID Avis. I have to fallback to WMV.
Ok, since you don't really need a specific size or high compression, it is better to encode with a constant quantizer instead of setting an average bitrate. Use -qscale 3 (msmpeg4 might overflow if -qscale 2 was used). That gives you decent quality for every source.

Quote:
Unless there is any other free authoring tool like Movie Maker, I have no choice.
It depends on what you need exactly. AviDemux is a nice VirtualDub-like tool that should do some of the things Movie Maker does (and a lot more). Then there's Kdenlive, which should be quite similar to Movie Maker, but it only works on Linux/*BSD for now.
nm is offline   Reply With Quote
Old 4th June 2009, 22:53   #11  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Hi nm,

I have tried many things. But situation is still far from resolved.

Quote:
Originally Posted by nm View Post
See the WMV9/VC-1 sticky. For example, WMNicEnc uses AviSynth for input, so it should work with your files. This might be a bit more tricky than using ffmpeg though, and definitely much slower.
I have downloaded WMNicEnc and installed also AviSynth. However the former accepts only AVS files encoded in AviSynth. I have no idea how to encode in that. I googled a bit and apparently Virtualdubmod should be able to do that, but it couldn't. It doesnt allow MOV files to be as input. It is a vicious circle.

Quote:
Ok, since you don't really need a specific size or high compression, it is better to encode with a constant quantizer instead of setting an average bitrate. Use -qscale 3 (msmpeg4 might overflow if -qscale 2 was used). That gives you decent quality for every source.
-qscale is not recognized for some reason. Didnt change anything. It worked with -b 27000. Its same quality as MOV and same size. However it still cannot be opened by Movie Maker. What a crap has MS produced there again. Oh man.

Quote:
It depends on what you need exactly. AviDemux is a nice VirtualDub-like tool that should do some of the things Movie Maker does (and a lot more). Then there's Kdenlive, which should be quite similar to Movie Maker, but it only works on Linux/*BSD for now.
I downloaded AviDemux, but didnt understand what I could there really. I checked out a video about Kdenlive and must say it looks really good and close to Movie Maker. A pity I understand so little about Linux. And installing an OS just a tool is too much.

Stuck again
Houmie is offline   Reply With Quote
Old 4th June 2009, 22:55   #12  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Quote:
Originally Posted by buzzqw View Post
better to write 8000k

BHH
-sameq didnt work. However the tip with Mediainfo was very good. i figured out its 27000k bit. So I did a -b 27000k and quality and size are the same. Its wonderful.

However the way the file is produced isn't MS friendly. Movie Maker 2 rejects the file. Damn it!
Houmie is offline   Reply With Quote
Old 4th June 2009, 23:20   #13  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Quote:
I have downloaded WMNicEnc and installed also AviSynth. However the former accepts only AVS files encoded in AviSynth. I have no idea how to encode in that. I googled a bit and apparently Virtualdubmod should be able to do that, but it couldn't. It doesnt allow MOV files to be as input. It is a vicious circle.
You can try to load MOV files into an Avisynth script with DirectShowSource, DSS2(), ffmpegsource, or QTSource. The first two options require QT Lite or Quicktime Alternative, the third requires only the plugin, and the last requires Quicktime.
Inspector.Gadget is offline   Reply With Quote
Old 5th June 2009, 09:55   #14  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by Houmie View Post
I have downloaded WMNicEnc and installed also AviSynth. However the former accepts only AVS files encoded in AviSynth. I have no idea how to encode in that.
AVS files are scripts: text files that control AviSynth. You need to write one yourself with a text editor or AvsP.

Quote:
-qscale is not recognized for some reason. Didnt change anything. It worked with -b 27000. Its same quality as MOV and same size. However it still cannot be opened by Movie Maker. What a crap has MS produced there again. Oh man.
Perhaps Movie Maker doesn't like msmpeg4 in WMV, only in AVI. Try these instead:
Code:
ffmpeg -i test.mov -vcodec msmpeg4 -qscale 3 test.avi

ffmpeg -i test.mov -vcodec wmv2 -qscale 3 test.wmv
nm is offline   Reply With Quote
Old 6th June 2009, 17:47   #15  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Quote:
Originally Posted by Inspector.Gadget View Post
You can try to load MOV files into an Avisynth script with DirectShowSource, DSS2(), ffmpegsource, or QTSource. The first two options require QT Lite or Quicktime Alternative, the third requires only the plugin, and the last requires Quicktime.
Thanks for the answer. I have downloaded DirectShowSource. I hope this is correct: http://www.medialooks.com/products/d...er.html#result

Now, if I start AvsP, it should see MOV extensions? but it still doesn't. neither can VirtualDub see the MOV extension. What do I have to do next please?

Many Thanks,
Houmie is offline   Reply With Quote
Old 6th June 2009, 17:50   #16  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Quote:
Originally Posted by nm View Post
AVS files are scripts: text files that control AviSynth. You need to write one yourself with a text editor or AvsP.


Perhaps Movie Maker doesn't like msmpeg4 in WMV, only in AVI. Try these instead:
Code:
ffmpeg -i test.mov -vcodec msmpeg4 -qscale 3 test.avi

ffmpeg -i test.mov -vcodec wmv2 -qscale 3 test.wmv
hi,

The first one doesnt execute due missing parameters but the second one is running fine and yet it cant be loaded into MM.

I have downloaded AVsP as you suggested. But it only accepts AVIs as input. It doesnt accept a MOV file. The plugins from above such as DirectShowSource, still didnt help.

Does it work this way on your system? What am I missing?

Thanks
Houmie is offline   Reply With Quote
Old 6th June 2009, 17:57   #17  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
That's not the software you need. DirectShowSource() is a built-in Avisynth function that uses the same filters that your media players would use to load files. Please read the Avisynth documentation, it isn't that difficult to write a script calling DirectShowSource().

DirectShowSource (assumes you have a MOV splitter and at least ffdshow's compatible audio and video decoders enabled)
Quote:
DirectShowSource("F:\test.mov", fps=24, pixel_type=YV12)
DSS2
Quote:
DSS2("F:\test.mov") # use if DSS doesn't deliver correct frames
QTSource (needs Quicktime 7)
Quote:
# with audio (in many cases possible with QuickTime 7)
QTInput("FileName.mov", color=2, audio=true)
ffmpegsource2
Quote:
FFmpegSource2("source.mov")
Inspector.Gadget is offline   Reply With Quote
Old 6th June 2009, 19:27   #18  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by nm View Post
Nope, it's just because nobody has bothered to write an encoder for FFmpeg. I'd guess Microsoft would be only happy to see more support for their formats.
In fact we would. But VC-1 isn't really "our" codec any more; it's licensed by MPEG-LA with SMPTE as the standardization body. FFmpeg supporting that wouldn't be any different than it doing MPEG-2 or H.264.

There are a number of 3rd party VC-1 implementations, and several more in active development. Elemental Technologies has one they announced at NAB, and Enciris has a very cool looking one that can do two 1080p60 live streams using a FPGA.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book

Last edited by benwaggoner; 6th June 2009 at 19:34. Reason: codec<>format
benwaggoner is offline   Reply With Quote
Old 6th June 2009, 19:34   #19  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by Houmie View Post
Hello,

I need to convert MOV files to WMV and thought of the powerful FFMPEG converter. However by doing
And FWIW, this would be a LOT easier with the 30-day trial version of Expression Encoder 2, which has a nice GUI, QuickTime source support, and the best VC-1 implementation available at the moment.

http://www.microsoft.com/expression/try-it/default.aspx
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 6th June 2009, 21:41   #20  |  Link
Houmie
Registered User
 
Join Date: Mar 2005
Posts: 10
Quote:
Originally Posted by benwaggoner View Post
And FWIW, this would be a LOT easier with the 30-day trial version of Expression Encoder 2, which has a nice GUI, QuickTime source support, and the best VC-1 implementation available at the moment.

http://www.microsoft.com/expression/try-it/default.aspx
WoW, I cant express my gratitude in words. It actually worked.
No Quality loss at 720HD, simply importing the mov file and encoding it into WMV. Movie maker understood the output and could import it as well.

Amazing. The only downside is the price. I dont need all the functionality but only importing MOV to WMV.

$200 is a lot money for just a converter for a personal home user. I could as well buy for only $119 Adobe Premiere Elements, which can import MOV files straight away and provides a lot more functionality than Movie Maker on top of it.
Houmie is offline   Reply With Quote
Reply

Tags
mov wmv ffmpeg


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 09:39.


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