Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > One click suites for DVD backup and DVD creation

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th January 2014, 13:12   #2401  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,445
As a note, I believe that the Blu-ray specs allow for 23.976 in all regions. For that matter, I think the same is also true of 25, but I'm not as sure on that (and I have no discs that it might occur on to verify it, either).

Personally, in that situation, I'd override it and make it convert to PAL. Less of a framerate difference and such, and no quibbling over whether you have to account for a denominator of 1001 or 1000 when trying to do a chapter conversion (also, '30fps' is often used as a shorthand for anything with a numerator of 30000, just like '24fps' is sometimes for 24000 numerators - because 30000/1000 isn't compliant with the DVD spec, the shorthand is probably what you're seeing there).

Last edited by qyot27; 10th January 2014 at 13:17.
qyot27 is offline   Reply With Quote
Old 16th January 2014, 20:39   #2402  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
ffmpeg vbr encodes in AVStoDVD

Here's a somewhat delayed Xmas present for Fishman0919...

I made a small wrapper for ffmpeg.exe which enables 1-pass and also 2-pass VBR encodes using ffmpeg. The 2-pass command line is taken from this post:
http://forum.doom9.org/showthread.ph...80#post1651880

Here is the readme:
Quote:
ffmpeg VBR modes for AVStoDVD
------------------------------------

This small utility allows 1-pass VBR and high quality 2-pass VBR encodes
using ffmpeg under AVStoDVD.


Installation:

1. Go to the "AVStoDVD\FFmpeg" folder and rename the original "ffmpeg.exe"
to "_ffmpeg.exe". This name is hard coded into the script and cannot
be changed.

2. Extract the two files "ffmpeg.exe.vbr" and "ff_vbr.bat" into this folder,
then rename "ffmpeg.exe.vbr" to "ffmpeg.exe".



Usage:

With the AVStoDVD default settings nothing changes at all (hopefully).
For medium and lower bitrates the HCenc encoder is used by default.
If you override this setting and force ffmpeg CBR, now ffmpeg will operate
in 1-pass VBR mode instead.

If your bitrate is below 3500k AND you have activated the ffmpeg high
quality mode, ffmpeg will run in a high quality 2-pass VBR mode.
(command line parameters courtesy of Fishman0919)
Download here: //EDIT// Link removed

I have tested it quite a bit with ffmpeg version 2.1.1, on my Windows XP machine it is very stable. I do not know however if renaming ffmpeg.exe in a folder under "program files" will work under Win7 or Win8. If it doesn't, you probably know the usual workarounds (Take Ownership or install AVStoDVD outside of program files). The script itself only writes into the specified output folder which should not be a problem.

The provided "ffmpeg.exe.vbr" is just a compiled batch file which only calls ff_vbr.bat. Not too elegant, but "ffmpeg.exe" is hard coded into the AVStoDVD executable, and I really did not want to patch the executable.


There are a couple of things I noticed while I made this thing, maybe one of you guys has some answers:

I noticed that AVStoDVD sets a buffer size of 2000k by default. According to the DVD specs this is a little high, it should be 1835k according to Hank315. Is there a special reason for this?

In 2-pass mode using Fishmans parameters, ffmpeg issues a warning:
Quote:
ME_MAP size may be a little small for the selected diamond size
Is this something serious or should I ignore it?

When I was comparing 1-pass VBR mode to good old QuEnc I noticed that ffmpeg has a tendency to undersize quite a bit, sometimes by almost 20%. This was for an already low bitrate of 3900k. While QuEnc 1-pass and HCenc 1-pass both had no problems, ffmpeg only reached a bitrate of a little over 3000k.

I then tried to specify a minimum quantizer of 1, but it did not help very much. Are there any parameters I can use to avoid this undersizing without compromising speed?


Whatever, please test my little tool and let me know what should be improved....


Cheers
manolito

