Markstar
12th July 2006, 22:00
Hi,
I hope this is the right forum - I used search and most answers about FFmpeg where here even though I couldn't find any discussion about the program itself. :(
Anyway, here's the deal: Let's say I have 2 5-minute mpeg files. One, low.mpg, is 352*288, ~50MB and of rather bad quality. The other, high.mpg, is 720*576 with very good quality and ~160MB.
With FFmpeg, I want to get both files to around 30MB. This is what I've used for the first file which resulted in exactly the file I wanted:
ffmpeg -i low.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -acodec mp3 -ab 64 low.avi
However, using the same settings for high.mpg, I get a heavily undersized file (~20MB instead of 30). :scared: Why? If anything, I expected the higher quality source to result in a bigger file but certainly not less! I've also tried "-vcodec xvid", which worked but also gave me a similar undersized file. :(
Next I tried two-pass-encoding since I assumed this would make it better while also further increasing the quality. These are the two commands I used:
ffmpeg -i high.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -pass 1 -passlogfile high.log -acodec mp3 -ab 64 high.aviand
ffmpeg -i high.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -pass 2 -passlogfile high.log -acodec mp3 -ab 64 high.avi
While it did create a logfile with plenty of stuff in it, in both passes it created the same undersized avi as before! :(
Some other (minor) things I don't understand are:
- Downloading the lated version of FFmpeg was a lot more difficult that I thought. The homepage refers to the to the MPlayer project and some svn page, both of which only have the source codes as far as I could tell. Googleing "ffmpeg download" resulted in many hits but most were dead ends or for linux. So I downloaded a version from here (http://www.free-codecs.com/download/ffmpegGUI.htm). Is that a "good" (stable, recent) version? Where does one usually get the compiled files?
- Also, the documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html) lists all the supported codecs for encoding and decoding. But what are the appropriate switches???
For example, the table says FFmpeg supports MPEG-4 and that this is aka DivX4/5. But what is the right switch for it??? It's not MPEG-4, but it is neither MPEG4, MP4, divx5, divx4 nor divx. :(
And the one I used above, "-vcodec msmpeg4, I got from an example and don't even know if that is really DivX3 (I'm assuming it is but I'm not sure).
- The documentation also mentions a "-hq" switch to increase the quality but when I insert it it says "unrecognized option '-hq' ".
Anyway, my main problem is definitely the undersized file since I would like to set up a batch with many files and of course they should all have the same size/quality.
Thank you in advance for any help!!!
I hope this is the right forum - I used search and most answers about FFmpeg where here even though I couldn't find any discussion about the program itself. :(
Anyway, here's the deal: Let's say I have 2 5-minute mpeg files. One, low.mpg, is 352*288, ~50MB and of rather bad quality. The other, high.mpg, is 720*576 with very good quality and ~160MB.
With FFmpeg, I want to get both files to around 30MB. This is what I've used for the first file which resulted in exactly the file I wanted:
ffmpeg -i low.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -acodec mp3 -ab 64 low.avi
However, using the same settings for high.mpg, I get a heavily undersized file (~20MB instead of 30). :scared: Why? If anything, I expected the higher quality source to result in a bigger file but certainly not less! I've also tried "-vcodec xvid", which worked but also gave me a similar undersized file. :(
Next I tried two-pass-encoding since I assumed this would make it better while also further increasing the quality. These are the two commands I used:
ffmpeg -i high.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -pass 1 -passlogfile high.log -acodec mp3 -ab 64 high.aviand
ffmpeg -i high.mpg -vcodec msmpeg4 -vtag MP43 -s cif -b 800 -pass 2 -passlogfile high.log -acodec mp3 -ab 64 high.avi
While it did create a logfile with plenty of stuff in it, in both passes it created the same undersized avi as before! :(
Some other (minor) things I don't understand are:
- Downloading the lated version of FFmpeg was a lot more difficult that I thought. The homepage refers to the to the MPlayer project and some svn page, both of which only have the source codes as far as I could tell. Googleing "ffmpeg download" resulted in many hits but most were dead ends or for linux. So I downloaded a version from here (http://www.free-codecs.com/download/ffmpegGUI.htm). Is that a "good" (stable, recent) version? Where does one usually get the compiled files?
- Also, the documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html) lists all the supported codecs for encoding and decoding. But what are the appropriate switches???
For example, the table says FFmpeg supports MPEG-4 and that this is aka DivX4/5. But what is the right switch for it??? It's not MPEG-4, but it is neither MPEG4, MP4, divx5, divx4 nor divx. :(
And the one I used above, "-vcodec msmpeg4, I got from an example and don't even know if that is really DivX3 (I'm assuming it is but I'm not sure).
- The documentation also mentions a "-hq" switch to increase the quality but when I insert it it says "unrecognized option '-hq' ".
Anyway, my main problem is definitely the undersized file since I would like to set up a batch with many files and of course they should all have the same size/quality.
Thank you in advance for any help!!!