# HG changeset patch # User alex # Date 1062442629 0 # Node ID 5d40822bf7abfb513ad1dc896817e95a58e0dd74 # Parent 3e147ea7fc7e4bd59c1e24b508c87226f29e8d5d documented the custom matrices stuff, feel free to reword/fix/etc, but don't flame me as Gabucino was not able to help in writing docs... diff -r 3e147ea7fc7e -r 5d40822bf7ab DOCS/en/documentation.html --- a/DOCS/en/documentation.html Mon Sep 01 18:34:31 2003 +0000 +++ b/DOCS/en/documentation.html Mon Sep 01 18:57:09 2003 +0000 @@ -303,6 +303,7 @@
  • 7.7 Encoding from multiple input image files (JPEGs or PNGs)
  • 7.8 Extracting DVD subtitles to a Vobsub file
  • 7.9 Preserving aspect ratio
  • +
  • 7.10 Custom inter/intra matrices
  • Appendix A - Mailing lists
  • diff -r 3e147ea7fc7e -r 5d40822bf7ab DOCS/en/encoding.html --- a/DOCS/en/encoding.html Mon Sep 01 18:34:31 2003 +0000 +++ b/DOCS/en/encoding.html Mon Sep 01 18:57:09 2003 +0000 @@ -90,9 +90,9 @@

    7.2 Encoding to MPEG format

    MEncoder can create MPEG (MPEG-PS) format output files. It's probably - useful only with libavcodec's mpeg1video codec, because players - - except MPlayer - expect MPEG1 video, and MPEG1 layer 2 (MP2) audio streams - in MPEG files.

    + useful only with libavcodec's + mpeg1video codec, because players - except MPlayer - expect MPEG1 + video, and MPEG1 layer 2 (MP2) audio streams in MPEG files.

    This feature is not very useful right now, aside that it probably has many bugs, but the more importantly because MEncoder currently cannot encode @@ -309,9 +309,10 @@ Regretfully, there are no video players outside which support this attribute of MPEG4. Except MPlayer.

    -

    This feature can be used only with libavcodec's mpeg4 - codec. Keep in mind: although MPlayer will correctly play the created file, - other players will use the wrong aspect ratio.

    +

    This feature can be used only with + libavcodec's mpeg4 codec. Keep in mind: although MPlayer + will correctly play the created file, other players will use the wrong + aspect ratio.

    You seriously should crop the black bands over and below the movie image. See the man page for the usage of the cropdetect and @@ -322,5 +323,52 @@

    $ mencoder sample-svcd.mpg -ovc lavc -lavcopts vcodec=mpeg4:autoaspect -vf crop=714:548:0:14 -oac copy -o output.avi

    +

    7.10 Custom inter/intra matrices

    + +

    Whit this feature of libavcodec you are + able to set custom inter (I-frames/key frames) and intra (P-frames/predicted + frames) matrices. It is supported by many of the codecs: mpeg1video + and mpeg2video are reported as working.

    + +

    A typical usage of this feature is to set the matrices preferred by the + KVCD specifications.

    + The KVCD "Notch" Quantization Matrix:
    + Intra: +

    +  8 9 12 22 26 27 29 34
    +  9 10 14 26 27 29 34 37
    +  12 14 18 27 29 34 37 38
    +  22 26 27 31 36 37 38 40
    +  26 27 29 36 39 38 40 48
    +  27 29 34 37 38 40 48 58
    +  29 34 37 38 40 48 58 69
    +  34 37 38 40 48 58 69 79
    +  
    + Inter: +
    +  16 18 20 22 24 26 28 30
    +  18 20 22 24 26 28 30 32
    +  20 22 24 26 28 30 32 34
    +  22 24 26 30 32 32 34 36
    +  24 26 28 32 34 34 36 38
    +  26 28 30 32 34 36 38 40
    +  28 30 32 34 36 38 42 42
    +  30 32 34 36 38 40 42 44
    +  
    +

    + +

    Usage:

    + +

    $ mencoder input.avi -o output.avi -oac copy -ovc lavc -lavcopts + inter_matrix=...:intra_matrix=...

    + +

    $ mencoder input.avi -ovc lavc -lavcopts + vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
    + 12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,
    + 29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79
    + :inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,
    + 28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,
    + 36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg

    +