Last edited by manolito; 18th January 2014 at 16:51.
manolito is offline   Reply With Quote
Old 17th January 2014, 02:03   #2403  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Thank you kind sir.... I'll give this a try tonight
Quote:
ME_MAP size may be a little small for the selected diamond size
That because I set the diamond size to 5... ffmpeg think 3 should be enough. little gain for little speed lost. -pre_dia_size 5 -dia_size 5

Quote:
When I was comparing 1-pass VBR mode to good old QuEnc I noticed that ffmpeg has a tendency to undersize quite a bit, sometimes by almost 20%. This was for an already low bitrate of 3900k. While QuEnc 1-pass and HCenc 1-pass both had no problems, ffmpeg only reached a bitrate of a little over 3000k.

I then tried to specify a minimum quantizer of 1, but it did not help very much. Are there any parameters I can use to avoid this undersizing without compromising speed?
-lmin 0.01 -mblmin 1 -qmin 1 -qmax 31

Let ffmpeg go down to 0.01 quantizer

Quote:
ffmpeg.exe -i "####.avs" -framerate 23.976 -aspect 16:9 -dc # -g 12 -maxrate 7500k -b_strategy 2 -brd_scale 2 -bf 2 -profile:v 4 -lmin 0.01 -mblmin 1 -qmin 1 -qmax 31 -maxrate 7500k -b:v ####k -bf 2 -pre_dia_size 5 -dia_size 5 -qcomp 0.7 -qblur 0 -preme 2 -me_method dia -sc_threshold 0 -sc_factor 4 -bidir_refine 4 -profile:v 4 -mbd rd -mbcmp satd -precmp satd -cmp satd -subcmp satd -skipcmp satd -pass 1 -passlogfile ffmpeg -an -f mpeg2video pass1.m2v
...would be a good 1 pass


EDIT:

Quote:
If your bitrate is below 3500k AND you have activated the ffmpeg high
quality mode
, ffmpeg will run in a high quality 2-pass VBR mode.
(command line parameters courtesy of Fishman0919)
?? Where would I do that?

Quote:
@ECHO off

SET FF_DRIVE=%~d0
SET FF_PATH=%~p0
SET ORIGINAL=%*
SET CMDLINE=
SET /A bitrate=8500
SET hq=0
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 17th January 2014 at 06:19.
Fishman0919 is offline   Reply With Quote
Old 17th January 2014, 10:55   #2404  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Thanks Fishman for the tips, time for some more testing...

Quote:
Originally Posted by Fishman0919 View Post
?? Where would I do that?
Here:
http://i43.tinypic.com/24v7l1v.jpg


The hq variable is initialized to 0 first, then if the "-trellis" parameter is detected in the commandline issued by AVStoDVD it is changed to 1.
Code:
IF %1==-trellis SET hq=1
.....
IF %bitrate% LSS 3500 IF %hq%==1 GOTO 2pass
I could have omitted the initialization, but then the hq check would have to be:
IF !%hq%==!1


Cheers
manolito

Last edited by manolito; 17th January 2014 at 13:00.
manolito is offline   Reply With Quote
Old 17th January 2014, 14:21   #2405  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Yes, the -lmin and -mblmin parameters really did the trick. No more undersizing in 1-pass VBR mode.

The ffmpeg defaults for both values are 236, so I figured that 0.01 or 1 could be a little agressive. So I did some tests with a 5min chunk of a critical source. I set the bitrate to 4000k, and without the -lmin and -mblmin parameters the encode came out at 2898k.

With values of 0.01 and 1 I did get 4000k, but in darker scenes the bitrate was much higher than with HCenc 1-pass. After playing around a little bit I found that the sweet spot for both -lmin and -mblmin values lies at 170 for me.

I already modified the batch file and uploaded it, this is the link:
//EDIT// Link removed

Cheers
manolito

Last edited by manolito; 18th January 2014 at 16:50.
manolito is offline   Reply With Quote
Old 18th January 2014, 05:58   #2406  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by manolito View Post
Yes, the -lmin and -mblmin parameters really did the trick. No more undersizing in 1-pass VBR mode.

The ffmpeg defaults for both values are 236, so I figured that 0.01 or 1 could be a little agressive. So I did some tests with a 5min chunk of a critical source. I set the bitrate to 4000k, and without the -lmin and -mblmin parameters the encode came out at 2898k.

