Log in

View Full Version : Optimal encoding with FFmpeg for DVD


Pages : 1 [2]

GMJCZP
27th June 2021, 15:29
Here (https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d85c41b5723a4acf9400043cb533682d2e2c4287#patch3) they are reporting that the -preme option has been removed from FFMpeg, but there are compilations like this one (https://github.com/sudo-nautilus/FFmpeg-Builds-Win32/releases/tag/autobuild-2021-06-27-12-28) that is still present. If an error message appears indicating that the -preme option is not recognized, remove it from the script, this solution is temporary.

GMJCZP
27th June 2021, 19:36
DVD script version 4.2: (https://forum.doom9.org/showthread.php?p=1809116#post1809116)

- Removed -preme argument, deprecated of FFMpeg builds. Thanks to lvqcl for report it. For this cause exists an increment in encoding speed.

GMJCZP
29th June 2021, 14:43
nevcairiel has reported that for the purposes of the mpeg2 -preme codec it has been renamed to -mepre, however I have made the difficult decision so far not to reincorporate it in the script, since this has obtained a gain in encoding speed in the order of 25% or more. I think that a debatable improvement in the image is not enough compensation, since the idea is to balance the quality-speed ratio.

In any case, as in science, there is never something definitive.

PatchWorKs
5th January 2022, 18:59
Suggeston: how about add "-hwaccel auto" to both passes ?

WSC4
26th February 2022, 02:08
Hi there Manolito. You have not posted for a while. How are you going?

I suffered a major hard drive crash in September 2020 and lost the lot. Sent the HD to 2 data recovery companies but they could not recover data. It has taken me over a year to rebuild FFmpeg commands, Mplex commands, DVDStyler layouts, AC3to commands, CoverDesigner layout et cetera to get back to where I was. It will never be the same.

I still use your FFmpeg commands listed on post number 6.

-intra_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16"
-inter_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16"

I do everything on the command line first using FFmpeg for the M2V and AC3to and Mplex for LPCM to the MPG. I use DVDStyler on copy mode only.

I notice also you have not posted on the DVDStyler forum for a very long time. Have you moved up to Muxman DVD authoring Professional - or even Scenarist? :-)

FranceBB
26th February 2022, 13:04
Hi there Manolito. You have not posted for a while. How are you going?

[...]

I notice also you have not posted on the DVDStyler forum for a very long time. Have you moved up to Muxman DVD authoring Professional - or even Scenarist? :-)

Manolito is one of the elderly members of the community and he's been here for a very long time. Unfortunately, he had a stroke when he went to bed one day last year. Don't worry, he's still alive, 'cause his wife eventually noticed and he was eventually rushed to the hospital if I remember correctly. In any case, that was a really close call for him and this is the kind of event that affect a person both physically and mentally. He came back to Doom9 talking to some of us who have been here the longest like Ferenc, Stephen, StainlessS etc saying that it was indeed a close call and that he was gonna spend the rest of his life enjoying the little things together with his wife rather than perfecting Avisynth Scripts and encoding BATs. We all wished him a quick recovery and we understood his decision. Sometimes when you almost pass away, you re-evaluate important things in life.
I don't know if he'll ever come back to Doom9 at this point, but one thing is certain: his legacy will live for years to come. :)

PatchWorKs
23rd May 2022, 18:03
@GMJCZP I perfectly know that i'm talking about VINTAGE encoding parameters/matrices, but what about to "save" KVCD/KSVCD/KDVD too ?

http://www.digitalfaq.com/archives/encode/14681-kvcd-kdvd-faq.html

Metal-HTPC
18th January 2023, 00:12
I did some testing and have to say that I thought that manono1 matrice was the most impressing.
For a grainy 80's movie (from a master source without visible compression artefacts)
01:20:39 easily fit on a DVD5 and looked fantastic.
setting Medium to 7000 and Maximum to 9000 lead to an average of 7001 kb/s in 2pass mode with 4.235.013.988 Bytes
and 6 370 kb/s average with 3.853.526.017 in 1pass mode.
I couldnt tell a visible difference in quality so I decided to go for 1pass for my future encodes and just combined the 2 in the command line
like this

"%FFMPEG%" -i %INPUTFILE% -vcodec mpeg2video -b:v %E_BR% -maxrate %VBV_MBR% -bufsize %VBV_MBS% -g %E_MIK% -bf %E_MBF% -bidir_refine 0
-b_strategy %E_ABF% -brd_scale %E_SBF% -sc_threshold %E_TSD% -b_sensitivity %E_DBF% -me_range %E_RME% -dc %E_DC% -q:v %E_FQ%
-an -mpv_flags mv0+naq -mv0_threshold 0 -mbd %E_RDO% -mbcmp %E_CMB% -precmp %E_CMP% -subcmp %E_CMP% -cmp %E_CMP% -skip_cmp %E_CMS%
-dia_size %E_DIA% -pre_dia_size %E_DIA% -last_pred %E_AMP% -dc %E_DC% -lmin %E_MLM% -mblmin %E_MBL% -qmin %E_MQ% -qcomp %E_VQ%
-intra_vlc true -intra_matrix %E_INTRA% -inter_matrix %E_INTER% -f mpeg2video -color_primaries 5 -color_trc 5 -colorspace 5
-color_range 1 -aspect %E_DAR% -y %1%.m2v

I hope this makes sense :-).

I had some raw VHS recordings of a TV show which is basically all the same quality and tried to squeeze them on a DVD5.
However I have no idea how to limit the average bitrate in 1pass.

changing the Medium bitrate setting really didnt't do much. I had a feeling that it didnt really matter if I chose
set E_BR=3950k , 4950 or 5950 and sometimes lower settings lead to a higher average bitrate which was weird.

