[FFmpeg-user] XvidExpert needed for "transcoding" xml into ffmpeg parameters

Andy Civil andycivil at gmail.com
Wed Sep 12 21:01:07 CEST 2012


On 2012-09-11 8:08 AM, David Wagner wrote:
> Hey,
>
> I have this xml and need it convertet into parameter for ffmpeg. But how in the
> hell shall I find all the right commands in ffmpeg?
> I don't have the time and the knowledge to for doing that. Is there anyone who
> really knows the parameter conversion. I tried some GUIs but they all produced
> nothing of worth.

I'm not an "expert" but I'm hoping that if I start with the parameters I 
understand, people will add or correct any I miss.

Many of the lines in this are irrelevant. They are formalities such as "Name", 
or they're defining things as not applying in this case, such as QPel (false). 
Yet others simply control the way the coder works, e.g. Turbo (false). Yet 
others are options; only one FourCC can be in any file, and the XML gives four! 
Even further, some options are plainly silly: if interlacing is "false" then we 
don't need to know that "bottom field first" is "true" - LOL


I will translate the options that I think you actually need:

>
> <?xml version="1.0"?>
> <VideoProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <Name>XviD_Default</Name>
> <Settings xsi:type="xvidSettings">
-c:v libxvid

> <EncodingMode>3</EncodingMode>
> <BitrateQuantizer>700</BitrateQuantizer>
> <KeyframeInterval>300</KeyframeInterval>
-g 300

> <NbBframes>2</NbBframes>
-bf 2

> <MinQuantizer>3</MinQuantizer>
-qmin 3

> <MaxQuantizer>5</MaxQuantizer>
-qmax 5

> <Turbo>false</Turbo>
> <V4MV>false</V4MV>
> <QPel>false</QPel>
> <Trellis>true</Trellis>
-trellis 2

> <CreditsQuantizer>12</CreditsQuantizer>
> <FourCCs>
> <string>XVID</string>
> <string>DIVX</string>
> <string>DX50</string>
> <string>MP4V</string>
> </FourCCs>
-vtag XVID

> <Logfile>.stats</Logfile>
> <CustomEncoderOptions />
> <FourCC>0</FourCC>
> <Zones />
> <MaxNumberOfPasses>2</MaxNumberOfPasses>
If you want two pass encoding then you should read up about it; basically you do 
it twice, first with "-pass 1" then with "-pass 2" but it's ONLY relevant if 
you're trying to squeeze into a certain size (e.g. fit on a CD).

> <NbThreads>1</NbThreads>
-threads 1

> <MotionSearchPrecision>6</MotionSearchPrecision>
-dia_size 6

> <VHQMode>1</VHQMode>
> <QuantType>2</QuantType>
> <MinPQuant>1</MinPQuant>
> <MaxPQuant>31</MaxPQuant>
> <MinBQuant>1</MinBQuant>
> <MaxBQuant>31</MaxBQuant>
> <BQuantRatio>150</BQuantRatio>
> <BQuantOffset>100</BQuantOffset>
> <KeyFrameBoost>10</KeyFrameBoost>
> <KeyframeThreshold>1</KeyframeThreshold>
> <KeyframeReduction>20</KeyframeReduction>
> <OverflowControlStrength>5</OverflowControlStrength>
> <MaxOverflowImprovement>5</MaxOverflowImprovement>
> <MaxOverflowDegradation>5</MaxOverflowDegradation>
> <HighBitrateDegradation>0</HighBitrateDegradation>
> <LowBitrateImprovement>0</LowBitrateImprovement>
> <ReactionDelayFactor>16</ReactionDelayFactor>
> <AveragingPeriod>100</AveragingPeriod>
> <FrameDropRatio>0</FrameDropRatio>
> <RateControlBuffer>0</RateControlBuffer>
> <VbvPeakRate>0</VbvPeakRate>
> <VbvMaxRate>0</VbvMaxRate>
> <VbvBuffer>0</VbvBuffer>
> <altpass2>false</altpass2>
> <PackedBitstream>false</PackedBitstream>
> <GMC>false</GMC>
> <NoChromaMotion>false</NoChromaMotion>
> <NoClosedGOP>false</NoClosedGOP>
> <VHQForBframes>true</VHQForBframes>
> <AdaptiveQuant>true</AdaptiveQuant>
> <Greyscale>false</Greyscale>
> <Interlaced>false</Interlaced>
> <BottomFieldFirst>true</BottomFieldFirst>
> <LumiMasking>false</LumiMasking>
> <Width>false</Width>
> <BframeThreshold>0</BframeThreshold>
> <muxing>auto</muxing>
> <CustomQuantizerMatrix></CustomQuantizerMatrix>
> </Settings>
> </VideoProfile>

The other options that I generally use for XVID are
-mbd rd -flags +mv4+aic -cmp 2 -subcmp 2
and also
-vb 1500k
which sets the bitrate.

Hope this helps. What about audio?

--
Andy


More information about the ffmpeg-user mailing list