With values of 0.01 and 1 I did get 4000k, but in darker scenes the bitrate was much higher than with HCenc 1-pass. After playing around a little bit I found that the sweet spot for both -lmin and -mblmin values lies at 170 for me.

I already modified the batch file and uploaded it, this is the link:
http://www7.zippyshare.com/v/81023194/file.html


Cheers
manolito
Thanks for the updated batch...

Sweet spot 170?... 1.70, .170

EDIT:
Quote:
IF %1==-maxrate SET CMDLINE=%CMDLINE% -maxrate 8500k -qmin 1 -lmin 170 -mblmin 170
I believe/thought the default for both was 3... it's been awhile. Odd that 170 works well for you... seems a bit high... but if it works


The bitrate is probably higher then HC in darker scenes because ffmpeg uses the Mpeg Standard maxtic by default and isn't using AQM... trying to retain more detail.
In my testing I found that FFMpeg is OK at best in 1 pass encoding.... unless you turn all the setting to the max and bring the encoding to a crawl.

With AVStoDVD v2.7.2... I get no option...
http://i467.photobucket.com/albums/r...ps3e58bb85.jpg
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 18th January 2014 at 07:13.
Fishman0919 is offline   Reply With Quote
Old 18th January 2014, 09:04   #2407  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Quote:
Originally Posted by Fishman0919 View Post
Thanks for the updated batch...

Sweet spot 170?... 1.70, .170

EDIT:

I believe/thought the default for both was 3... it's been awhile. Odd that 170 works well for you... seems a bit high... but if it works

Hi Fishman,

from the ffmpeg 2.2.1 help:
Quote:
-lmin <int> E..V.. minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)
-mblmin <int> E..V.. minimum macroblock Lagrange factor (VBR) (from 1 to 32767) (default 236)
Some more tests make it appear as if there is a hard switch between the values of 170 and 180. Using 180 makes ffmpeg behave just as if the defaults of 236 are used, i.e. heavy undersizing. Weird...
BTW what the hell is the "Lagrange Factor"? I thought that I already knew a little bit about MPEG2 encoding, but obviously I was wrong.


Quote:
Originally Posted by Fishman0919 View Post
The bitrate is probably higher then HC in darker scenes because ffmpeg uses the Mpeg Standard maxtic by default and isn't using AQM... trying to retain more detail.
In my testing I found that FFMpeg is OK at best in 1 pass encoding.... unless you turn all the setting to the max and bring the encoding to a crawl.
I only need the 1-pass VBR mode for encodes where the source quality is already questionable, and my first objective is that it must fast. Faster than HCenc 1-pass. And this is the case with your help now, I am happy with it.

Quote:
Originally Posted by Fishman0919 View Post
With AVStoDVD v2.7.2... I get no option...
You are looking at the wrong place...
This option is not under "Preferences", it is under "View/Edit Title Settings" for each loaded source file.



Cheers
manolito
manolito is offline   Reply With Quote
Old 18th January 2014, 13:58   #2408  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Quote:
Sweet spot 170?... 1.70, .170

EDIT:
Quote: IF %1==-maxrate SET CMDLINE=%CMDLINE% -maxrate 8500k -qmin 1 -lmin 170 -mblmin 170

I believe/thought the default for both was 3... it's been awhile. Odd that 170 works well for you... seems a bit high... but if it works

OK, I think I found the explanation for these odd values.
Quote:
From the ffmpeg manual:
The four options lmin, lmax, mblmin and mblmax use ’lambda’ units, but you may use the QP2LAMBDA constant to easily convert from ’q’ units: ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
The value of the QP2LAMBDA constant is 118. You are still using the Q units while the current ffmpeg versions use the lambda units.


Here is a small conversion table:

Code:
                   Q             Lambda
_________________________________________________

Default            2                236
lmin               0.01               1.18
mblmin             1                118
My sweet
spot               1.44             170
Seems like I should make more tests to see if I really should use the same values for lmin and mblmin for my "sweet spot". And your 2-pass command line should probably be modified also by adding "*QP2LAMBDA" to your values.