for set E_BR=3950k
DVD1 - 00:53:13 - Average 6857 Max 8000 - 2.737.413.306 Bytes
DVD2 - 01:47:07 - Average 4960 Max 6500 - 3.985.130.434 Bytes
DVD3 - 02:06:12 - Average 5170 Max 6000 - 4.898.178.584 Bytes

I set the low bitrate settings "Minimum quantizer set E_MQ=2.0", "DC precision (dc) set E_DC=8" and tried "manono3", "HVS Best" and "AVAMAT7". but it didn't seem to help much.

DVD3 would be Average 4675 Max 6000 - 4.415.610.821 Bytes
after shrinking it with DVDshrink afterwards by the way.

The parameter which did the most in terms of filesize seemed to be the Max bitrate, but I have no idea which max bitrate to set for which length.
I there a way to limit the maximum filesize somehow? That would probably be the most easy way. It's probably a tough one for 1pass but maybe someone has an idea. Thanks for reading
cheers

PatchWorKs
16th February 2023, 10:11
For those who are interested in, @GMJCZP's DVD script has been imported (after our pushing (https://github.com/jeanslack/Videomass-presets/issues/2)) into Videomass (https://jeanslack.github.io/Videomass/) presets (https://github.com/jeanslack/Videomass-presets#videomass-presets).

If someone is interested to "patch" (= correct/improve) it, be free so start issues @ github:
https://github.com/jeanslack/Videomass-presets/issues

Thanks in advance.

PatchWorKs
18th February 2023, 07:54
I did some testing and have to say that I thought that manono1 matrice was the most impressing.
For a grainy 80's movie (from a master source without visible compression artefacts)
01:20:39 easily fit on a DVD5 and looked fantastic.
setting Medium to 7000 and Maximum to 9000 lead to an average of 7001 kb/s in 2pass mode with 4.235.013.988 Bytes
and 6 370 kb/s average with 3.853.526.017 in 1pass mode.
I couldnt tell a visible difference in quality so I decided to go for 1pass for my future encodes and just combined the 2 in the command line
like this

"%FFMPEG%" -i %INPUTFILE% -vcodec mpeg2video -b:v %E_BR% -maxrate %VBV_MBR% -bufsize %VBV_MBS% -g %E_MIK% -bf %E_MBF% -bidir_refine 0
-b_strategy %E_ABF% -brd_scale %E_SBF% -sc_threshold %E_TSD% -b_sensitivity %E_DBF% -me_range %E_RME% -dc %E_DC% -q:v %E_FQ%
-an -mpv_flags mv0+naq -mv0_threshold 0 -mbd %E_RDO% -mbcmp %E_CMB% -precmp %E_CMP% -subcmp %E_CMP% -cmp %E_CMP% -skip_cmp %E_CMS%
-dia_size %E_DIA% -pre_dia_size %E_DIA% -last_pred %E_AMP% -dc %E_DC% -lmin %E_MLM% -mblmin %E_MBL% -qmin %E_MQ% -qcomp %E_VQ%
-intra_vlc true -intra_matrix %E_INTRA% -inter_matrix %E_INTER% -f mpeg2video -color_primaries 5 -color_trc 5 -colorspace 5
-color_range 1 -aspect %E_DAR% -y %1%.m2v

I hope this makes sense :-).

I had some raw VHS recordings of a TV show which is basically all the same quality and tried to squeeze them on a DVD5.
However I have no idea how to limit the average bitrate in 1pass.

changing the Medium bitrate setting really didnt't do much. I had a feeling that it didnt really matter if I chose
set E_BR=3950k , 4950 or 5950 and sometimes lower settings lead to a higher average bitrate which was weird.

for set E_BR=3950k
DVD1 - 00:53:13 - Average 6857 Max 8000 - 2.737.413.306 Bytes
DVD2 - 01:47:07 - Average 4960 Max 6500 - 3.985.130.434 Bytes
DVD3 - 02:06:12 - Average 5170 Max 6000 - 4.898.178.584 Bytes

I set the low bitrate settings "Minimum quantizer set E_MQ=2.0", "DC precision (dc) set E_DC=8" and tried "manono3", "HVS Best" and "AVAMAT7". but it didn't seem to help much.

DVD3 would be Average 4675 Max 6000 - 4.415.610.821 Bytes
after shrinking it with DVDshrink afterwards by the way.

The parameter which did the most in terms of filesize seemed to be the Max bitrate, but I have no idea which max bitrate to set for which length.
I there a way to limit the maximum filesize somehow? That would probably be the most easy way. It's probably a tough one for 1pass but maybe someone has an idea. Thanks for reading
cheers

Your 1-pass commandline has been added to Videomass presets too:
https://github.com/jeanslack/Videomass-presets/issues/2#issuecomment-1435151527

Please check if it has been correctly implemented.

Metal-HTPC
24th March 2023, 12:50
Well I just combined the 2-pass to 1-pass and tried a bit around with it. The whole idea for this incredible work .cmd came from the well respected manolito.
If you are thinking about implementing the ultimate mpeg2 encoding settings for ffmpeg you should better stick to the 2-pass with manolito's favorite matrix and suggested settings as there is no way to control the output size in 1-pass. @REM Medium bitrate (b) - set E_BR=4950k, @REM Maximum Bitrate (maxrate) set VBV_MBR=8000k together with @REM HVS Best (for low bitrate) as a matrix is bascially the best if you want to squeeze most of the movies on a DVD5 as fast as possible and if the output is still too big the only chance you have is to reduce the maximum bitrate until it fits.

Especially with older movies with a lot of grain you will gain much better quality with a 2-pass DVD9 encode.

