Log in

View Full Version : "Avatar" movie and x264 error


Amefurashi
29th April 2010, 08:56
Hello,
I hope this has not been discussed yet; search engine didn't return any useful record.
I bought my BRD copy of "Avatar" yesterday and slipped it into my Blu-Ray unit. AnyDVD got me an error message, so I downloaded the latest beta from Slysoft's forums (6.6.3.8). Anything went fine, or at least it seemed so...

Summary for drive F: (AnyDVD 6.6.3.8)
HL-DT-ST BDDVDRW GGC-H20L 1.03 4105150817883L3535
Drive (Hardware) Region: 2

Media is a Blu-Ray disc.

Total size: 24438784 sectors (47732 MBytes)
Video Blu-ray label: RED_BIRD_2D_F2
Media is AACS protected!
Media is BD+ protected!
AACS MKB version 16
Using BDPHash.bin 10-04-26-B
Removed AACS copy protection!
Removed BD+ copy protection!
Note: automatic detection of region code not possible with this disc.
Blu-ray Java signatures fixed!
BD-Live deactivated!
Java BD+ runtime removed!

My goal is to obtain a 720p stream to feed into my WDTV Live player. The problem is the x264 encoding stops at 94.9% of the first pass with this error:

D:\RED_BIRD_2D_F2\RIP>x264.exe --pass 1 --bitrate 6043 --stats "avat1.stats" --lev
el 4.1 --keyint 240 --min-keyint 24 --ref 5 --mixed-refs --bframes 5 --b-pyramid
normal --b-adapt 2 --weightb --weightp 2 --direct auto --deblock -2:-1 --subme
10 --trellis 2 --psy-rd 1.0:0 --partitions all --8x8dct --vbv-bufsize 50000 --vb
v-maxrate 50000 --me umh --merange 32 --threads auto --thread-input --aq-strengt
h 1.0 --no-dct-decimate --rc-lookahead 60 --output NUL avatar.avs
avs [info]: 1280x720p 0:0 @ 24000/1001 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile Main, level 4.1
[94.9%] 220760/232606 frames, 14.79 fps, 6037.15 kb/s, eta 0:13:21
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

D:\RED_BIRD_2D_F2\RIP>pause

Build is rev1564, but I don't think it matters. Any other BD I own works just fine with x264; in fact this it the first time I run in an error like this.
Could it be that the decrypting is in some way "flawed"?

Thanks for your help,

Amefurashi :)

Wishbringer
29th April 2010, 10:37
Overclocked System?
What OS, how much memory, what build of x264 (core2, amd, generic)?
Here went all flawless.

Amefurashi
29th April 2010, 10:54
Overclocked System?
What OS, how much memory, what build of x264 (core2, amd, generic)?
Here went all flawless.

No OC, Win7 x64, 4Gb RAM, rev1564 generic (downloaded from x264.nl).

Three friends of mine have the very same problem: x264 crashes at 94.9% of first pass. This has never happened before with other movies.

:confused:

Dark Shikari
29th April 2010, 11:16
Usually such a crash means a crash in the decoder. You can confirm if you get a crash log and check what dll the segfault occurred in.

Amefurashi
29th April 2010, 11:22
Usually such a crash means a crash in the decoder. You can confirm if you get a crash log and check what dll the segfault occurred in.

libavcodec.dll