Cheers
manolito
manolito is offline   Reply With Quote
Old 18th January 2014, 16:49   #2409  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Alright, another (and hopefully final) version of my tool...

//EDIT// Link removed

For the quick 1-pass VBR mode I changed -lmin to 175 and left -mblmin at its default value of 236. Works well on my test files.

I also took the liberty to convert the 2-pass parameters from the old q units to lambda units. Now it looks like:
-lmin 1.18 -mblmin 118


Cheers
manolito

Last edited by manolito; 20th January 2014 at 14:10.
manolito is offline   Reply With Quote
Old 18th January 2014, 21:25   #2410  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by manolito View Post
Hi Fishman,

from the ffmpeg 2.2.1 help:

Some more tests make it appear as if there is a hard switch between the values of 170 and 180. Using 180 makes ffmpeg behave just as if the defaults of 236 are used, i.e. heavy undersizing. Weird...
BTW what the hell is the "Lagrange Factor"? I thought that I already knew a little bit about MPEG2 encoding, but obviously I was wrong.



I only need the 1-pass VBR mode for encodes where the source quality is already questionable, and my first objective is that it must fast. Faster than HCenc 1-pass. And this is the case with your help now, I am happy with it.


You are looking at the wrong place...
This option is not under "Preferences", it is under "View/Edit Title Settings" for each loaded source file.



Cheers
manolito
A multivariable calculus technique.

LINK


EDIT: A few test runs and all seems to be working fine... thank you for your work
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 19th January 2014 at 03:57.
Fishman0919 is offline   Reply With Quote
Old 19th January 2014, 07:20   #2411  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
I did a couple of tests on 2 pass encodings with -lmin 1.18 -mblmin 118

The Hobbit: An Unexpected Journey (BluRay)
ffmpeg -lmin 1.18 -mblmin 118 - 4.24g
ffmpeg -lmin 0.01 -mblmin 1 - 4.33g
HC - 4.32g

Saving Private Ryan (BluRay)
ffmpeg -lmin 1.18 -mblmin 118 - 4.26g
ffmpeg -lmin 0.01 -mblmin 1 - 4.32g
HC - 4.32g

-lmin 1.18 -mblmin 118 seems to have a hard time with dark movies... I'll play with the setting to find a point where it works for 2 pass encodings.

I also added the Standard Matrix to the command line... works better with encodings below 3500k. Will do some testing to see if QuEnc's QLB matrix will work better.

Mpeg Standard Matrix (Default)
Code:
-intra_matrix "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" -inter_matrix "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"
Standard Matrix.
Code:
-intra_matrix "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" -inter_matrix "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"
QLB Matrix
Code:
-intra_matrix "8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,37,39,22,22,26,27,29,34,38,42,22,26,27,29,32,36,40,50,26,27,29,32,36,40,50,61,26,27,29,35,40,50,59,75,27,29,35,40,50,59,75,89" -inter_matrix "16,17,18,19,20,21,22,23,17,18,19,20,21,22,23,25,18,19,20,21,22,23,24,26,19,20,21,22,23,24,26,28,20,21,22,23,25,26,28,29,21,22,23,24,26,28,29,31,22,23,24,26,28,29,31,34,23,24,25,28,29,31,34,38"
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 19th January 2014 at 07:25.
Fishman0919 is offline   Reply With Quote
Old 19th January 2014, 10:47   #2412  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Thanks Fishman for your tests. The reason I modified your original values was that I thought you had used them assuming they were "q" units.

For lower bitrate encodes I am a big fan of the MANONO matrices. Maybe you can include them in your tests.

Manono1
Code:
-intra_matrix "8,8,8,9,11,13,14,17,8,8,9,11,13,13,14,17,8,8,11,12,13,14,17,94,9,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" -inter_matrix "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"
The MANONO 2 matrix (aka Sony Medium) is also very good, it is less radical at the higher frequencies.

