Log in

View Full Version : AVCHDCoder - Blu-ray, MKV, M2TS, etc to AVCHD encoder. From input to ISO. Easy to use


Pages : 1 2 3 [4] 5 6 7 8 9 10

Atak_Snajpera
15th July 2009, 23:56
The.Da.Vinci.Code.1080p.NLsubs.MrBlueEyes.WMV
could you upload 50mb - 100mb sample to www.mediafire.com. I would like to check this file.

Guest
16th July 2009, 00:41
It's warez. You can't discuss it.

turbojet
16th July 2009, 03:33
Another question. I am looking for a commandline application to convert 2 and 6 ch AAC to FLAC or AC3. Found different tools but I don't know what they do (faac, faad and enc_aacplus).
I have another solution: dbPoweramp can do what I want but I prefer another application because after 30 day trial you need a licenced copy of dbPoweramp in order to use the commandline (What AVCHDCoder uses)

faad (http://www.rarewares.org/aac-decoders.php) -o "<output.wav>" "<input.aac>"
aften (http://www.videohelp.com/tools/Aften) -b <bitrate> "<input.wav>" "<output.ac3>" or eac3to

twazerty
16th July 2009, 23:21
faad (http://www.rarewares.org/aac-decoders.php) -o "<output.wav>" "<input.aac>"
aften (http://www.videohelp.com/tools/Aften) -b <bitrate> "<input.wav>" "<output.ac3>" or eac3to

Ok I will try that later. First I am fixing the different files that can be entered. The AVCHD/Blu-ray specs are not clear enough. For now all possible framerates kan be entered but they are not all valid. I made a list of framerates that are common for HD:
23.976 fps
24.000 fps
25.000 fps
29.970 fps
30.000 fps
50.000 fps
59.940 fps
60.000 fps

so we have the following possibility's:
720p 23.976 fps V
720p 24.000 fps
720p 25.000 fps
720p 29.970 fps
720p 30.000 fps
720p 50.000 fps
720p 59.940 fps
720p 60.000 fps

1080p 23.976 fps V
1080p 24.000 fps
1080p 25.000 fps
1080p 29.970 fps
1080p 30.000 fps
1080p 50.000 fps
1080p 59.940 fps
1080p 60.000 fps

1080i 23.976 fps
1080i 24.000 fps
1080i 25.000 fps
1080i 29.970 fps
1080i 30.000 fps
1080i 50.000 fps
1080i 59.940 fps
1080i 60.000 fps

and as far as I know 720i is not supported. I added a "V" if I know it is officially supported and "X" if not. I am also making 3 discs with all framerates. Still testing but the following worked on my Samsung BD-P1500:
720p 23.976 fps
720p 25.000 fps
720p 29.970 fps
720p 50.000 fps
720p 59.940 fps

All formats that are invalid will be converted to 23.976 or something else that is valid.

setarip_old
17th July 2009, 00:07
@twazerty

Are you now able to use "tsMuxeR", as I suggested, to remove pulldowns?

twazerty
17th July 2009, 00:36
@twazerty

Are you now able to use "tsMuxeR", as I suggested, to remove pulldowns?

Not tested it yet. Today I was fixing the wmvhd problem and for that I have a possible solution. With the remove of pulldown the fps will change from 29.970 to 23.976? If yes how does it work for all the other interlaced files? (23.976, 59.940 etc)

Maybe the solution for wmvhd also work for interlaced m2ts files just need to test it. I'll do that tomorrow.

Edit: Couldn't wait and did a first test. I noticed that a new fps is needed when remove pulldown is activated. (I use tsMuxer to check if pulldown is applied on source file) Is it safe to assume the fps is 23.976 after pulldown for 29.976 is removed? And what is most likely the fps when source is 59.94 and pulldown is applied? And for the other fps (24 etc)?
Or is there a procedure to determine what the fps needs to be after removing pulldown?

turbojet
17th July 2009, 03:30
According to the AVCHD standards (http://www.avchd-info.org/format/index.html) these are the (only?) allowed resolutions, framerates:

1080p 23.976
1080i 25.00
1080i 29.97

720p 23.976
720p 50.00
720p 60.00

480i 25.00
480i 29.97

50i = 50 fields per second / 2 fields per frame = 25 frames per second
60i = 60 fields per second / 2 fields per frame = 29.97 frames per second

Blu-ray standards are closed but I have yet to see a blu-ray use anything but these resoutions/framerates.

interlaced can use 23.976 -> 29.97 pulldown although it's not very common
interlaced does not necessarily mean combing, it just means interlaced flag (MBPAFF), just like many PAL DVD's.

ivtc from 29.97 -> 23.976 can be useful in many cases, but mostly in extras so far
ivtc from 25 -> 23.976 can be useful in a few cases with a movie
ivtc from 29.97 -> 25 I haven't heard of needing yet in blu-ray but I wouldn't doubt that it will be useful once the small distribution plants release blu-ray (pal filmed movies on ntsc regions)

setarip_old
17th July 2009, 03:49
@twazertyI noticed that a new fps is needed when remove pulldown is activatedIn my earlier post I quoted the following regarding pulldowns and "tsMuxeR":Attention! When using delPulldown usually a new value fps is required, different from values in the stream. For example, if the stream has fps=29.97, after setting delPulldown you have to input fps=23.976.To see acceptable changes of fps upon deleting pulldowns, load a file into the "tsMuxeR" GUI, highlight the videostream and put a check next to "Change fps" under "General track options" - Then click on the dropdown arrow to the right...

twazerty
17th July 2009, 14:10
@twazertyIn my earlier post I quoted the following regarding pulldowns and "tsMuxeR":To see acceptable changes of fps upon deleting pulldowns, load a file into the "tsMuxeR" GUI, highlight the videostream and put a check next to "Change fps" under "General track options" - Then click on the dropdown arrow to the right...

I see. Did a test with my 1080i 29.97 pulldown movie. After removing pulldown i get: 1080i 23.976 movie. But the audio is out of sync. tsMuxer gave these warnings:

Warning! Source stream contain irregular pulldown marks. Mistiming between original fps and fps/1.25(without pulldown) exceed 100ms.
Warning! Source stream contain irregular pulldown marks. Mistiming between original fps and fps/1.25(without pulldown) exceed 200ms.
Warning! Source stream contain irregular pulldown marks. Mistiming between original fps and fps/1.25(without pulldown) exceed 400ms.
Warning! Source stream contain irregular pulldown marks. Mistiming between original fps and fps/1.25(without pulldown) exceed 800ms.
Warning! Source stream contain irregular pulldown marks. Mistiming between original fps and fps/1.25(without pulldown) exceed 1601ms.

Tried different fps output but all gave these warnings.

setarip_old
17th July 2009, 18:50
After removing pulldown i get: 1080i 23.976 movie.Did you then (as required) enter "fps=23.976"?

Have you tried using the format "24/1001" instead of "23.976"?

twazerty
17th July 2009, 20:07
Did you then (as required) enter "fps=23.976"?

Have you tried using the format "24/1001" instead of "23.976"?

For testing I use the GUI of tsMuxer. Checked Remove pulldown and checked Change fps. In the dropdown I have chosen 24000/1001. The result is an out of sync audio. I think it's about a couple of seconds.

twazerty
18th July 2009, 00:32
Lets forget all problems for a while. The next is the most important and without your help it's going to take weeks before I can release my next version. I am trying the whole day but I can't find out what to do. I need avisynth script to change the fps. Programming is easy for me but avisynth is very difficult.

To be 100% blu-ray compatible every framerate should be converted to 23.976 if resolution is 1080p. So we have the following possibility's:
60.00 --> 23.976
59.94 --> 23.976
50.00 --> 23.976
30.00 --> 23.976
29.97 --> 23.976
25.00 --> 23.976

This script did work for 2 different 29.97 wmv movies:
DirectShowsource("input.wmv",convertfps=true,audio=false).ConvertToYV12()
Loadplugin("C:\TIVTC\TIVTC.dll")
TDecimate()

Both were converted to 23.976. But it didn't work for a m2ts 29.97 file. Output was 23.9761 and playback was choppy. The wmv playback is smooth. And the above script didn't work for other framerates. It saves me days maybe week if somebody will help me with all needed avisynth scripts.

The following script worked perfectly for m2ts 29.97 to 23.976 and for m2ts 25 to 23.976:

DirectShowsource("input.m2ts",fps=25.000,audio=false) //fps=29.970 for the 29.97 to 23.976
ConvertFPS(23.976)
ConvertToYV12()

setarip_old
18th July 2009, 01:15
Here's an example of a successful conversion of an .M2TS file (The original 1080i at 29.970 fps was converted to 23.976fps using "tsMuxeR"):

DirectshowSource("E:\_HDTESTS-ALL\WILLYWONKA_BR\BDMV\STREAM\00000.m2ts", fps=23.976, framecount=143492, audio=false)

twazerty
18th July 2009, 01:30
Here's an example of a successful conversion of an .M2TS file (The original 1080i at 29.970 fps was converted to 23.976fps using "tsMuxeR"):

DirectshowSource("E:\_HDTESTS-ALL\WILLYWONKA_BR\BDMV\STREAM\00000.m2ts", fps=23.976, framecount=143492, audio=false)

what is the purpose of framecount? Will it prevent out of sync problems? And should framecount be calculated or what?


According to the AVCHD standards (http://www.avchd-info.org/format/index.html) these are the (only?) allowed resolutions, framerates:

1080p 23.976
1080i 25.00
1080i 29.97

720p 23.976
720p 50.00
720p 60.00

480i 25.00
480i 29.97

50i = 50 fields per second / 2 fields per frame = 25 frames per second
60i = 60 fields per second / 2 fields per frame = 29.97 frames per second

Blu-ray standards are closed but I have yet to see a blu-ray use anything but these resoutions/framerates.

Is 1080i @ 59.94fps allowed or not and is 1080i @ 50fps allowed or not?
I think you mean 720p 59.94? Because all material I have is 59.94 and not 60
And what about 720p 29.97 and 720p 25fps?

turbojet
18th July 2009, 07:34
Is 1080i @ 59.94fps allowed or not and is 1080i @ 50fps allowed or not?

Not allowed according to the AVCHD standard and I don't think they play

I think you mean 720p 59.94? Because all material I have is 59.94 and not 60

Yup you are right 59.940060.

And what about 720p 29.97 and 720p 25fps?

Not allowed according to the AVCHD standard but I think they do play along with 720i 29.97 and 720i 25

The avisynth scripts could be something like this:

23.976 to 1080p/720p: Directshowsource("",fps=23.976,audio=false).AssumeFPS(24000,1001).ConvertToYV12()


25 to 1080i: Directshowsource("",fps=25,audio=false).ConvertToYV12() #x264 --interlaced

25 to 720p: Directshowsource("",fps=25,audio=false).ConvertToYV12().Tdeint(mode=1,full=false) #required?

25 IVTC to 23.976 1080p/720p (option): Directshowsource("",fps=25,audio=false).ConvertToYV12().TFM().TDecimate(25).AssumeFPS(24000,1001) #eac3to -changeto24.975 (needs testing)


29.97 to 1080i: Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12() #x264 --interlaced

29.97 to 720p: Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12().TDeint(mode=1) #required?

29.97 IVTC to 23.976 1080p/720p (option): Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12().TFM().TDecimate()

29.97 IVTC to 25 fps 1080i (option): Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12().TDeint(mode=1,full=false).RePAL().AssumeFPS(25) #x264 --interlaced eac3to -changeto30.03 (needs testing)

29.97 to 50 fps 720p (option): Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12().TDeint(mode=1,full=false).RePAL().AssumeFPS(25).Tdeint(mode=1) #x264 --interlaced eac3to -changeto30.03 (needs testing)


50 to 1080i: Directshowsource("",fps=50,audio=false).ConvertToYV12().AssumeTFF().SelectEven().TDecimate() #x264 --interlaced

50p to 720p: Directshowsource("",fps=50,audio=false).ConvertToYV12()

50i to 720p: Directshowsource("",fps=50,audio=false).ConvertToYV12().TFM()


59.94 to 1080i: Directshowsource("",fps=59.94,audio=false).AssumeFPS(60000,1001)ConvertToYV12().AssumeTFF().SelectEven() x264 --interlaced

59.94p to 720p: Directshowsource("",fps=59.94,audio=false).AssumeFPS(60000,1001)ConvertToYV12()

59.94i to 720p: Directshowsource("",fps=59.94,audio=false).AssumeFPS(60000,1001)ConvertToYV12().TDeint()

Common situations are in bold

mediainfo Scan type can determine 50i, 50p, 59.94i, 59.94p
avisynth plugins needed:TIVTC.dll, TDeint.dll, RePAL.dll

tivtc.dll's TFM.TDecimate could be replaced with decomb.dll's Telecide.Decimate. I've noticed tivtc handles a broader range of clips but decomb.dll handles some better then tivtc and vise versa.

TDeint could be replaced with other kernel deinterlacers like leakkerneldeint.dll or yadif.dll+avisynth_c.dll.

SmartDecimate.dll may be a better option in some cases. It would remove the need to use eac3to --changeto thus allowing untouched audio. But it doesn't compare to repal's quality when doing 29.97 -> 25 conversions.

TDeint(mode=1,full=false) is pretty good for frame doubling but may not be as good as some of these (http://forum.doom9.org/showthread.php?t=130332)

I wouldn't trust ConvertToFPS or (T)Decimate without a field matcher, since all they do is remove every fifth frame or whatever you set.

twazerty
18th July 2009, 11:50
Currently this is the way:
input: interlaced - output: interlaced
input: progressive - output: progressive.
For now no progressive --> interlaced possibility's (And also no interlaced --> progressive)

When input fps equals fps output is always the same script. That script I already have and it works perfectly.

So you only gave 1 useable script??
29.97p to 23.976p (1080p/720p): Directshowsource("",fps=29.97,audio=false).AssumeFPS(30000,1001).ConvertToYV12().TFM().TDecimate()

I compared it with ConvertFPS(23.976)
And I am not happy with the result of your script because it stutters and ConvertFPS(23.976) is much smoother. I prefer smoother video. Maybe I can add a field matcher to ConvertFPS to make it more reliable?

These I already have in use:
Directshowsource("",fps=59.94,audio=false).AssumeFPS(60000,1001).ConvertToYV12()
etc

turbojet
18th July 2009, 16:17
A field matcher probably wouldn't do any good and possibly harm in front of ConvertFPS. To work correcly, TFM communicates with TDecimate. Telecide communicates with Decimate.

I was wrong with ConvertFPS deleting every fifth frame, it's ChangeFPS that does it. ConvertFPS works by blending fields which if run on a hard telecine source 2 of 5 frames will have motion blur.

What it sounds like is the source you are working with shouldn't be ivtc'd to 23.976 and your eyes prefer motion blur over deleted frames. If you provide a link to a short sample someone can see what's going on.

twazerty
18th July 2009, 17:11
A field matcher probably wouldn't do any good and possibly harm in front of ConvertFPS. To work correcly, TFM communicates with TDecimate. Telecide communicates with Decimate.

I was wrong with ConvertFPS deleting every fifth frame, it's ChangeFPS that does it. ConvertFPS works by blending fields which if run on a hard telecine source 2 of 5 frames will have motion blur.

What it sounds like is the source you are working with shouldn't be ivtc'd to 23.976 and your eyes prefer motion blur over deleted frames. If you provide a link to a short sample someone can see what's going on.

I need solutions that work with every input file. With MediaInfo I can't detect if it is telecine or normal file? Only Progressive/Interlaced scantype. But if I can detect telecine files I can use those methods you described. I found info on a website and for lower fps (<=30fps) they use ConvertFPS and for higher values (>=50fps) they use ChangeFPS for conversions to 23.976.

twazerty
19th July 2009, 19:51
With my alpha versions I encountered undersizing problems. Does anyone have undersizing problems for DVD9? If the output is 7,92GB + then there is no undersizing problem. But if they become somewhere around 7,60-7,90GB you have the undersizing problem. I am trying to track down the problem but is very hard to find.

I suspect x264/ AssumeFPS in Avisynth. Still testing.

setarip_old
19th July 2009, 21:38
@twazertyBut if they become somewhere around 7,60-7,90GB you have the undersizing problem.I'd suggest that you're too much of a perfectionist on this one. 7.6GB is about 95% disc usage - and yields perfectly acceptable results...

twazerty
19th July 2009, 21:58
@twazertyI'd suggest that you're too much of a perfectionist on this one. 7.6GB is about 95% disc usage - and yields perfectly acceptable results...

Previous versions always were 7.92-7.94 GB. Also changed the Blu-ray disc size to the correct size and there is 1GB undersizing. I expect for DVD5 a undersizing of 70 to 150MB. I can't live with this undersizing. The formulas I have achieve a 99.3%+ disc usage.

setarip_old
20th July 2009, 02:06
The formulas I have achieve a 99.3%+ disc usageImpressive though that may be, doing so runs the risk of poor outer edge reading/playback ability regarding either lower quality media or lower quality/poorer condition playback units...

twazerty
20th July 2009, 13:44
Impressive though that may be, doing so runs the risk of poor outer edge reading/playback ability regarding either lower quality media or lower quality/poorer condition playback units...

the assumeFPS option is not the problem. Trying to find what is wrong. I am running into a problem with x264. The last 5-6 builds of x264 doesn't accept this commandline:
x264.exe --pass 1 --bitrate 7891 --stats "d:\file.stats" --level 4.1 --keyint 24 --min-keyint 2 --bframes 3 --weightb --direct auto --subme 2 --partitions none --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 24000 --vbv-maxrate 24000 --qcomp 0.5 --me dia --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output NUL "d:\input.avs"

I get this error:
unknown option -- progress

When I remove --progress I get:
unknown option -- no-psnr

Very strange. Don't know why it doesn't work. With r1170 it is still working. But on later builds I get x264 errors.

laserfan
20th July 2009, 14:21
You need to study-up on the new defaults maybe. At least --no-psnr and --no-ssim are now defaults, and thus these options no longer exist (iirc, I haven't tried the new version yet).

twazerty
20th July 2009, 16:21
You need to study-up on the new defaults maybe. At least --no-psnr and --no-ssim are now defaults, and thus these options no longer exist (iirc, I haven't tried the new version yet).

You're correct. After removing --progress --no-psnr --no-ssim it works.

turbojet
21st July 2009, 20:12
I need solutions that work with every input file. With MediaInfo I can't detect if it is telecine or normal file? Only Progressive/Interlaced scantype. But if I can detect telecine files I can use those methods you described. I found info on a website and for lower fps (<=30fps) they use ConvertFPS and for higher values (>=50fps) they use ChangeFPS for conversions to 23.976.

No mediainfo can't tell if it needs ivtc or not. AutoGK and MeGUI have complex algorithm that tries to determine if it needs it or not, but they aren't always correct. Best is an option for the more advanced users. Depeding on the situation changefps and convertfps work ok but not when it comes to ivtc, see this hard telecined trailer: tivtc vs changefps vs convertfps (http://www.mediafire.com/download.php?mjwwwmjklzv)

With my alpha versions I encountered undersizing problems. Does anyone have undersizing problems for DVD9? If the output is 7,92GB + then there is no undersizing problem. But if they become somewhere around 7,60-7,90GB you have the undersizing problem. I am trying to track down the problem but is very hard to find.

I suspect x264/ AssumeFPS in Avisynth. Still testing.

On a few tests x264 1184 comes within 5 kbps of what I put for bitrate.

twazerty
21st July 2009, 20:37
No mediainfo can't tell if it needs ivtc or not. AutoGK and MeGUI have complex algorithm that tries to determine if it needs it or not, but they aren't always correct. Best is an option for the more advanced users. Depeding on the situation changefps and convertfps work ok but not when it comes to ivtc, see this hard telecined trailer: tivtc vs changefps vs convertfps (http://www.mediafire.com/download.php?mjwwwmjklzv)



On a few tests x264 1184 comes within 5 kbps of what I put for bitrate.

I am tracking the x264 problem. Takes some days before I know the problem. After that I am going to determine which x264 revisions are causing the problem. An advanced option. Great idea.

I am informed that the latest version of BDRebuilder also creates undersized discs. (20.8 instead op 23.3GB)

turbojet
21st July 2009, 21:41
I am tracking the x264 problem. Takes some days before I know the problem. After that I am going to determine which x264 revisions are causing the problem. An advanced option. Great idea.

Are you checking the resulting m2ts with mediainfo to see what the actual average bitrate is and what was passed to x264?

If they are really close it's not an x264 issue but an AVCHDcoder issue.

I am informed that the latest version of BDRebuilder also creates undersized discs. (20.8 instead op 23.3GB)

Pretty common, I've never seen BD-Rebuilder come within 100 MB of the target size. Plus x264 --bitrate 25000 max with BD25 target size set means anything less than ~2 hours is going to be significantly undersized.

Have you given any more thoughts on using an override file or adding some advanced x264 settings (--psy-rd most importantly) to the gui, dts encoding, and BDSup2Sub? I'm still waiting for these before using AVCHDcoder outside of testing. It'll be nice when I can since RipBot264 takes ~30 minutes and ~30 more mouse clicks to setup an encode while AVCHDcoder takes maybe 2 minutes.

Also considering the app is java have you considered making it multi-platform by using things like mencoder instead of avisynth+x264 on linux/mac?

twazerty
21st July 2009, 21:57
Are you checking the resulting m2ts with mediainfo to see what the actual average bitrate is and what was passed to x264?

If they are really close it's not an x264 issue but an AVCHDcoder issue.



Pretty common, I've never seen BD-Rebuilder come within 100 MB of the target size. Plus x264 --bitrate 25000 max with BD25 target size set means anything less than ~2 hours is going to be significantly undersized.

Have you given any more thoughts on using an override file or adding some advanced x264 settings (--psy-rd most importantly) to the gui, dts encoding, and BDSup2Sub? I'm still waiting for these before using AVCHDcoder outside of testing. It'll be nice when I can since RipBot264 takes ~30 minutes and ~30 more mouse clicks to setup an encode while AVCHDcoder takes maybe 2 minutes.

Also considering the app is java have you considered making it multi-platform by using things like mencoder instead of avisynth+x264 on linux/mac?

No I am compairing the raw h264 files sizes. In the old x264 the files are correct but in later versions of x264 the files are far to small.
I have some alpha testers and one of them always uses BDRebuilder with Custom output. For him the Custom output alsways worked! and now he has undersizing problems.

Now I am testing without AVCHDCoder. I am testing with x264 via commandline. I test the situation it was in old versions in AVCHDCoder and I make the same changes step by step until I find the problem. After that I am going to track down since which version the error occurs. I tested some things and now I am making avisynth changes 1 by 1. The x264 commandline settings are not the problem. I suspect avisynth settings. Currently I am compairing:
DirectShowsource("input.mkv",fps=23.9759856527702,audio=false)
addborders(0,0,0,0)
LanczosResize(1920,1080) #Lanczos(Sharp)

with:

DirectShowsource("input.mkv",fps=23.976,audio=false)
addborders(0,0,0,0)
LanczosResize(1920,1080) #Lanczos(Sharp)

if output is to small I tracked down the problem. If output is ok I will test:

DirectShowsource("input.mkv",fps=23.976,audio=false)
assumeFPS(24000,1001)
addborders(0,0,0,0)
LanczosResize(1920,1080) #Lanczos(Sharp)

and so on until I found the problem.

I don't have plans to make it multi platform. And if I make it multi platform it will be Linux only because I don't have a Mac and I don't like a Mac.
Not everything I have written is multi-platform compatible. There are things that are Windows only.

I like your requests but they won't be added to next version. First I release it. Wait some days to release a fast fix if necessary and then I add more features.

Atak_Snajpera
22nd July 2009, 06:57
Yesterday I encoded Blu-ray Son of Rambow to 720p AVCHD in ripbot264 with latest x264 r1184

F:\>"C:\Users\Dawidos\Documents\Delphi_Projects\RipBot264\tools\x264\x264_x86.exe" "F:\temp\RipBot264temp\job5\job5.avs" --pass 2 --bitrate 5537 --stats "F:\temp\RipBot264temp\job5\job5.stats" --fps 24000/1001 --min-keyint 24 --keyint 240 --sar 1:1 --level 4.0 --aud --nal-hrd --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3 --b-adapt 1 --direct auto --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh --output "F:\temp\RipBot264temp\video.264"

avis [info]: 1280x720 @ 23.98 fps (137425 frames)

x264 [info]: using SAR=1/1

x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 Slow_mod4_stack

x264 [info]: profile High, level 4.0

x264 [info]: slice I:1155 Avg QP:14.77 size:105379

x264 [info]: slice P:53161 Avg QP:17.86 size: 45203

x264 [info]: slice B:83109 Avg QP:19.31 size: 17349

x264 [info]: consecutive B-frames: 6.8% 29.9% 16.9% 46.3%

x264 [info]: mb I I16..4: 22.7% 59.2% 18.2%

x264 [info]: mb P I16..4: 0.9% 9.4% 1.6% P16..4: 26.7% 18.7% 13.9% 0.7% 0.9% skip:27.2%

x264 [info]: mb B I16..4: 0.1% 1.0% 0.2% B16..8: 35.1% 2.5% 4.5% direct: 7.5% skip:49.1% L0:38.3% L1:42.9% BI:18.8%

x264 [info]: 8x8 transform intra:76.1% inter:51.2%

x264 [info]: direct mvs spatial:85.5% temporal:14.5%

x264 [info]: coded y,uvDC,uvAC intra:87.7% 87.2% 66.6% inter:33.5% 33.9% 6.4%

x264 [info]: ref P L0 67.7% 18.4% 14.0%

x264 [info]: ref B L0 79.7% 20.3%

x264 [info]: kb/s:5536.3



encoded 137425 frames, 17.89 fps, 5536.44 kb/s

As you can see final bitrate was almost perfect and final size was almost perfect as well. 4475 MB (target 4480MB)

twazerty
22nd July 2009, 11:29
Yesterday I encoded Blu-ray Son of Rambow to 720p AVCHD in ripbot264 with latest x264 r1184

As you can see final bitrate was almost perfect and final size was almost perfect as well. 4475 MB (target 4480MB)

Yes I know it works ok but see this:
AVCHDCoder 3.08 (100% sure it works perfect):
DVD9 with DTS. Output: 7.94GB

This perfect bitrate is achieved with my formulas. Over the months the formula hasn't changed. I changed the x264 version and the avisynth script. In my latests internal alpha versions this is the output: 7.77GB. The bitrate is calculated properly. The way a movie is encoded is still the same. Only another avisynth script and another revision of x264.

Somebody I know always uses Custom output with BDRebuilder. He always gets an output of 23GB+ but suddenly he gets a file of 20GB. That is with revision r1173. From r1170+ I get undersizing problems.

Just need to check a couple of things like using r1140 in my latest alpha version. I expect the output will be correct.

Atak_Snajpera
22nd July 2009, 22:27
You must check logs. That's all.

twazerty
23rd July 2009, 00:41
You must check logs. That's all.

That is what I am doing right now :)
I also noticed this:
Mediainfo says: bitrate is 6762 but the actual file was to small when you calculate the filesize.(5.98GB instead of 6.07GB)

I think I found the problem but I am not sure for now. I post it when I am sure. It is this avisynth script:
DirectShowsource("input.mkv",fps=23.976,audio=false)
AssumeFPS(24000,1001)
ConvertToYV12()
addborders(0,0,0,0)
LanczosResize(1920,1080) #Lanczos(Sharp)

vs:

DirectShowsource("input.mkv",fps=23.976,audio=false).AssumeFPS(24000,1001).ConvertToYV12().addborders(0,0,0,0)

I post the logs when I am ready. 6.07GB is the output of the first script and 5.98GB is the output of the second script. (I am checking it now. I post the log when it is actually the problem)

twazerty
23rd July 2009, 02:41
Got the log from x264. This script causes the undersizing problem:

DirectShowsource("F:\input.mkv",fps=23.976,audio=false).AssumeFPS(24000,1001).ConvertToYV12().addborders(0,0,0,0)

Pass 1:
"x264.exe" --pass 1 --bitrate 6762 --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --bframes 3 --weightb --direct auto --subme 2 --partitions none --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 9000 --vbv-maxrate 24000 --me dia --threads auto --thread-input --sar 1:1 --output NUL "F:\input.avs"
avis [info]: 1920x1080 @ 23.98 fps (185013 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:10027 Avg QP:17.43 size: 80465
x264 [info]: slice P:87175 Avg QP:19.87 size: 44263
x264 [info]: slice B:87811 Avg QP:21.22 size: 20026
x264 [info]: consecutive B-frames: 18.5% 40.7% 9.5% 31.3%
x264 [info]: mb I I16..4: 68.8% 0.0% 31.2%
x264 [info]: mb P I16..4: 33.2% 0.0% 0.0% P16..4: 35.0% 0.0% 0.0% 0.0% 0.0% skip:31.8%
x264 [info]: mb B I16..4: 6.5% 0.0% 0.0% B16..8: 25.7% 0.0% 0.0% direct:15.2% skip:52.7% L0:36.4% L1:48.3% BI:15.3%
x264 [info]: final ratefactor: 23.30
x264 [info]: direct mvs spatial:97.6% temporal:2.4%
x264 [info]: coded y,uvDC,uvAC intra:56.7% 61.8% 21.9% inter:14.1% 18.3% 0.5%
x264 [info]: kb/s:6659.8

encoded 185013 frames, 38.18 fps, 6660.96 kb/s


Pass 2:
"x264.exe" --bitrate 6762 --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --ref 3 --mixed-refs --no-fast-pskip --bframes 3 --weightb --direct auto --subme 7 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 9000 --vbv-maxrate 24000 --me umh --threads auto --thread-input --sar 1:1 --output "F:\output.264" "F:\input.avs"
avis [info]: 1920x1080 @ 23.98 fps (185013 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.1
x264 [info]: slice I:9930 Avg QP:18.32 size: 75692
x264 [info]: slice P:86099 Avg QP:21.02 size: 45398
x264 [info]: slice B:88984 Avg QP:22.44 size: 19853
x264 [info]: consecutive B-frames: 17.5% 41.1% 9.4% 31.9%
x264 [info]: mb I I16..4: 28.0% 63.8% 8.2%
x264 [info]: mb P I16..4: 2.7% 13.3% 0.5% P16..4: 39.1% 8.6% 6.9% 0.0% 0.0% skip:29.0%
x264 [info]: mb B I16..4: 0.2% 1.8% 0.1% B16..8: 39.0% 0.6% 1.0% direct: 3.5% skip:53.8% L0:40.2% L1:56.0% BI: 3.8%
x264 [info]: final ratefactor: 24.29
x264 [info]: 8x8 transform intra:74.6% inter:81.1%
x264 [info]: direct mvs spatial:99.7% temporal:0.3%
x264 [info]: coded y,uvDC,uvAC intra:63.9% 68.3% 32.2% inter:19.6% 25.7% 1.1%
x264 [info]: ref P L0 71.1% 18.5% 10.4%
x264 [info]: ref B L0 84.4% 15.6%
x264 [info]: kb/s:6663.1

encoded 185013 frames, 12.75 fps, 6664.15 kb/s

Mediainfo:
File size : 5.99 GiB
Bit rate : 6 762 Kbps





And this avisynth script creates a correct output file:
DirectShowsource("F:\input.mkv",fps=23.976,audio=false)
AssumeFPS(24000,1001)
ConvertToYV12()
addborders(0,0,0,0)
LanczosResize(1920,1080) #Lanczos(Sharp)

Pass 1:

"x264.exe" --pass 1 --bitrate 6762 --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --bframes 3 --weightb --direct auto --subme 2 --partitions none --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 24000 --vbv-maxrate 24000 --qcomp 0.5 --me dia --threads auto --thread-input --sar 1:1 --output NUL "F:\input.avs"
avis [info]: 1920x1080 @ 23.98 fps (185013 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:10027 Avg QP:17.42 size: 80804
x264 [info]: slice P:87175 Avg QP:19.85 size: 44426
x264 [info]: slice B:87811 Avg QP:21.26 size: 19863
x264 [info]: consecutive B-frames: 18.5% 40.7% 9.5% 31.3%
x264 [info]: mb I I16..4: 68.8% 0.0% 31.2%
x264 [info]: mb P I16..4: 33.3% 0.0% 0.0% P16..4: 35.0% 0.0% 0.0% 0.0% 0.0% skip:31.8%
x264 [info]: mb B I16..4: 6.5% 0.0% 0.0% B16..8: 25.5% 0.0% 0.0% direct:15.1% skip:52.9% L0:36.4% L1:48.4% BI:15.2%
x264 [info]: final ratefactor: 23.36
x264 [info]: direct mvs spatial:97.7% temporal:2.3%
x264 [info]: coded y,uvDC,uvAC intra:57.0% 61.8% 22.4% inter:14.1% 18.3% 0.5%
x264 [info]: kb/s:6663.3

encoded 185013 frames, 37.70 fps, 6664.41 kb/s

Pass 2:

"x264.exe" --pass 2 --bitrate 6762 --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --ref 3 --mixed-refs --no-fast-pskip --bframes 3 --weightb --direct auto --subme 7 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 9000 --vbv-maxrate 24000 --me umh --threads auto --thread-input --sar 1:1 --output "F:\output.h264" "F:\input.avs"
avis [info]: 1920x1080 @ 23.98 fps (185013 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.1
x264 [info]: slice I:10027 Avg QP:18.11 size: 76472
x264 [info]: slice P:87175 Avg QP:21.11 size: 42148
x264 [info]: slice B:87811 Avg QP:21.53 size: 23699
x264 [info]: consecutive B-frames: 18.5% 40.7% 9.5% 31.3%
x264 [info]: mb I I16..4: 28.0% 63.7% 8.3%
x264 [info]: mb P I16..4: 2.8% 11.6% 0.5% P16..4: 40.0% 8.8% 7.2% 0.0% 0.0% skip:29.1%
x264 [info]: mb B I16..4: 0.2% 1.9% 0.1% B16..8: 40.4% 0.8% 1.4% direct: 4.2% skip:50.9% L0:41.0% L1:54.0% BI: 5.0%
x264 [info]: 8x8 transform intra:73.0% inter:80.0%
x264 [info]: direct mvs spatial:88.0% temporal:12.0%
x264 [info]: coded y,uvDC,uvAC intra:62.0% 66.8% 29.1% inter:21.4% 27.8% 1.0%
x264 [info]: ref P L0 71.0% 18.5% 10.5%
x264 [info]: ref B L0 83.7% 16.3%
x264 [info]: kb/s:6761.6

encoded 185013 frames, 14.02 fps, 6762.65 kb/s

Mediainfo:
File size : 6.07 GiB
Bit rate : 6 762 Kbps

This happens with r1184 of x264. Next I'll test to see if older version also have this problem.

turbojet
23rd July 2009, 05:16
Both avs outputs are exact as long as the resolution is 1920x1080, which it is in this case.

I/P/B frame count are different between passes on the first encode. My guesses are either a different stats file got in the way in the first encode or --vbv-bufsize 9000 disagreed with --qcomp 0.5 --qpstep 4 and it wanted to use more than 9000 kbps between one frame and another at times but couldn't. --vbv-bufsize 24000 in the first pass of the second encode allowed --qcomp 0.5 --qpstep to act normal.

Is there some reason you are changing --qcomp --vbv-bufsize between passes?

Also the command line can be cleaned up a lot with the latest x264 versions, these are comparable to the latest AVCHDcoder lines:

"x264.exe" --pass 1 --bitrate 6762 --output NUL "F:\input.avs" --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 24000 --vbv-maxrate 24000
"x264.exe" --pass 2 --bitrate 6762 --output "F:\output.264" "F:\input.avs" --stats "F:\input.stats" --level 4.1 --keyint 24 --min-keyint 2 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 24000 --vbv-maxrate 24000 --me umh

twazerty
23rd July 2009, 10:57
By accident I used the wrong first pass where the output is ok.

I'll redo the second one with exactly the same settings as the first which is incorrect.

I'll redo both test because I also saw another mistake.

twazerty
28th July 2009, 18:13
Somehow I forgot --pass 2 in the commandline. Sometimes the output was oversized. Sometimes it was correct and mostly it was undersized. But it is fixed now and that is why I released the new version of AVCHDCoder yesterday.

Beta v09.07.26

***Settings are lost. Reconfigure them in settings Tab***
Fixed - Language was not shown for all m2ts files
Fixed - back/forward slash problem ( / and \ )
Fixed - When output is 720p and subtitles are srt or ass the subtitles have the 1080p sizes.
Fixed - Better audio detection
Fixed - Inconsistent videocodec names (VC-1 and WVC1 for example)
Fixed - Missing AUXDATA folder (All Samsung Players need latest firmware now !!!)
Fixed - Bitrate indication bar was not working properly.(Incorrect bitrate)
Fixed - When deleting last item from disc the bitrate was not calculated again.
Fixed - Resize function was inside avs file when it was not neccecary
Fixed - Conversion crashes when no fps was found in source. (will now be set to 23.976 if no fps was found)
Fixed - Chapter problem
Fixed - DTS-ES problem
Fixed - Incorrect BD25 and BD50 sizes caused undersizing. Now BD25 is set to 24.7GB and BD50 to 49.4GB
Upgraded - New Queue tab.
Upgraded - Error detection.
Added - Log function. (For now it will not be saved on harddrive, only in AVCHDCoder itself)
Added - Italian language
Added - Blu-ray folder input (Playlist detection via eac3to). Seamless Branching Discs are supported too.
Added - Framerate conversion.
Added - Donate button to the about screen
Added - Move items up or down
Added - Right mouse menu to queue. (Move Up/Down, Delete temp files and remove option)
Added - Chapters will be taken from source file and they will be shown at chapters tab
Added - AssumeFPS(24000,1001) if fps = 23.976, AssumeFPS(30000,1001) if fps = 29.97, AssumeFPS(60000,1001) if fps = 59.94
Added - ConvertToYV12()
Added - More stream information (Progressive/interlaced indication, number of channels, duration)
Added - WMA9 support
Added - Interlaced support (No conversion to progressive video yet)
Added - dut and nld points to Dutch, fra and fre points to French, ger and deu points to German for Language detection
Added - added languages to the language selection: Bulgarian, Czech, Danisch, Greek, Hungarian, Croatian, Romanian, Slovanian
Added - Shortcut to Open file. (Ctrl+O or File --> Open file...)
Added - Shortcut to Open folder. (Ctrl+Shift+O or File --> Open folder...)
Added - Shortcut to default output folder (Ctrl+U or Options --> Open default output folder)
Added - See bitrate before you added the item to the disc.
Added - Use DTSHD. Added formula. (Experimental)
Changed - Moved CPU priority to Options menu
Updated - x264.exe tot r1184

setarip_old
28th July 2009, 18:17
@twazertythat is why I released the new version of AVCHDCoder yesterday.
Beta v09.07.26I believe you've forgotten to update the link (In your first post to this thread) for this version...

twazerty
28th July 2009, 18:22
@twazertyI believe you've forgotten to update the link (In your first post to this thread) for this version...

Wasn't finished yet :)

setarip_old
28th July 2009, 18:33
Added - Blu-ray folder input (Playlist detection via eac3to). Seamless Branching Discs are supported too.Does this mean AVCHDCoder can now compress a full BluRay disc to a fully functional (menu, extras, etc.) DVD9 or DVD5?

twazerty
28th July 2009, 18:55
Does this mean AVCHDCoder can now compress a full BluRay disc to a fully functional (menu, extras, etc.) DVD9 or DVD5?

No. As you can see you select a playlist. It is almost the same as the movie only option in BDRebuilder. The selected playlist will be converted to DVD9/DVD5 or something else. The playlist can contain multiple files. They will be joined and converted.

setarip_old
28th July 2009, 19:28
Thanks for clarifying ;>}

BTW - Thanks for fixing the "/" versus "\"

wakebrder
29th July 2009, 19:33
Added - Use DTSHD. Added formula. (Experimental)

Does this mean you be able to keep DTS-HD / True-HD on a DVD9 in the future? :)

twazerty
29th July 2009, 20:50
Does this mean you be able to keep DTS-HD / True-HD on a DVD9 in the future? :)

TrueHD not yet. DTS-HD 3018 kbps, DTS and DTS-ES were already supported. Now all DTS formats can be used directly.

I had a problem because DTS-HD MA is VBR. My formulas only work for CBR formats. (AC3, DTS etc) So I create on the fly a new formula based on 2 other formulas. Now I hope it will work correctly. You can use it but I cannot guarantee the if it won't oversize.

wakebrder
30th July 2009, 13:35
TrueHD not yet. DTS-HD 3018 kbps, DTS and DTS-ES were already supported. Now all DTS formats can be used directly.

I had a problem because DTS-HD MA is VBR. My formulas only work for CBR formats. (AC3, DTS etc) So I create on the fly a new formula based on 2 other formulas. Now I hope it will work correctly. You can use it but I cannot guarantee the if it won't oversize.

Atak had this same issue when trying to implement HD audio into Ripbot. So it now has the option to convert HD audio to FLAC.

Thank you for your efforts. I will give it a try.:thanks:

twazerty
30th July 2009, 23:44
Atak had this same issue when trying to implement HD audio into Ripbot. So it now has the option to convert HD audio to FLAC.

Thank you for your efforts. I will give it a try.:thanks:

I never had issues on implementing HD audio. It was very easy actually. I added it couple of months ago but didn't had a solution for the overhead. I can use a fixed overhead but I don't like that.

wakebrder
31st July 2009, 12:36
I never had issues on implementing HD audio. It was very easy actually. I added it couple of months ago but didn't had a solution for the overhead. I can use a fixed overhead but I don't like that.

I was referring to the bitrate issue. Difficult to predict output size when dealing with VBR.

Keep up the good work, hopefully True-HD will follow.

twazerty
1st August 2009, 01:15
True-HD will follow. Maybe next release or maybe not :)

Looks like there are no big bugs introduced in the new version so I am ready to add new features and improve features.

I think the next thing on the list will be:
-BDSup2Sup implementation.
-MP4 input
-Second audio track. (Not all formats just a couple of them: DTS/DTS, DTS/DTS-ES, DTS/AC3 640, DTS/AC3 448, DTS-ES/DTS-ES, DTS-ES/AC3 640, DTS-ES/AC3 448, AC3 640/AC3 640, AC3 640/AC3 448, AC3 448/AC3 448)

turbojet
1st August 2009, 08:49
Thanks for the new build, BD input is working great for me so far 3 things I've noticed with it:

- AssumeFPS isn't added to avs scripts
- default ISO or file output setting is missing, I found it useful in earlier versions
- no FPS display, intended?

twazerty
1st August 2009, 10:33
Thanks for the new build, BD input is working great for me so far 3 things I've noticed with it:

- AssumeFPS isn't added to avs scripts
- default ISO or file output setting is missing, I found it useful in earlier versions
- no FPS display, intended?


Your correct. AssumeFPS isn't added when input is Blu-ray folder. For m2ts, mkv and wmv assumeFPS is added.

Default iso or output is still there: Settings-->Output-->Default output type

FPS display when encoding is not added yet.