:(

EDIT: just discovered that using the MEGui DGA Project Creator for the H264 stream results in an app freeze (while indexing via the original DGAVCindex GUI works).

Blue_MiSfit
29th April 2010, 20:48
Hmmm... perhaps skip DGAVCIndex and use a DirectShow decoder? I've had absolutely no issues using DSS2 with coreavc or ffdshow, though the latter may be problematic if you're having libavcodec issues. This shouldn't happen though, and I'm sure everyone would like to know what's causing the issues.

~MiSfit

setarip_old
30th April 2010, 00:36
@Amefurashi

Hi!

With AnyDVDHD running in the background, try simply copying the disc to your hard drive. I believe you'll see it fail.

Presently, all three significant "players" in the BluRay decryption arena (DVDFab, MakeMKV, AnyDVDHD) are still having all sorts of difficulty with the unbelievably complex and multiple protection schemes (including different schemes for different countries within the same region protection schemes!). Each of the three is at a different stage of success.

At this time, I'd suggest you try DVDFab (with AnyDVD turned COMPLETELY off)...

woah!
30th April 2010, 03:17
i have had no issue with a 1080p encode on my wdtv live, using DGAVCIndex and anydvd tools. x264 version i used is r1542

mine is RED_BIRD_2D_WW tho so maybe a bad rip was made.

Wishbringer
30th April 2010, 07:24
I used AnyDVD HD prior version 6.6.3.8 with Avatar (ripping to hdd)
and encoded with RipBot264 1.15.1 with x264 1564 (komisar-core2 kMod)
using one of the newer versions of ffdshow from xvidvideo.ru
to AVCHD DVD9.
No freezes, no errors.
Thats why I asked about OC and specs of pc.

SpaceNerd
30th April 2010, 07:58
Hi everyone,
I have the same problem (x264 crashes at frame 220823, ripped Avatar with AnyDVD 6.6.3.7 beta). Weird thing is that I can watch the ripped M2TS file without problems. However, if I import the demuxed H264 (resp. the DGA file from DGAVCIndex) into StaxRip, I can see the pixelation/error in the preview. I'll try using DirectShowSource instead of AVCSource next. Maybe this will avoid the distortion? Any other tips?
Thanks!

Amefurashi
30th April 2010, 12:35
Issue resolved by remuxing the raw H264 stream into an MKV and indexing it with FFMSIndex. Don't really know why DGAvcDec can't manage correctly this video. Thanks for your kind help everyone :)