Manono2
Code:
-intra_matrix "8,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" -inter_matrix "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"

I will leave the testing of the 2-pass parameters to you, because I have a hard time making out small differences on my old CRT tv set. Looking forward to your results...


Cheers
manolito

Last edited by manolito; 19th January 2014 at 11:00.
manolito is offline   Reply With Quote
Old 19th January 2014, 15:42   #2413  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
manolito, Fishman0919, what about adding the 'ffmpeg_vbr.zip' package to the AddOns stuff on SourceForge? Just tell me when you are confident and satisfy enough. Of course it would be better to have the option available directly in AVStoDVD. Another item in the ToDo list.

Meanwhile 2.7.3 release is finally out. Change log:

- Some bugs fixed
- Added 'Preferred DirectShow Codecs Setup' section
- Added SetACL 2.0.3.0 (LGPL by Helge Klein) to AVStoDVD package
- Improved framerate conversion section of AviSynth script generation routine
- Updated A2DSource.avsi to properly handle non-mod4 width sources (thanks to manolito)
- FFmpeg updated to 2.1 (git-9244a68)



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 19th January 2014, 19:15   #2414  |  Link
soneca
Registered User
 
Join Date: Feb 2008
Location: Brazil
Posts: 753
Thanks MrC!
soneca is offline   Reply With Quote
Old 20th January 2014, 04:28   #2415  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by MrC View Post
manolito, Fishman0919, what about adding the 'ffmpeg_vbr.zip' package to the AddOns stuff on SourceForge? Just tell me when you are confident and satisfy enough. Of course it would be better to have the option available directly in AVStoDVD. Another item in the ToDo list.

Meanwhile 2.7.3 release is finally out. Change log:

- Some bugs fixed
- Added 'Preferred DirectShow Codecs Setup' section
- Added SetACL 2.0.3.0 (LGPL by Helge Klein) to AVStoDVD package
- Improved framerate conversion section of AviSynth script generation routine
- Updated A2DSource.avsi to properly handle non-mod4 width sources (thanks to manolito)
- FFmpeg updated to 2.1 (git-9244a68)



Bye
Awesome... thanks for the update.

I did a few more test and found that -lmin 0.75 -mblmin 50 seem to work very well on my test movies... bitrates hitting the target. Dark scene still look good without bitrates peaking to high. I also noticed that moving grass and still walls look better... -lmin 1.18 -mblmin 118 may have looked somewhat better on these but seemed to fail in the dark areas.

I'm running a couple more movies right now but -lmin 0.75 -mblmin 50 seems pretty good for 2 pass encodings.
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"
Fishman0919 is offline   Reply With Quote
Old 20th January 2014, 08:41   #2416  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
I think the settings for FFMpeg are are pretty good now for 2 pass encoding. Quality is good, speed is good and it's hitting the target bitrate for bright and dark movies.
I stayed with the Standard Matrix because of compatibility with some DVD players and it just seemed to work well with FFMpeg below 3500k.

I think I dialed in the setting pretty good on my test with "Man of Steel" BluRay encoded at 3200k. A bitrate view of HC026_beta_16-06-2011, CCE-Basic 2.70 01.16 and ffmpeg-2.1.1

http://i467.photobucket.com/albums/r...psc1a7dd22.jpg

Here are my 2 pass settings...
Code:
@ECHO on
_ffmpeg.exe -i %in% -aspect %aspect% -dc %dc% -g 12 -maxrate 7500k -q:v 2 -b_strategy 2 -brd_scale 2 -bf 2 -profile:v 4 -intra_matrix "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" -inter_matrix "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" -pass 1 -passlogfile "%out_path%ffmpeg" -an -f mpeg2video %il% "%out_name%_pass1.m2v"

