[FFmpeg-devel] FFv1.3: Final testing - How to proceed?

Peter B. pb at das-werkstatt.com
Thu Nov 1 23:12:44 CET 2012


On 10/22/2012 04:56 AM, Michael Niedermayer wrote:
> I need some statistics about the effects of various things. GOP,
> multipass, slice counts, ...
> I need them to decide on defaults and to know if ffv1.3 can/need/should
> be changed radically or if the current design is fine.
> one example of how this should look is for example:
>
>                     v1  v3 4slices v3 16slices v3 context1  2pass context=1 ... average worst best
> thisrgbvideo        +1% +2% +0.2%  -0.5% ...                                    +1.2%
> thisyuv444video      ...
> thisyuv420video
> thishighmotionvideo
> thislowmotionvideo
> average
> worst
> best
>
> the values in the table cells would here then be the filesize
> difference of gop=1 vs gop=12 for example
>
I'm still not quite sure if I interpreted your example correctly, but
I've imported the data into an SQLite database and ran the following
queries for the file "mobile_calendar":

//-----------------------------------------------------------
SELECT size FROM videos WHERE application='';
-- Uncompressed size: 216004

SELECT avg(size) FROM videos WHERE gop=1 AND version=1;
-- Average size: 108140.0

SELECT size FROM (SELECT *,(size-108140.0) AS avg FROM videos WHERE
gop=1 AND version=1 ORDER BY avg ASC limit 1) WHERE gop=1 AND version=1;
SELECT min(size) FROM videos WHERE gop=1 AND version=1;
SELECT max(size) FROM videos WHERE gop=1 AND version=1;

-- Results: video: 107204 (min) / 107204 (avg) / 108976 (max)
//-----------------------------------------------------------

As I now have the min/avg/max size values for the video compressed with
FFv1.1 and its uncompressed size (raw), the following query calculates
the deviation GOP=300, FFv1.3 from the min/avg/max/raw files encoded as
FFv1.1 with GOP=1.

The result table shows the encoding parameters: colorspace, coder,
context, slices, crc.

//-----------------------------------------------------------
SELECT
size,video_name,pix_fmt,coder,context,slices,crc,-round(100-(size*100/107204.0),2)
as min,-round(100-(size*100/107204.0),2) as
avg,-round(100-size*100/108976.0) as
max,-round(100-(size*100/216004.0),2) as raw FROM videos WHERE gop=300
AND slices in (4, 24) AND version=3;
//-----------------------------------------------------------
Size|video_name|pix_fmt|Coder|Context|Slices|CRC|min|avg|max|raw
108124|mobile_calendar|yuv422p|0|0|4|0|0.86|0.86|-1.0|-49.94
108128|mobile_calendar|yuv422p|0|0|4|1|0.86|0.86|-1.0|-49.94
108220|mobile_calendar|yuv422p|0|0|24|0|0.95|0.95|-1.0|-49.9
108264|mobile_calendar|yuv422p|0|0|24|1|0.99|0.99|-1.0|-49.88
106220|mobile_calendar|yuv422p|1|0|4|0|-0.92|-0.92|-3.0|-50.82
106224|mobile_calendar|yuv422p|1|0|4|1|-0.91|-0.91|-3.0|-50.82
106088|mobile_calendar|yuv422p|1|0|24|0|-1.04|-1.04|-3.0|-50.89
106132|mobile_calendar|yuv422p|1|0|24|1|-1.0|-1.0|-3.0|-50.87
105012|mobile_calendar|yuv422p|0|1|4|0|-2.04|-2.04|-4.0|-51.38
105016|mobile_calendar|yuv422p|0|1|4|1|-2.04|-2.04|-4.0|-51.38
105352|mobile_calendar|yuv422p|0|1|24|0|-1.73|-1.73|-3.0|-51.23
105392|mobile_calendar|yuv422p|0|1|24|1|-1.69|-1.69|-3.0|-51.21
103140|mobile_calendar|yuv422p|1|1|4|0|-3.79|-3.79|-5.0|-52.25
103144|mobile_calendar|yuv422p|1|1|4|1|-3.79|-3.79|-5.0|-52.25
103972|mobile_calendar|yuv422p|1|1|24|0|-3.01|-3.01|-5.0|-51.87
104016|mobile_calendar|yuv422p|1|1|24|1|-2.97|-2.97|-5.0|-51.85
//-----------------------------------------------------------

Here are the sizes showing GOP=300 compared to GOP=1 with FFv1 version=3:

//-----------------------------------------------------------
SELECT
size,video_name,pix_fmt,coder,context,slices,crc,-round(100-(size*100/109196.0),2)
AS min,-round(100-(size*100/109196.0),2) AS
avg,-round(100-size*100/122380.0) AS
max,-round(100-(size*100/216004.0),2) AS raw FROM videos WHERE gop=300
AND slices in (4, 24) AND version=3;
//-----------------------------------------------------------
Size|video_name|pix_fmt|Coder|Context|Slices|CRC|min|avg|max|raw
108124|mobile_calendar|yuv422p|0|0|4|0|-0.98|-0.98|-12.0|-49.94
108128|mobile_calendar|yuv422p|0|0|4|1|-0.98|-0.98|-12.0|-49.94
108220|mobile_calendar|yuv422p|0|0|24|0|-0.89|-0.89|-12.0|-49.9
108264|mobile_calendar|yuv422p|0|0|24|1|-0.85|-0.85|-12.0|-49.88
106220|mobile_calendar|yuv422p|1|0|4|0|-2.73|-2.73|-13.0|-50.82
106224|mobile_calendar|yuv422p|1|0|4|1|-2.72|-2.72|-13.0|-50.82
106088|mobile_calendar|yuv422p|1|0|24|0|-2.85|-2.85|-13.0|-50.89
106132|mobile_calendar|yuv422p|1|0|24|1|-2.81|-2.81|-13.0|-50.87
105012|mobile_calendar|yuv422p|0|1|4|0|-3.83|-3.83|-14.0|-51.38
105016|mobile_calendar|yuv422p|0|1|4|1|-3.83|-3.83|-14.0|-51.38
105352|mobile_calendar|yuv422p|0|1|24|0|-3.52|-3.52|-14.0|-51.23
105392|mobile_calendar|yuv422p|0|1|24|1|-3.48|-3.48|-14.0|-51.21
103140|mobile_calendar|yuv422p|1|1|4|0|-5.55|-5.55|-16.0|-52.25
103144|mobile_calendar|yuv422p|1|1|4|1|-5.54|-5.54|-16.0|-52.25
103972|mobile_calendar|yuv422p|1|1|24|0|-4.78|-4.78|-15.0|-51.87
104016|mobile_calendar|yuv422p|1|1|24|1|-4.74|-4.74|-15.0|-51.85
//-----------------------------------------------------------

Is the resulting format useful/ok?
I really have a hard time to group the numbers together to reduce the
number of rows, but I just can't think of a way to do so.

Regards,
Pb


More information about the ffmpeg-devel mailing list