digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG: KVCD/DVD with FFmpeg (http://www.digitalfaq.com/archives/encode/14630-ffmpeg-kvcd-dvd.html)

patchworks 02-07-2010 02:07 PM

FFMPEG: KVCD/DVD with FFmpeg
 
Hi guyz, I *need* to encode KVCD/DVDs with MediaCoder but I can't understand how to force FFmpeg (that is the encoder) to use - this ? - matrices.

Can anyone help ?

Thanks in advice !!!

Dialhot 02-07-2010 09:08 PM

Never used it, but I've fixed the snapshots in the topic you are mentionning, it may help you.

patchworks 02-10-2010 05:25 AM

Well, then, buzzqw (the HDConvertToX, MicroX264 and AutoMen author) suggested me to use these FFmpeg parameters (even if he don't know HOW):

-intra_matrix matrix specify intra matrix coeffs
-inter_matrix matrix specify inter matrix coeffs

Hope that helps !

patchworks 02-10-2010 05:34 AM

Hey ! I just found a possible solution in Mencoder's manual !
Quote:

Originally Posted by 11.3. Encoding with the libavcodec codec family
11.3.5. Custom inter/intra matrices

With this feature of libavcodec you are able to set custom inter (I-frames/keyframes) 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

Hope that inspires !

patchworks 02-10-2010 05:40 AM

Here we go (KSVCD) !!!

Quote:

Quality is awesome. It can reach quant 2 for 400kb/s on low motion.

ffmpeg -hq -i d:\sample.vob -target svcd -bufsize 224 -b 600 -mbd 2 -g 240 -bt 1024 -trell -bf 2 -alt -y -intra_matrix "8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,1 4,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26
,27,31,36,37,38,40,48,27,29,34,37,38,40,48,58,29,3 4,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,2 0,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,2 8,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44" test.mpg

Very good quality for 1CD SVCD encode
...what about KVCD ? How to change parameters before "-intra_matrix" ? What about 2-pass ?


All times are GMT -5. The time now is 03:24 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.