benwaggoner
24th March 2023, 16:58
Well I just combined the 2-pass to 1-pass and tried a bit around with it. The whole idea for this incredible work .cmd came from the well respected manolito.
If you are thinking about implementing the ultimate mpeg2 encoding settings for ffmpeg you should better stick to the 2-pass with manolito's favorite matrix and suggested settings as there is no way to control the output size in 1-pass. @REM Medium bitrate (b) - set E_BR=4950k, @REM Maximum Bitrate (maxrate) set VBV_MBR=8000k together with @REM HVS Best (for low bitrate) as a matrix is bascially the best if you want to squeeze most of the movies on a DVD5 as fast as possible and if the output is still too big the only chance you have is to reduce the maximum bitrate until it fits.

Especially with older movies with a lot of grain you will gain much better quality with a 2-pass DVD9 encode.
It's pretty easy to calculate whether a max bitrate CBR encode will fit on the DVD-5, and then only use 2p VBR if the ABR would need to be significantly lowered.

If a CRF-style encode is done, with x264/x265 one can do a 1-pass CRF encode, and if it comes out too large, use the data from the 1st encode to do a 2nd pass with ABR. I don't recall if the ffmpeg MPEG-2 encoder has anything like that.

Weird to recall I started on DVD authoring 26 years ago this summer (Vancouver Film School workshop using an early beta of Scenarist running on SGI O2 systems, and a Minerva hardware encoder).

ENunn
14th July 2023, 02:49
@echo off

@REM -----------------------------------------------------------------------------------------------
@REM
@REM FFMPEG MPEG2 Profile (video output only)
@REM GMJCZP, version 4.2, 27/06/2021
@REM
@REM -----------------------------------------------------------------------------------------------

@REM Script based in "DVDs ¿crees que tu codificador es el mejor ENTONCES DEMUÉSTRALO!!! (versión 2.0)" page 2, and tests of Fishman0919, manolito and mine
@REM Thanks to ALEX-KID, manono, Didée, hank315, Fishman0919 and manolito!



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> Source and target files
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM Source file (if source file is not a avs file then define for output file in the second pass frame size and frame rate, see Other settings)
set E_SRC="input.avs"

@REM Target file
set E_VID="video.m2v"



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> Rate control settings
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM Medium bitrate (b)
set E_BR=3000k

@REM Maximum Bitrate (maxrate) (Use 9800k max for DVD compatibility)
set VBV_MBR=9800k

@REM Maximum buffer size (bufsize) (Use 1835k max for DVD compatibility)
set VBV_MBS=1835k

