Log in

View Full Version : Unable to convert avatar br to mp4 (h264)


dialsc
9th May 2010, 13:13
hi there,

i'm facing the problem that every time - i tried a lot ;) - i convert the avatar bdRip to a mp4 (h264) using megui, it stops with an error at time 2:33:30.

i tried to encode from the raw h264 as well as from a ts file i created using txMuxerGUI.

so far i used the profile x264: BluRay - Very High Quality as well as other hig quality profiles.

every time i try to encode the movi meGui reports an error after exactly 2:33:30. here's the whole log of the job:

[Information] Log for job25 (video, avater_track_00002.avs -> avater_track_00002.mp4)
-[Information] [09.05.2010 00:13:10] Started handling job
-[Information] [09.05.2010 00:13:10] Preprocessing
-[NoImage] Job commandline: "C:\Program Files (x86)\megui\tools\x264\vfw4x264.exe" --crf 18.5 --profile high --level 4.1 --bframes 3 --ref 4 --slices 4 --aud --nal-hrd vbr --b-pyramid strict --keyint 24 --min-keyint 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --sar 1:1 --output "D:\tmp\tsmuxer\avater_new\avater_track_00002.mp4" "D:\tmp\tsmuxer\avater_new\avater_track_00002.avs"
-[Information] [09.05.2010 00:13:10] Encoding started
-[NoImage] Standard output stream:
-[NoImage] Standard error stream
--[NoImage] yuv [info]: 1916x1076p 1:1 @ 24000/1001 fps (cfr)
--[NoImage] x264 [info]: using SAR=1/1
--[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
--[NoImage] x264 [info]: profile High, level 4.1
--[NoImage] This application has requested the Runtime to terminate it in an unusual way.
--[NoImage] Please contact the application's support team for more information.
--[NoImage]
--[NoImage] x264 [info]: frame I:10597 Avg QP:17.00 size:228158
--[NoImage] x264 [info]: frame P:123636 Avg QP:20.28 size: 81505
--[NoImage] x264 [info]: frame B:86603 Avg QP:21.56 size: 28302
--[NoImage] x264 [info]: consecutive B-frames: 29.2% 42.2% 15.9% 12.7%
--[NoImage] x264 [info]: mb I I16..4: 4.1% 82.3% 13.6%
--[NoImage] x264 [info]: mb P I16..4: 1.1% 14.6% 2.2% P16..4: 43.3% 23.5% 10.1% 0.0% 0.0% skip: 5.2%
--[NoImage] x264 [info]: mb B I16..4: 0.1% 1.1% 0.3% B16..8: 49.1% 7.9% 1.7% direct: 5.2% skip:34.6% L0:38.7% L1:49.6% BI:11.7%
--[NoImage] x264 [info]: 8x8 transform intra:81.6% inter:71.2%
--[NoImage] x264 [info]: coded y,uvDC,uvAC intra: 88.1% 88.1% 58.2% inter: 42.5% 40.5% 4.0%
--[NoImage] x264 [info]: i16 v,h,dc,p: 19% 12% 5% 64%
--[NoImage] x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 15% 17% 7% 9% 9% 10% 9% 10%
--[NoImage] x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 15% 12% 6% 10% 9% 10% 6% 7%
--[NoImage] x264 [info]: i8c dc,h,v,p: 48% 20% 20% 11%
--[NoImage] x264 [info]: Weighted P-Frames: Y:2.1%
--[NoImage] x264 [info]: ref P L0: 69.2% 17.6% 9.7% 3.4% 0.1%
--[NoImage] x264 [info]: ref B L0: 93.9% 6.1%
--[NoImage] x264 [info]: ref B L1: 97.4% 2.6%
--[NoImage] x264 [info]: kb/s:12981.20
--[NoImage] encoded 220836 frames, 10.68 fps, 12981.20 kb/s
-[Information] [09.05.2010 05:57:53] Job completed

any idea what the problem could be or how i could succeed in encoding this movi using any other technic?

thx,
greez,

dialsc

Inspector.Gadget
9th May 2010, 16:30
Post your Avisynth script.

dialsc
9th May 2010, 18:41
LoadPlugin("C:\Program Files (x86)\megui\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\tmp\tsmuxer\avater_new\avater_track_00002.dga")
#deinterlace
crop( 2, 2, -2, -2)

#resize
#denoise

Inspector.Gadget
9th May 2010, 19:13
Hmmm...AVCSource is pretty stable. How did you decrypt the disc?

horvathd
9th May 2010, 19:50
Did you already checked this topic "Avatar" movie and x264 error (http://forum.doom9.org/showthread.php?t=154274) ?

dialsc
9th May 2010, 20:04
Hmmm...AVCSource is pretty stable. How did you decrypt the disc?

using anydvd version 6.6.4.2 and txMuxerGUI i ripped the movie as a ts file to the disk. then i used DGIndex / DGAVCIndex from the meGui tools menu to create an index file which i then used to create the avisynth script in meGui.

Did you already checked this topic "Avatar" movie and x264 error (http://forum.doom9.org/showthread.php?t=154274) ?

yes, meanwhile i've found it, too. i tried the FFMSIndex option and it was able to finish the encoding. but upon enqueuing the encoding job in meGui it presents me the following warnings:

Your AviSynth clip has the following problem:
AviSynth clip is in I420 not in YV12, even though ConvertToYV12() has been appended.
Continue anyway?

i ignored the warning. is that okay? the result looks ok. i think it would also be interesting why it fails to encode the video to the end using DGIndex / DGAVCIndex.

Santa
10th May 2010, 00:29
yes, you can ignore that warning

rtjnyoface
10th May 2010, 14:47
Alright. After 8 hours now of wasted energy I have to post my log file as well. Like 98% into encoding x264 has stopped (twice now).
-Anydvd 6.6.4.2 final (decrypted fine)
-Tsmuxer to .ts file
-No issues decoding in dgavcindex
-No errors reported during the entire process

[Warning] Log
-[Information] Versions
--[NoImage] MeGUI Version : 0.3.4.13
--[NoImage] OS : Windows Seven Ultimate Edition x86 (6.1.0.7600)
--[NoImage] Latest .Net Framework installed : 3.5 SP1 (3.5.30729.4926)
--[NoImage] Avisynth Version : 2.5.8.5
-[Warning] Log for job1 (video, Avatar.avs -> )
--[Information] [5/10/2010 2:07:16 AM] Started handling job
--[Information] [5/10/2010 2:07:16 AM] Preprocessing
--[NoImage] Job commandline: "C:\Program Files\MeGui\tools\x264\x264.exe"

--preset slower --pass 1 --bitrate 3000 --stats "N:\movie.stats" --b-

pyramid none --ratetol 1.5 --merange 32 --sar 136:135 --output NUL "D:

\movie.avs"
--[Information] [5/10/2010 2:07:17 AM] Encoding started
--[NoImage] Standard output stream
--[Warning] Deleting aborted output
---[NoImage] Delete aborted ouptut set: True
---[NoImage] File to delete
---[Warning] Error deleting file
----[NoImage] Exception message: The path is not of a legal form.
----[NoImage] Stacktrace
-----[NoImage] at System.IO.Path.NormalizePathFast(String path, Boolean

fullCheck)
-----[NoImage] at System.IO.Path.NormalizePath(String path, Boolean

fullCheck)
-----[NoImage] at System.IO.Path.GetFullPathInternal(String path)
-----[NoImage] at System.IO.File.Delete(String path)
-----[NoImage] at MeGUI.core.gui.JobWorker.markJobAborted()
----[NoImage] Inner exception: null
--[NoImage] Standard error stream
---[NoImage] avs [info]: 1440x816p 136:135 @ 24000/1001 fps (cfr)
---[NoImage] x264 [info]: using SAR=136/135
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3

FastShuffle SSE4.2
---[NoImage] x264 [info]: profile Main, level 3.2
---[NoImage] This application has requested the Runtime to terminate it in

an unusual way.
---[NoImage] Please contact the application's support team for more

information.
--[Information] [5/10/2010 6:43:53 AM] Job completed
--[Information] [5/10/2010 6:43:53 AM] Current job was aborted


AVS Script
# Set DAR in encoder to 16 : 9. The following line is for automatic signalling
global MeGUI_darx = 16
global MeGUI_dary = 9
LoadPlugin("C:\Program Files\MeGui\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\Blu Ray Tests\movie.dga")
#deinterlace
crop( 2, 2, -2, 0)

Lanczos4Resize(1440,816) # Lanczos4 (Sharp)
#denoise


Hope we can resolve the issue :).

G_M_C
10th May 2010, 15:22
I’made a graph with Haali’s media splitter as input filter. I used the original .m2ts as source. I used ffdshow as video-decoder.. I made it so (See what i did there) that it outputs Rec709 TV scale RGB24, I also also set High quality RGB conversion.

The reason for the RGB output is in the script i use;

Orig=directshowsource(“avatar.grf”,fps=23.976,audio=false)

Ovl1=Orig.Crop(1,2,-1,0) #you can only crop 1 px left&right with RGB sources
Ovl2=ovl1.Spline36resize(1920,1080) #Have base layer be regular HDTV resolution

Canvas= Overlay (ovl2,ovl1,x=1,y=2) #place the correct original image over the resized one to supplement the missing Lines

Last=canvas
ConvertToYV12(matrix=”Rec709”)

I’m at work now, so i type this off the top of my head, and without any English spell checker at hand, so there might be errors in this post. Editted my script, now i am home

In effect you should have the original unalthered source, and you should have 1 line of pixels around that original. In this way i supplemented the missing lines to end up with a full-hd, standard HDTV 1080p resolution.

And now i'll stop my offtopic jibberish. But my encode ran to the end. Might be the strange “non-regular-mod” resolutions you work with.

roozhou
10th May 2010, 17:59
@G_M_C
Conversion between YV12 and RGB32 degrade quality. And cropping 1 px in RGB and converting back to YV12 make it even worse because all pixels of UV plane will have interpolated values.

G_M_C
10th May 2010, 20:23
@G_M_C
Conversion between YV12 and RGB32 degrade quality. And cropping 1 px in RGB and converting back to YV12 make it even worse because all pixels of UV plane will have interpolated values.

Dont know;

I let the decoder output RGB24, while doing a hq conversion, and minimizing the margin of error in the conversion. So my source-input in AviSynth is RGB24 to begin with.

From that RGB24 source 1 make to versions; One that is only cropped (1 px lef, 2 px top, 1 px right), and a second one that is cropped the same manner but resized to the original 1920x1080 again. Both versions are still in the original RGB24.

I overlay the cropped version onto the resized version, "in the same location in the 1920x1080-frame it was originally"; In effect replacing the original cropped black 1 / 2 / 1 pixels with more-or-less the correct colored ones. The resulting image is 1920x1080 again (so the exact same same resolution as the inputted source) and still in the same RGB24, and with the original content still on the same pixel-location. And only that result gets converted to YV12.

All-in-all, I think the resample-error will be almost negligible.