aegisofrime
30th April 2010, 13:39
I have also had problems with getting DGAVCIndex to properly index some new Blu-Ray videos. Supposedly DGNVTools, being newer, is able to do it. FFMSIndex is good, but gives me audio sync problems :(

Santa
30th April 2010, 18:03
I'm doing a test with Avatar Bluray.
Mine is the Italian version of Avatar, I don't know if it is the same you are talking about.

this is my avisynth script:


DirectShowSource("E:\avatar\T2_Video - .mkv", fps=23.976, audio=false, convertfps=true)
ConvertToYV12()


where T2_Video - .mkv is the video stream demuxed with HD Stream Extractor (MeGUI).

and this is my command line for x264 (I use MeGUI)

program --level 4.1 --pass 2 --bitrate 11884 --stats ".stats" --threads 6 --deblock -3:-3 --keyint 24 --min-keyint 2 --b-pyramid strict --ref 4 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 24000 --me umh --partitions all --no-fast-pskip --output "output" "input"

MeGUI (x264 to be accurate) complete with no errors the first pass.
At a certain point, while completing the second pass, x264 crashes.
It happens not always at the same frame (it happened at frame 107940, at frame 105xxx and something like that...).

here is the windows log for this error:

Nome dell'applicazione che ha generato l'errore: x264_64.exe, versione: 0.0.0.0, timestamp: 0x4bd3232b
Nome del modulo che ha generato l'errore: x264_64.exe, versione: 0.0.0.0, timestamp: 0x4bd3232b
Codice eccezione: 0xc0000005
Offset errore 0x0000000000670f47
ID processo che ha generato l'errore: 0xfb0
Ora di avvio dell'applicazione che ha generato l'errore: 0x01cae812a9a35348
Percorso dell'applicazione che ha generato l'errore: C:\Users\Santa\Desktop\megui\tools\x264\x264_64.exe
Percorso del modulo che ha generato l'errore: C:\Users\Santa\Desktop\megui\tools\x264\x264_64.exe
ID segnalazione: 6278c980-5478-11df-893b-0015af04b7e5

It is the only movie (till now) that gave me that strange problem.
Am I doing something wrong?

Guest
30th April 2010, 18:40
How did you rip the BD?

Santa
30th April 2010, 20:02
I can't exactly remember if I used dvdfab or anydvdhd.
one of these two software of course because i don't have other softwares installed on my pc... does it make difference?
the m2ts file plays correctly on my computer.

if you think one software works better than the other one, i can try to re-rip the movie with that software...

quantum5uicid3
30th April 2010, 21:12
generally speaking, using the ffms indexer is the least problematic way to work with progressive hd sources in megui.

mp3dom
1st May 2010, 13:28
According to many websites (like this (http://ramascreen.com/avatar-hits-blu-ray-dvd-on-earth-day-2010/)), the italian version of Avatar will be officially available on May 6th. However it could be that some european releases contains multiple languages (hence italians too). Maybe it's an imported BD... :confused:

Santa
1st May 2010, 19:11
it's the CEE version which contains Italian language and subtitles.
btw i'll try to re-rip the whole brd the next week to be sure the problem is not in the rip process.

SpaceNerd
3rd May 2010, 06:48
Issue resolved by remuxing the raw H264 stream into an MKV and indexing it with FFMSIndex. Don't really know why DGAvcDec can't manage correctly this video. Thanks for your kind help everyone :)

That did it! Thanks! :)

trevaaar
4th May 2010, 17:25
Here's what I get (ripped from an Aussie BD with AnyDVD 6.6.4.0):

AviSynth32+FFVideoSource: Outputs black frames after ~10542. Total framecount is off as well - every other method shows 232608, this gives 232606.
AviSynth32+AVCSource: Crash at frame 220823.
AviSynth32+DirectShowSource with a graph that just loads with Haali's splitter and decodes with ffdshow: Fine.
AviSynth64+FFVideoSource: fine.

Rumbah
5th May 2010, 09:44
New AnyDVD version is available with a fix for Avatar (at least it is mentioned in the changelog).

Santa
5th May 2010, 11:07
The solution I found is to use FFVideoSource instead of DirectShowSource.

BTW I have some questions, maybe I'll learn a better way to use x264...


I see a lot of artifacts on this encoding (and on other of course, but in this case the artifacts are much more perceptible).

I used a very simple avisynth script beacause the source quality is very high and I think it soesn't need any filter to increase the quality:

FFVideoSource("E:\avatar\T2_Video - .mkv")

My x264 command line (generated by MeGUI) is


program --level 4.1 --pass 2 --bitrate 9247 --stats ".stats" --threads 6 --deblock -3:-3 --ref 4 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 24000 --me umh --partitions all --no-fast-pskip --output "output" "input"


even if I set --deblock -3:-3 (which I think should be strong enough) I can see many macroblock on the movie: here are some screenshots

http://img23.imageshack.us/img23/8100/vlcsnap2010050511h51m11.png
http://img19.imageshack.us/img19/8075/vlcsnap2010050511h50m51.png


As you can see the purple area on the left of 20th century fox logo has an horrible artifact and in the other picture, the smoke is a group of artifacts (blocks and incorrect colors nuance)
and the movie if full of these artifacts.
The bitrate (9247 kbps) should be not so poor... I made other encoding at ~8000~9000 kbps and I got better results...

Someone can explain me why I get these artifacts and suggest how to let x264 do a good job on this (and obviously other) movies?


Thanks a lot.

Santa
5th May 2010, 22:22
well, what a better way to make some tests by myself...

I'm trying this mode:

program --level 4.1 --pass 2 --bitrate 9247 --stats ".stats" --threads 6 --deblock -4:-4 --ref 4 --merange 32 --me umh --partitions all --trellis 2 --no-fast-pskip --output "output" "input"

I set deblock -4:-4, a little stronger than before to adjust that macroblock issues.
I also set trellis 2 (loosing time but increasing averall quality - at least I hope so - ) and increased merange from 16 (default) to 32 again to prevent macroblock artifacts.
I eliminate slices and vbv maxrate and buffer because I red that they decrease encoding efficency and are required only to obtain BluRay compatibility, which I don't mind (in this case) to maintain.

I'm trying to encode 2 minutes of video, and will let you know (maybe some other newbe like me is reading this thread)

Santa
5th May 2010, 22:30
nothing to do, blocks are still there even if less visible than before.
I'll try with deblock -5:-5 and if it doesn't solve the problem I'll also try -6:-6

please let me know if you have any suggestion

Santa
5th May 2010, 23:13
well, with deblock -5:-5 still some little artifacts are displayed while with -6:-6 it seems to be ok.

I also tried to increase the bitrate from 9247 to 10247 and set the deblock parameters to -4:-4 but artifacts were still there.

So I decided to leave the bitrate value to 10247 but to use -6:-6 for the deblock option.

Now the command line looks like

program --level 4.1 --pass 2 --bitrate 10247 --stats ".stats" --threads 6 --deblock -6:-6 --ref 4 --merange 32 --me umh --partitions all --trellis 2 --no-fast-pskip --output "output" "input"

I know that deblock is better to be set from -3 to 3 range but setting it to -6:-6 is the only way I found to solve the blockiness issue.

Atak_Snajpera
5th May 2010, 23:23
http://forum.doom9.org/showthread.php?p=1396401#post1396401

Santa
6th May 2010, 07:34
http://forum.doom9.org/showthread.php?p=1396401#post1396401

so you suggest me to use 1 only encoding thread?
can you explain me why?

trevaaar
6th May 2010, 18:06
I think a decent 1080p encode of Avatar's going to need at least 12Mbps, the --crf 18 one I'm doing now's coming out at close to 14. That said, the slow, slower or veryslow presets may be at least a bit helpful.

kypec
6th May 2010, 19:05
so you suggest me to use 1 only encoding thread?
can you explain me why?
He's suggesting to use only 1 decoding thread if my eyes don't deceive me. Probably because the multithreaded decoding engine in ffdshow is broken for this Avatar source?

Atak_Snajpera
6th May 2010, 21:17
http://forum.doom9.org/showthread.php?p=1396407#post1396407

Santa
6th May 2010, 21:45
AviSynth64+FFVideoSource: fine.

I wasn't able to use FFVideoSource with AviSynth64.
How can I make it work with the 64bit version of AVS?




@Atak_Snajpera: I understood that you suggest me using 1 thread only for decoding the video, but since I'm using MeGUI and not ripbot, how can i set this 1 thread only option?

BigDid
6th May 2010, 21:59
...
@Atak_Snajpera: I understood that you suggest me using 1 thread only for decoding the video, but since I'm using MeGUI and not ripbot, how can i set this 1 thread only option?
Hi,

Cause neither Megui or Ripbot are involved.
It concerns FFDshow decoder configuration, to be used by any player using FFDSHOW for decoding :rolleyes:

Have a closer look at the screenshot from:
http://forum.doom9.org/showthread.php?p=1396401#post1396401

To be found (for windows) in:
all programs - Ffdswhow - video decoding configuration - decoder options ...

Did

Santa
6th May 2010, 22:04
ok, thanks... i'm so stupid -_-''

;)

