Changes between Version 4 and Version 5 of Debug/MacroblocksAndMotionVectors


Ignore:
Timestamp:
Feb 7, 2015, 2:43:42 PM (3 years ago)
Author:
slhck
Comment:

more info about QPs, remove deprecated vismv flag

Legend:

Unmodified
Added
Removed
Modified
  • Debug/MacroblocksAndMotionVectors

    v4 v5  
    55== Analyzing Macroblock Types == 
    66 
    7 You need to specify the `-debug vis_mb_type` option. For example: 
     7MPEG videos use various macroblock types, depending on whether they are intra- or inter-predicted and what specific prediction type or partitioning is used. In order to show them, you need to specify the `-debug vis_mb_type` option. For example: 
    88{{{ 
    99ffplay -debug vis_mb_type input.mp4 
     
    2828|| [[Image(patch9.png)]] || `USES_LIST(0) && USES_LIST(1)`                    ||  Reference to past and future (List 1 & 2, B slices)    || 
    2929 
    30 Note that the decoding of macroblock types is MPEG-specific, so this option will not work for VP8 video, for example. 
     30If none matches, the macroblock will be rendered as grey. Note that the decoding of macroblock types is MPEG-specific, so this option will not work for VP8 video, for example. 
     31 
     32== Analyzing QP Values == 
     33 
     34The QP (quantization parameter) of a macroblock is a main factor in controlling the quality. Lower QPs result in higher quality and are tinted greener using this filter. Use the `-vis_qp` option to show the macroblock QPs: 
     35 
     36{{{ 
     37ffplay -debug vis_qp input.mp4 
     38ffmpeg  -debug vis_qp -i input.mp4 output.mp4 
     39}}} 
     40 
     41For example: 
     42 
     43[[Image(visqp.png)]] 
    3144 
    3245== Analyzing Motion Vectors == 
    3346 
    34 The `-vismv` option can be used to show motion vectors as small arrows for each macroblock. It takes one parameter, which specifies the type of motion vector to be drawn: 
     47The [http://ffmpeg.org/ffmpeg-all.html#codecview `codecview` filter] can be used to show motion vectors as small arrows for each macroblock. It takes one option called `mv`, which specifies the type of motion vector to be drawn: 
    3548 
    36 * `-vismv pf` – forward predicted motion vectors of P pictures 
    37 * `-vismv bf` – forward predicted motion vectors of B pictures 
    38 * `-vismv bb` – backward predicted motion vectors of B pictures 
     49* `pf` – forward predicted motion vectors of P pictures 
     50* `bf` – forward predicted motion vectors of B pictures 
     51* `bb` – backward predicted motion vectors of B pictures 
    3952 
    4053For example, you can use: 
    4154{{{ 
    42 ffplay -vismv pf input.mp4 
    43 ffmpeg -vismv pf -i input.mp4 output.mp4 
     55ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb 
     56ffmpeg -flags2 +export_mvs -i input.mp4 -vf codecview=mv=pf+bf+bb output.mp4 
    4457}}} 
    4558 
     
    4760 
    4861[[Image(vismv_pf.png)]] 
     62 
     63Caveats:  
     64* Earlier versions of ffmpeg do not have this filter, but support the now deprecated `-vismv` option. 
     65* This option does not work for codecs which do not export motion vectors (most non-MPEG based codecs)