@REM Fixed quality VBR (q) (Fishman0919's suggestion)
set E_FQ=2.0

@REM Minimum quantizer (qmin) (2 is good value for low bitrate, b<=1800k)
set E_MQ=1.0

@REM Minimum frame-level Lagrange multiplier (lmin) [0.01;255.0] (Fishman0919 suggests a value of 0.75)
set E_MLM=0.75

@REM Minimum macroblock-level Lagrange multiplier (mblmin) [0.01;255.0] (Fishman0919 suggests a value of 50.0)
set E_MBL=50.0

@REM Quantizer variability (qcomp) [0.00;1.00] (0.75 is good value) (Fishman0919 suggests a value of 0.7)
set E_VQ=0.70



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> GOP structure
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM Maximum interval of I-frames or Keyframes (g) (Use 15 for DVD PAL, 18 for DVD NTSC, 12 for Pulldown)
set E_MIK=12

@REM Maximum number of B-frames (bf) [0;4] (Use 2 for DVD compatibility)
set E_MBF=2

@REM Adaptive B-Frames strategy (b_strategy) [0;2] (Pass one only, 0 is deactivated, 1 is fast and 2 is slow. Fishman0919 suggests a value of 2)
set E_ABF=2

@REM Slow adaptive refinement of B-frames (brd_scale) [0;3] (0 is full search, higher is faster; only valid if b_strategy=2. Fishman0919 suggests a value of 2)
set E_SBF=2

@REM Motion detection for B-frames (b_sensitivity) [>0] (Only valid if b_strategy=1)
set E_DBF=40

@REM Threshold for scene change detection (sc_threshold) [−1000000000;1000000000] (Negative values indicate that it is more likely to insert an I-frame when it detects a scene change)
set E_TSD=-30000



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> Motion estimation settings
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM Range for motion estimation (me_range) [0;9999]
set E_RME=0

@REM Optimization of rate distortion (mbd) [0;2] (2 is the best value)
set E_RDO=2

@REM Diamond size (and pre-pass too) (dia_size, pre_dia_size) [-99;6] (Negative values are for adaptive diamond)
set E_DIA=-4

@REM Comparison function for the macroblock decision (mbcmp) [0;2000] (0 is SAD, 1 is SSE2, 2 is SADT, +256 for chroma motion estimation, currently does not work (correctly) with B-frames)
set E_CMB=2

@REM Comparison function for pre pass, full, and sub motion estimation (precmp, subcmp, cmp) [0;2000] (0 is SAD, 1 is SSE2, 2 is SADT, +256 for chroma motion estimation, currently does not work (correctly) with B-frames)
set E_CMP=2

@REM Comparison function for frame skip (skip_cmp) [0;2000] (0 is SAD, 1 is SSE2, 2 is SADT, +256 for chroma motion estimation, currently does not work (correctly) with B-frames)
set E_CMS=2

@REM Amount of motion predictors (last_pred) [0;99]
set E_AMP=2



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> Other settings
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM Aspect Ratio (aspect) (4/3 or 16/9 for DVD compatibility)
set E_DAR=4/3

@REM Frame size (s) (b up to 2500 kbps =>s=704x480 (NTSC), b greater than 2500 kbps =>s=720x480 (NTSC))
set E_SZE=720x480

@REM Frame rate (r) (use 25 for PAL, 24000/1001 or 30000/1001 para NTSC)
set E_FPS=24000/1001

@REM DC precision (dc) [8;10] (b up to 1800k =>dc=8, between 1800k and 3500k =>dc=9, greater than 3500k =>dc=10)
set E_DC=9



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> Matrices
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

@REM MPEG (default matrix for any bitrate)
set E_INTRA=8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83
set E_INTER=16,17,18,19,20,21,22,23,17,18,19,20,21,22,23,24,18,19,20,21,22,23,24,25,19,20,21,22,23,24,26,27,20,21,22,23,25,26,27,28,21,22,23,24,26,27,28,30,22,23,24,26,27,28,30,31,23,24,25,27,28,30,31,33

@REM MPEG Standard (for any bitrate, the default matrix of FFMPEG, there are matrices better than this)
@REM set E_INTRA=08,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83
@REM set E_INTER=16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16

@REM FOX New Matrix (manolito's suggestion, for bitrate>=3000k)
@REM set E_INTRA=08,08,09,09,10,10,11,11,08,09,09,10,10,11,11,12,09,09,10,10,11,11,12,12,09,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16
@REM set E_INTER=08,08,09,09,10,10,11,11,08,09,09,10,10,11,11,12,09,09,10,10,11,11,12,12,09,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16

@REM FOX Home Entertainment
@REM set E_INTRA=08,08,09,11,13,13,14,17,08,08,11,12,13,14,17,18,09,11,13,13,14,17,17,16,11,11,13,13,13,17,18,20,11,13,13,13,16,17,20,24,13,13,13,16,17,20,24,29,13,12,13,17,19,23,28,34,12,13,17,19,23,28,34,41
@REM set E_INTER=08,08,08,09,09,09,09,10,08,08,09,09,09,09,10,10,08,09,09,09,09,10,10,10,09,09,09,09,10,10,10,10,09,09,09,10,10,10,10,11,09,09,10,10,10,10,11,11,09,10,10,10,10,11,11,11,10,10,10,10,11,11,11,11

@REM FOX1
@REM set E_INTRA=08,08,09,11,13,13,14,17,08,08,11,12,13,14,17,18,09,11,13,13,14,17,17,19,11,11,13,13,14,17,18,20,11,13,13,14,16,17,20,24,13,13,14,16,17,20,24,29,13,13,14,17,19,23,28,34,13,14,17,19,23,28,34,41
@REM set E_INTER=08,08,08,09,09,09,09,10,08,08,09,09,09,09,10,10,08,09,09,09,09,10,10,10,09,09,09,09,10,10,10,10,09,09,09,10,10,10,10,11,09,09,10,10,10,10,11,11,09,10,10,10,10,11,11,11,10,10,10,10,11,11,11,11

@REM FOX2
@REM set E_INTRA=08,08,09,11,13,13,14,17,08,08,11,12,13,14,17,18,09,11,13,13,14,17,17,19,11,11,13,13,14,17,18,20,11,13,13,14,16,17,20,24,13,13,14,16,17,20,24,29,13,13,14,17,19,23,28,34,13,14,17,19,23,28,34,41
@REM set E_INTER=08,08,09,09,10,10,11,11,08,09,09,10,10,11,11,12,09,09,10,10,11,11,12,12,09,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16

@REM FOX3
@REM set E_INTRA=08,08,09,11,13,13,14,17,08,08,11,12,13,14,17,18,09,11,13,13,14,17,17,19,11,11,13,13,14,17,18,20,11,13,13,14,16,17,20,24,13,13,14,16,17,20,24,29,13,13,14,17,19,23,28,34,13,14,17,19,23,28,34,41
@REM set E_INTER=16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16

@REM Didée's SixOfNine-HVS (HVS:Human Visual System, for bitrate>=3000k)
@REM set E_INTRA=08,11,12,12,13,15,16,17,11,11,12,12,14,15,16,17,12,12,13,14,15,16,17,18,12,12,14,16,17,18,19,19,13,14,15,17,19,20,20,20,15,15,16,18,20,21,22,22,16,16,17,19,21,22,23,24,17,17,18,19,20,22,24,24
@REM set E_INTER=12,11,12,12,13,14,15,16,11,11,12,12,13,14,14,16,12,12,12,13,14,15,16,17,12,12,13,15,16,17,18,18,13,13,14,16,18,19,19,20,14,14,15,17,19,20,22,22,15,14,16,18,19,22,23,24,16,16,17,18,20,22,24,24

@REM manono1 (the manono's favorite matrix)
@REM set E_INTRA=08,08,08,09,11,13,14,17,08,08,09,11,13,13,14,17,08,08,11,12,13,14,17,94,09,11,13,13,14,17,17,94,11,11,13,13,14,17,94,94,13,13,14,16,17,20,94,94,13,13,14,17,94,94,94,94,13,14,17,94,94,94,94,94
@REM set E_INTER=12,12,13,14,15,16,22,26,12,13,14,15,16,22,26,32,13,14,15,16,22,26,32,41,14,15,16,22,26,32,41,53,15,16,22,26,32,41,53,94,16,22,26,32,41,53,70,94,22,26,32,41,53,70,94,94,26,32,41,53,94,94,94,94

@REM manono2
@REM set E_INTRA=08,12,13,14,15,16,19,22,12,13,14,15,16,19,22,26,13,14,15,16,19,22,26,32,14,15,16,19,22,26,32,41,15,16,19,22,26,32,41,53,16,19,22,26,32,41,53,70,19,22,26,32,41,53,70,94,22,26,32,41,53,70,94,127
@REM set E_INTER=12,12,13,14,15,16,19,22,12,13,14,15,16,19,22,26,13,14,15,16,19,22,26,32,14,15,16,19,22,26,32,41,15,16,19,22,26,32,41,53,16,19,22,26,32,41,53,70,19,22,26,32,41,53,70,94,22,26,32,41,53,70,94,127

@REM manono3 (according to manono, for cases when the movie doesn't compress well at all)
@REM set E_INTRA=08,10,10,12,13,15,16,20,10,10,12,15,17,19,20,20,10,12,15,17,19,20,20,23,12,15,17,19,20,20,25,25,13,17,19,20,23,25,25,27,15,19,20,23,25,27,27,30,16,20,20,25,25,27,30,35,20,20,23,25,27,30,35,45
@REM set E_INTER=12,14,17,18,19,20,24,28,14,16,17,18,19,23,27,32,17,17,18,19,20,27,30,37,18,18,19,20,27,30,35,37,19,19,20,27,30,35,37,40,20,23,27,30,35,37,40,44,24,27,30,35,37,40,40,44,28,32,37,37,40,44,44,48

@REM HVS Best (for low bitrate)
@REM set E_INTRA=08,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36,17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,41,54,70,88,24,25,29,36,47,65,88,115
@REM set E_INTER=18,18,18,18,19,21,23,27,18,18,18,18,19,21,24,29,18,18,19,20,22,24,28,32,18,18,20,24,27,30,35,40,19,19,22,27,33,39,46,53,21,21,24,30,39,50,61,73,23,24,28,35,46,61,79,98,27,29,32,40,53,73,98,129

@REM AVAMAT7 (for low bitrate, also called AUTO-Q2)
@REM set E_INTRA=08,16,19,22,26,28,32,38,16,16,22,24,28,32,38,44,19,22,26,28,32,38,44,48,22,22,26,32,38,44,48,54,22,26,32,38,44,48,54,64,26,32,38,44,48,54,64,74,32,38,44,48,54,64,74,84,38,44,48,54,64,74,84,94
@REM set E_INTER=16,20,24,28,36,42,46,52,20,24,28,36,42,46,52,58,24,28,36,42,46,52,58,62,28,36,42,46,52,58,62,68,36,42,46,52,58,62,68,78,42,46,52,58,62,68,78,88,46,52,58,62,68,78,88,99,52,58,62,68,78,88,99,99



@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> FFMPEG CLI
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ECHO.---------------------------------------------------------------
ECHO.First pass ...
ECHO.---------------------------------------------------------------
ffmpeg.exe -i %E_SRC% -pass 1 -passlogfile Pass.log -vcodec mpeg2video -maxrate %VBV_MBR% -bufsize %VBV_MBS% -g %E_MIK% -bf %E_MBF% -bidir_refine 0 -b_strategy %E_ABF% -brd_scale %E_SBF% -b_sensitivity %E_DBF% -dc %E_DC% -q:v %E_FQ% -intra_vlc true -intra_matrix %E_INTRA% -inter_matrix %E_INTER% -an -f mpeg2video -y NUL


ECHO.---------------------------------------------------------------
ECHO.Second pass ...
ECHO.---------------------------------------------------------------
ffmpeg.exe -i %E_SRC% -pass 2 -passlogfile Pass.log -vcodec mpeg2video -b:v %E_BR% -maxrate %VBV_MBR% -bufsize %VBV_MBS% -g %E_MIK% -bf %E_MBF% -bidir_refine 0 -sc_threshold %E_TSD% -b_sensitivity %E_DBF% -me_range %E_RME% -mpv_flags mv0+naq -mv0_threshold 0 -mbd %E_RDO% -mbcmp %E_CMB% -precmp %E_CMP% -subcmp %E_CMP% -cmp %E_CMP% -skip_cmp %E_CMS% -dia_size %E_DIA% -pre_dia_size %E_DIA% -last_pred %E_AMP% -dc %E_DC% -lmin %E_MLM% -mblmin %E_MBL% -qmin %E_MQ% -qcomp %E_VQ% -intra_vlc true -intra_matrix %E_INTRA% -inter_matrix %E_INTER% -f mpeg2video -color_primaries 5 -color_trc 5 -colorspace 5 -color_range 1 -aspect %E_DAR% -y %E_VID%

IF EXIST "Pass*.log" DEL "Pass*.log"


@pause
@REM THE END

Sorry if I'm bumping a dead thread, but I just tried this and it seems to work fine. However, I ended up getting an "rc buffer underflow" warning and the video isn't being flagged as interlaced for some reason. Is there a way I could fix these problems?

WSC4
17th July 2023, 06:47
Sorry if I'm bumping a dead thread.

This thread is not dead. There are still plenty of posts this year and last.

I have never used GMJCZP's bat script and cannot comment on it. I have always used the well-respected manolito and his parameters found here:

https://forum.doom9.org/showthread.php?p=1808247#post1808247

I don't use bat files and prefer to do things manually and copy and paste parameters into Notepad saved as command_history_#.txt. These are then copy / pasted back into command prompt as needed. I had to modified manolito's parameters to suit the PAL format like -s 720x576 -r 25. Also removed -vf scale and pad as he mentions.

For the rc buffer underflow warnings. Are you getting many? Is the buffer size set to 1835k as in -bufsize:v:0 1835008 as in manolito's parameter?

As for the video isn't being flagged as interlaced, it sound like your source is interlaced. Try this in the FFmpeg command.

-flags +ilme+ildct -alternate_scan 1 auto=-1

GMJCZP
4th August 2023, 21:38
Suggeston: how about add "-hwaccel auto" to both passes ?

Sorry for the late reply, but for now I still can't rejoin Doom9 as I would like. About your proposal I got this:

https://trac.ffmpeg.org/ticket/7469

Since I don't have a video card I can't corroborate this error, so for the moment this statement could not be made.

@GMJCZP I perfectly know that i'm talking about VINTAGE encoding parameters/matrices, but what about to "save" KVCD/KSVCD/KDVD too ?

Same thing, I can't review this right now.

Metal-HTPC
24th August 2024, 19:39
I just came across something ugly. FFMPEG's mpeg2 encoder seems to have a problem with encoding stills/frozen images. If you SD downscale and encode this one https://workupload.com/file/wbw2LqRdfTN
you'll notice at 00:00:21 and 00:00:58 that you're getting some nasty pumping artifacts. I tried several matrices and also played around with higher medium and max bitrates but that didn't solve the problem.
If anyone came across this issue before and has a solution that would be much appreciated.

Sharc
25th August 2024, 07:25
I just came across something ugly. FFMPEG's mpeg2 encoder seems to have a problem with encoding stills/frozen images. If you SD downscale and encode this one https://workupload.com/file/wbw2LqRdfTN
you'll notice at 00:00:21 and 00:00:58 that you're getting some nasty pumping artifacts. I tried several matrices and also played around with higher medium and max bitrates but that didn't solve the problem.
If anyone came across this issue before and has a solution that would be much appreciated.
Maybe I didn't watch carefully but how about this ...
https://mega.nz/file/HIslHLBK#fqBrUN5W146YRWnDnvQCeQ783zQ3YJqq93eKd33nj64

Metal-HTPC
25th August 2024, 10:18
Maybe I didn't watch carefully but how about this ...
https://mega.nz/file/HIslHLBK#fqBrUN5W146YRWnDnvQCeQ783zQ3YJqq93eKd33nj64

looks great. Which ffmpeg settings/matrice did you use for that?

Sharc
25th August 2024, 18:22
looks great. Which ffmpeg settings/matrice did you use for that?
Glad it seems to have solved your pumping issue. Here we go (for the video only):
ffmpeg -y -i "%~1" -c:v mpeg2video -b:v 7000k -maxrate 9800k -bufsize 1835k -bf 2 -b_strategy 2 -intra_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16" -inter_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16" -mbd rd -trellis 2 -mbcmp 2 -precmp 2 -cmp 2 -subcmp 2 -skip_cmp 2 -mpv_flags qp_rd -an -sn -vf scale=720:480,setdar=16/9 "%~1_.vob"


Using the standard matrix the GOP pumping isn't really nasty either IMO .....

Metal-HTPC
28th August 2024, 09:00
------

Metal-HTPC
30th August 2024, 00:46
I made many tests (different settings and different ffmpeg versions) over the last couple of days. Sadly the issue is ffmpeg related and probably will never be solved.

The only thing which works in such cases (downscaling modern HD productions to SD for a stand alone DVD encode) is the lower quality variant suggested by Sharc (thanks for the help buddy).

The solution for the GMJCZP HQ script would be to change the Minimum quantizer (qmin) from 1.0 to 3.5.
Anything smaller than 3.5 starts the GOP pulsing/pumping. By doing that the entire hq settings of course don't work anymore and you are left with an average encoding quality and in comparison sharc's basic script would actually look better.

If anyone wants to do some further testing here are some samples for scenes with nasty pulsing in HQ-mpeg2 encoding settings

https://mega.nz/file/SIMTgS6C#2Ih245s5FqlaP_q8RyWik9mQZ5n6UmeM4JgI4aNYfiY
https://mega.nz/file/TdEFEJiT#0EZoqDeBOapAzj3e1gKFiMWEfPtMf6qG8vCKS9ZJz24
https://mega.nz/file/vIFhVJJQ#WYz_JlJYD0Nga9kJUaBQX7Og0qO7O-7QzHKr2LbFKWU

Sharc
30th August 2024, 18:59
The only thing which works in such cases (downscaling modern HD productions to SD for a stand alone DVD encode) is the lower quality variant suggested by Sharc (thanks for the help buddy).
Not sure why you call it a lower quality variant when it solves the nasty pumping issue ;)

The solution for the GMJCZP HQ script would be to change the Minimum quantizer (qmin) from 1.0 to 3.5.
Anything smaller than 3.5 starts the GOP pulsing/pumping.

I doubt whether rising -qmin is a good approach. It may increase banding I am afraid.
Maybe try with adding -minrate 400k to prevent the bitrate from dropping too low for the problematic static scenes. This will only minimally affect the 'normal' scenes.

kolak
31st August 2024, 19:02
I frame pumping never really existed in Cinemacraft. One of the best things about it is its bitrate allocation.

Sharc
31st August 2024, 21:32
I frame pumping never really existed in Cinemacraft. One of the best things about it is its bitrate allocation.
Yes, but the user was asking for help with ffmpeg for his case ....:)

kolak
19th December 2024, 16:28
I don't think there is a proper solution for it in ffmpeg.
Everything suggested is a workaround which affects picture in other ways.

Emulgator
19th December 2024, 20:55
And there is still HCEnc for the ones who can steer away from ffmpeg and do not have CCE.
Still good enough, and hank315 took great pains to improve it over the years:
5-step selectable luminance gain adapted matrix, dead-zone, P,B ratio, free editable matrices,
and to my knowledge it is one of the very few that has implemented real Pan/Scan encoding animated in 1/16th pixel steps since 2008
Never had problems with bitrate overshoot, the VBV decoder's buffer restrictions were supported.
HCEnc 0.24 64bit even runs under Win10 Pass 1 250..350..600fps Pass 2 50..75fps on a i9-11900K.
and there is 0.28 32bit.
http://hank315.nl/

GMJCZP
1st January 2025, 06:22
I'm noticing that you're having a problem with ffmpeg, if you look closely at the script I posted, a sc_threshold value other than 0 is used, this is because ffmpeg has been a bit lazy in older versions in assigning I-frames to scenes with a lot of movement. Try changing its value to 0 (its default value) and see how it goes.

Metal-HTPC
7th January 2025, 18:36
-
I never heard of a 0.24 64bit version of HCencoder. Was that a beta version which is long gone? Just checked videohelp and saw that there even was an update in 2022 with a version 2 in 64bit https://www.videohelp.com/download/HC2Setup64.exe
That is pretty crazy and probably worth checking. I will play around with it. One of the main reasons I switched from HC 0.28 to ffmpeg was to a have a high speed high quality mpeg2 encoder and GMJCP's batch with the crazy collection of tweak settings pretty much blew me away quality wise and the speed is insane. I tried to contact cinemacraft many times to purchase the last 64bit mpeg2 encoder they ever did as in my opinion they are definitely the best quality wise also better than mainconcept. Sadly I never got a reply. That company is probably long gone and there is probably no way to purchase and activate their old software anyways. A buddy of mine still uses and older 2.6x 32bit version for his DVD releases to this day and his DVD's are insane.
I'm noticing that you're having a problem with ffmpeg, if you look closely at the script I posted, a sc_threshold value other than 0 is used, this is because ffmpeg has been a bit lazy in older versions in assigning I-frames to scenes with a lot of movement. Try changing its value to 0 (its default value) and see how it goes.
I tried that. I pretty much played around with all of the settings for a long time and there sadly was no solution for the problem. ffmpeg is not able to do high quality pump free encoding. Not just for the stills it also pumps in specifc pan shots and it's bitrate behavior is out of control to say the least which would overshoots the specs quickly. I used maxbitrate of 8000 for safty reasons there as even 8500 was a problem for some recordings. Only a more basic setting would work in ffmpeg such the one sharc suggested but with that you're only in average quality just like the standard mpeg2 encoders are theese days. Tmpeg for example. The test samples I posted are still online if you want to give it a quick go
https://forum.doom9.org/showthread.php?p=2006253#post2006253

Emulgator
8th January 2025, 04:30
I wouldn't touch that HC2Setup64.exe, hank315 never released setup.exes
BTW at the given speed of CPUs these days and HC's good threading it does not need a 64 bit build to make anyone happy.
That old CCE was 32bit AND the winner.
hank315's 0.24 beta 16-02-2010 was rather an acadamic example if a 64bit build would work I guess, since he continued improving his 32bit builds from then on. Still you can have it if you like.

cubicibo
8th January 2025, 14:08
I tried to contact cinemacraft many times to purchase the last 64bit mpeg2 encoder they ever did as in my opinion they are definitely the best quality wise also better than mainconcept. Sadly I never got a reply. That company is probably long gone and there is probably no way to purchase and activate their old software anyways.

Silicon Philosophies took over CinemaCraft products and technology, including their MPEG-2 encoder. While they no longer offer the product on their website, you could always send them a mail if you really think it is worth your money.

There's also an eBay listing (https://www.ebay.com/itm/405215563418) for a very late version supporting Windows 10 pro. But you are on your own here.

kolak
8th January 2025, 17:59
You can't get new license of old SD encoder anymore.
Only 2nd hand.
You can get h264/5 encoders from Miguel.

Metal-HTPC
9th January 2025, 16:46
I wouldn't touch that HC2Setup64.exe, hank315 never released setup.exes
BTW at the given speed of CPUs these days and HC's good threading it does not need a 64 bit build to make anyone happy.
That old CCE was 32bit AND the winner.
hank315's 0.24 beta 16-02-2010 was rather an acadamic example if a 64bit build would work I guess, since he continued improving his 32bit builds from then on. Still you can have it if you like.

well I basically switched everything to 64bit here as I'm not too much into combining 64 and 32bit. I would definitely love to test this rare 64bit version of HC and am curious if it accepts AVS+ and the scripts involved and how the speed it if I do a prefetch for 24 threads which you can't do in 32bit avs anyways by the way.
It probably also works with commandline right?

Silicon Philosophies took over CinemaCraft products and technology, including their MPEG-2 encoder. While they no longer offer the product on their website, you could always send them a mail if you really think it is worth your money.
There's also an eBay listing (https://www.ebay.com/itm/405215563418) for a very late version supporting Windows 10 pro. But you are on your own here.

thanks for the info. I doubt that they still sell it but I definitely give it a go and write them. the ebay listing is pretty expensive and if you're unlucky that DVD or CD-Rom and maybe even the usb dondel is long dead...

kolak
10th January 2025, 15:50
They don't sell it anymore.
I know guy who owns Silicon Philosophies.

benwaggoner
14th January 2025, 21:40
Rhozet Carbon Coder also had a very good MPEG-2 encoder and possibly is available used some places. It required a dongle for individual licenses, so you'll need that as well.

A blast from the past. I wrote one of the manuals for ProCoder 1.0, which eventually evolved into Carbon Coder.

Blue_MiSfit
14th January 2025, 23:44
Carbon Coder was fun :) The servers in my profile pic were running it at some point!

AWS Elemental's MPEG-2 encoder was impressive for low bitrate MPEG-2 last I looked, not sure how it stands up for DVD style encoding. It's at least super cheap to use in AWS for one-off activities.

qyot27
15th January 2025, 04:27
well I basically switched everything to 64bit here as I'm not too much into combining 64 and 32bit. I would definitely love to test this rare 64bit version of HC and am curious if it accepts AVS+ and the scripts involved and how the speed it if I do a prefetch for 24 threads which you can't do in 32bit avs anyways by the way.
It probably also works with commandline right?
The 0.24 beta 16-02-2010 that's hosted in the old versions on videohelp doesn't have any 64-bit build in it. There's not even any mention of 64-bit in the 0.24 thread until September of 2010, and even then the discussion seems to be focusing around using 64-bit MeGUI, which would probably be piping from the old 64-bit AviSynth to 32-bit HCenc, not opening it directly.

What the 16-02-2010 beta does have is a build with differing optimization flags:

Also there's a special version included which doesn't use CPU dispatching which runs 2-3 % faster on my Intel Q9450.
Any CPU which can do SSSE3 will run it, it might also speed up AMD systems, Intel compiler options: /O3 /Og /QaxT /QxT
(There are rumours CPU dispatching by Intel compilers doesn't do that well on AMD ).
I don't have an AMD system at home or at work so I can't test it.
HCenc_024_QaxT.exe would be that build, but

$ file *
HCenc_024.exe: PE32 executable (GUI) Intel 80386, for MS Windows, 6 sections
HCenc_024_QaxT.exe: PE32 executable (GUI) Intel 80386, for MS Windows, 6 sections
HCgui_024.exe: PE32 executable (GUI) Intel 80386, for MS Windows, 6 sections
All 32-bit.

kolak
15th January 2025, 22:46
Rhozet Carbon Coder also had a very good MPEG-2 encoder and possibly is available used some places. It required a dongle for individual licenses, so you'll need that as well.

A blast from the past. I wrote one of the manuals for ProCoder 1.0, which eventually evolved into Carbon Coder.

Best for interlaced content, but not good for critical DVD encoding. Can create GOPs without B frames, which fail on some players. Still not as good as SP3 for progressive sources.

benwaggoner
16th January 2025, 18:19
Best for interlaced content, but not good for critical DVD encoding. Can create GOPs without B frames, which fail on some on players. Still not as good as SP3 for progressive sources.
Yeah, the Canopus/Rhozet engine was a great fire-and-forget encoding solution, but didn't offer the kind of fine grain tuning that professional DVD authoring solutions did.

It's what CustomFlix/CreateSpace used for the their automated DVD-on-demand business back in the aughts.

IIRC, I used it for Criterion's Stan Brakhage DVD release in the early aughts, which was some very unusual and challenging content.

benwaggoner
16th January 2025, 18:22
AWS Elemental's MPEG-2 encoder was impressive for low bitrate MPEG-2 last I looked, not sure how it stands up for DVD style encoding. It's at least super cheap to use in AWS for one-off activities.
Yeah, Elemental got a HUGE amount of cable business work due to having MPEG-2 statmux encoders that could reduce ABR @ quality by about 20%. IIRC, they did a lot of advanced adaptive preprocessing to achieve that. Improvements in statmux tend to have bigger impact than for single-stream, as the more streams you get into a channel, the more flexibility you have to optimally distribute bits between them.

I don't recall ever hearing about Elemental being used for DVD creation, though. They certainly had all of the required components for it, but Blu-Ray was already taking off when Elemental hit their big sustained growth period.

They wouldn't have had the kind of fine grained tuning professional disc-targeted encoders had, though.

WSC4
19th January 2025, 05:20
nevcairiel has reported that for the purposes of the mpeg2 -preme codec it has been renamed to -mepre, however I have made the difficult decision so far not to reincorporate it in the script, since this has obtained a gain in encoding speed in the order of 25% or more.

I have not posted here for a few years and I retired from encoding DVDs via FFmpeg and authoring with DVDStyler. However, I had to re-encode a DVD yesterday that I found had been authored incorrectly with the wrong profile and would not play.

Back in 2019 using manolito's parameters (https://forum.doom9.org/showthread.php?p=1808247#post1808247), I found FFmpeg had made -sc_factor and -me_method dia options obsolete. I now find that the -preme and -skipcmp option causes:

Unrecognized option 'preme=2'.
Error splitting the argument list: Option not found

Unrecognized option 'skipcmp'.
Error splitting the argument list: Option not found

-preme had been changed to -mepre by the developers. Doing a CTRL+F search through https://ffmpeg.org/ffmpeg-all.html does not find or mention the -skipcmp, -preme or -mepre options. Why? Where did they come from?

I need to try your DVD script version 4.2. Has it been updated?

GMJCZP
23rd January 2025, 17:40
I have not posted here for a few years and I retired from encoding DVDs via FFmpeg and authoring with DVDStyler. However, I had to re-encode a DVD yesterday that I found had been authored incorrectly with the wrong profile and would not play.

Back in 2019 using manolito's parameters (https://forum.doom9.org/showthread.php?p=1808247#post1808247), I found FFmpeg had made -sc_factor and -me_method dia options obsolete. I now find that the -preme and -skipcmp option causes:

Unrecognized option 'preme=2'.
Error splitting the argument list: Option not found

Unrecognized option 'skipcmp'.
Error splitting the argument list: Option not found

-preme had been changed to -mepre by the developers. Doing a CTRL+F search through https://ffmpeg.org/ffmpeg-all.html does not find or mention the -skipcmp, -preme or -mepre options. Why? Where did they come from?

I need to try your DVD script version 4.2. Has it been updated?

I've tested the latest 32-bit version and haven't noticed any issues with version 4.2 of my script, I don't know which 32-bit or 64-bit version you're using. For builds you can check here (https://www.animmouse.com/p/ffmpeg-binaries/).

WSC4
24th January 2025, 03:29
I've tested the latest 32-bit version and haven't noticed any issues with version 4.2 of my script, I don't know which 32-bit or 64-bit version you're using. For builds you can check here (https://www.animmouse.com/p/ffmpeg-binaries/).

Thanks for the link, and I now realise I have been using a version that is obsolete. For 15 years, I have been using Gianluigi Tiesi's at https://oss.netfarm.it/mplayer/ His builds have not been updated since 2022 and were not compiled with those options. I have message him several times but no answer. I think he has retired from this sort of thing permanently.

There are 2 official Windows builds and many unofficial. Which do you use?

GMJCZP
24th January 2025, 03:56
Try any of them to see which one works best for you, or try them here (https://www.videohelp.com/software/ffmpeg).