now i just have to find out how to make ffvideosource work with avisynth64

edit: find out how to make it work: http://forum.doom9.org/showpost.php?p=1368311&postcount=2938

Santa
6th May 2010, 23:49
OK, let me say 1 thing:
I was using VLC to play the encoded movie, which don't use ffdshow (or at least I think so since I didn't have it installed on my pc).
So the macroblock issue I found on the video was not due to an incorrect decoding.

In fact the same video, encoded with --deblock -6:-6 doesn't have these issues.
Now I tryed a -3:-3 deblock setting with 13000 bitrate and the encoded movie looks great but I wan't to try some other settings with a lower bitrate, because I can't believe that with a bitrate value of 9000~10000 kbps a movie cannot be encoded with a good quality...

BigDid
7th May 2010, 00:42
...
In fact the same video, encoded with --deblock -6:-6 doesn't have these issues.
Now I tryed a -3:-3 deblock setting with 13000 bitrate and the encoded movie looks great but I wan't to try some other settings with a lower bitrate, because I can't believe that with a bitrate value of 9000~10000 kbps a movie cannot be encoded with a good quality...
Hi again,

Concerning deblocking, negative values will decrease inloop deblocking; increasing (towards positive) values will increase deblocking (and denoising). See:
- X264 options explained (for handbrake):
http://trac.handbrake.fr/wiki/x264Options
- 2 FAQ on the subject:
http://komisar.gin.by/x264info.html
- Discussion on parameters here in doom9:
http://forum.doom9.org/showthread.php?p=810932#post810932

Concerning encoding parameters for Avatar, try 1 pass CRF:
- Post from Atak using CRF22
http://forum.doom9.org/showthread.php?p=1397683#post1397683
- Not having the BD (coming soon) but I also used CRF22 +pre-filtering on the DVD source giving a bitrate of 2000kbp/s and a good quality encoding.

So I also believe that lower bitrate will still give good results.

Did

Santa
7th May 2010, 00:58
thank you did, all your links were very useful

Atak_Snajpera
7th May 2010, 12:35
1280x720 CRF22 average bitrate ~3.6Mbps
http://img248.imageshack.us/img248/9342/avatarmkvsnapshot000551.png (http://img248.imageshack.us/i/avatarmkvsnapshot000551.png/)

trevaaar
7th May 2010, 15:36
Turns out AviSynth64+FFVideoSource isn't working properly either - it's dropping the first 24 frames and then glitching for the next ten or so. Why would ffdshow (libavcodec) decode fine while FFMS2 can't?