_ffmpeg.exe -i %in% -aspect %aspect% -dc %dc% -g 12 -lmin 0.75 -mblmin 50 -qmin 1 -qmax 31 -maxrate 7500k -b:v %bitrate%k -bf 2 -pre_dia_size 5 -dia_size 5 -qcomp 0.7 -qblur 0 -preme 2 -me_method dia -sc_threshold 0 -sc_factor 4 -bidir_refine 4 -profile:v 4 -mbd rd -mbcmp satd -precmp satd -cmp satd -subcmp satd -skipcmp satd -intra_matrix "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" -inter_matrix "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" -pass 2 -passlogfile "%out_path%ffmpeg" -an -f mpeg2video %il% %out%
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 20th January 2014 at 08:54.
Fishman0919 is offline   Reply With Quote
Old 20th January 2014, 11:31   #2417  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Thanks a lot Fishman. Those bitrate views look excellent to me. I think that I will also add the standard matrix to the 1-pass VBR mode. AFAIK the MPEG Standard matrix with all non-intra coefficients set to 16 was never a good choice for DVD encodes, at least this is what I read about all the common MPEG2 encoders.

Maybe even the high bitrate CBR mode would profit from using the standard matrix. I will add it in my next upload.


Quote:
manolito, Fishman0919, what about adding the 'ffmpeg_vbr.zip' package to the AddOns stuff on SourceForge? Just tell me when you are confident and satisfy enough.
I like the idea, thank you for your trust...

It looks like Fishman has finalized the 2-pass parameters, so this part is probably final. I will add the standard matrix to the 1-pass VBR mode, and maybe the standard matrix is also a better choice for the CBR mode. I will need your advice on this. Finally I probably should polish the documentation a little bit and convert it to PDF.

Also did you notice my question about the buffer size of 2000k in CBR mode? Any special reason for this slightly higher size?

And of course thanks for the new version, I will install it right away and run a few tests. Also letting you know that I have been using LAV filters (0.60 and 0.60.1) for some time now without any issues. I cannot test the correct channel assignment though, the LAV mixer is disabled by default, and I kept it that way.


Cheers
manolito
manolito is offline   Reply With Quote
Old 20th January 2014, 14:09   #2418  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Here we go...

//EDIT// Link removed

I added Fishman's new parameters to the 2-pass section, 1-pass VBR also uses the standard matrix, and for the default 1-pass CBR mode I also added the standard matrix, but left it deactivated for now.

If you want to try the standard matrix in 1-pass CBR mode, open the batch file with an editor, go to the label ":dont_touch" and delete the "REM" in front of the corresponding line. Save the file and have fun...



Cheers
manolito

Last edited by manolito; 22nd January 2014 at 17:02.
manolito is offline   Reply With Quote
Old 21st January 2014, 04:33   #2419  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by manolito View Post
Here we go...

http://www32.zippyshare.com/v/59964280/file.html

I added Fishman's new parameters to the 2-pass section, 1-pass VBR also uses the standard matrix, and for the default 1-pass CBR mode I also added the standard matrix, but left it deactivated for now.

If you want to try the standard matrix in 1-pass CBR mode, open the batch file with an editor, go to the label ":dont_touch" and delete the "REM" in front of the corresponding line. Save the file and have fun...



Cheers
manolito
Thank You!
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"
Fishman0919 is offline   Reply With Quote
Old 22nd January 2014, 12:58   #2420  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
New findings:

It seems that the error when using DGindex was not my fault. The hidden ffmpeg call for NUL output has these parameters:
Code:
-i "I:\AVSInfo.avs" -f rawvideo -y NUL
I did intercept these parameters and called _ffmpeg.exe with correct parameters, but I still got a timeout error whenever the MPEG2 source file was longer than 1 minute.

Next I removed my VBR tool completely and tried to use DGindex on a 10 minutes long MPEG2 file, and again I got the timeout error.

Conclusion: Even if my computer is old and slow, this timeout error should not happen. Using ffmpeg for NUL encoding seems to be VERY much slower than the former AVS2AVI method. Using DGindex is completely impossible on my computer. Either the timeout must be removed, or something other than ffmpeg should be used for this (AVSmeter?).


So I will leave my VBR tool as it is for the moment, just keep in mind to avoid using DGindex.



Cheers
manolito

Last edited by manolito; 27th January 2014 at 14:54.
manolito is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.