GrandAdmiralThrawn
3rd March 2013, 15:30
Greetings!
I have once successfully encoded a 3D Blu-Ray (the movie "Prometheus") to a Half-SBS 3D MKV, using the H264StereoSource.dll plugin for AviSynth 2.5.8. And now I can no longer reproduce what I did, x264 just crashes on me. This time I am trying the movies "Paranorman 3D" and also the "Abraham Lincoln - Vampire Hunter 3D" thing.
I use BDtoAVCHD to extract the elementary streams (it's basically just eac3to at work), and then the tool writes an AviSynth script for me. Looks somewhat like this (I edited a bit before posting, so the paths and filenames are not the actual ones):
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
FFIndex("D:\left.h264", cachefile="D:\left.index", demuxer="lavf")
left = FFVideoSource("D:\left.h264", cachefile="D:\left.index", seekmode=-1).AssumeFPS(24000,1001)
right = H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
return StackHorizontal(HorizontalReduceBy2(left), HorizontalReduceBy2(right)).Trim(0, 132516)
I also tried with DGAVCDecode instead of FFMS2, just to see whether this is the problem (it was not), the dga file has been created with DGAVCIndex:
LoadPlugin("C:\Program Files (x86)\VFX\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
left = AVCSource("D:\left.dga")
right = H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
return StackHorizontal(HorizontalReduceBy2(left), HorizontalReduceBy2(right)).Trim(0, 132516)
And here is the crash.cfg file for right eye stream decoding:
InputFile = "D:\left.h264"
InputFile2 = "D:\right.h264"
FileFormat = 0
POCScale = 1
DisplayDecParams = 1
ConcealMode = 0
RefPOCGap = 2
POCGap = 2
IntraProfileDeblocking = 1
DecFrmNum = 0
Now, this runs for a few seconds, and then x264 crashes. But even before it crashes, it's pretty obvious that it's not working properly. The decoding of the right eye stream produces the following output in the console, before the crash:
http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-1.png
Until then, the transcoder will have produced a small output file. If I mux that output to an MKV and try to play back, I get the following (I also get this when trying to play back the Avisynth script directly), click to enlarge please:
http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-2_small.jpg (http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-2.jpg)
There are artifacts even in the left eye stream, but the right eye one is completely fucked up, as you can clearly see.
I have not updated, nor changed my AviSynth and BDtoAVCHD setups, only x264 has been updated. But I tried this even with older x264 versions just now, producing the same problem (also, the x264 version bundled with BDtoAVCHD does the same thing).
I know that these errors come from the H264StereoSource specifically, because I tried to change the avs script to only decode right eye, like this:
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
And it produces the same problem. Doing an FFVideoSource or AVCSource on the left eye stream only, everything works just fine, and I get proper 2D output.
Here is my command line for x264, encoding a first pass, usually a 2nd one would follow as I'm aiming for a specific target file size, this is a 32-Bit x264 with 8-bits per channel color depth (matching my 32-Bit AviSynth):
x264.exe --preset veryslow --tune film --b-adapt 2 --b-pyramid normal -r 3 -f -2:0 --bitrate 8000 --aq-mode 1
-p 1 --slow-firstpass --stats movie.stats -t 2 --no-fast-pskip --cqm flat --non-deterministic input.avs -o pass1.264
I'm clearly doing something wrong. I just have no idea what it is. This worked once, and somehow I broke it or I forgot something, but I simply can't figure out what it is.
Please, help!
Thanks!
I have once successfully encoded a 3D Blu-Ray (the movie "Prometheus") to a Half-SBS 3D MKV, using the H264StereoSource.dll plugin for AviSynth 2.5.8. And now I can no longer reproduce what I did, x264 just crashes on me. This time I am trying the movies "Paranorman 3D" and also the "Abraham Lincoln - Vampire Hunter 3D" thing.
I use BDtoAVCHD to extract the elementary streams (it's basically just eac3to at work), and then the tool writes an AviSynth script for me. Looks somewhat like this (I edited a bit before posting, so the paths and filenames are not the actual ones):
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
FFIndex("D:\left.h264", cachefile="D:\left.index", demuxer="lavf")
left = FFVideoSource("D:\left.h264", cachefile="D:\left.index", seekmode=-1).AssumeFPS(24000,1001)
right = H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
return StackHorizontal(HorizontalReduceBy2(left), HorizontalReduceBy2(right)).Trim(0, 132516)
I also tried with DGAVCDecode instead of FFMS2, just to see whether this is the problem (it was not), the dga file has been created with DGAVCIndex:
LoadPlugin("C:\Program Files (x86)\VFX\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
left = AVCSource("D:\left.dga")
right = H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
return StackHorizontal(HorizontalReduceBy2(left), HorizontalReduceBy2(right)).Trim(0, 132516)
And here is the crash.cfg file for right eye stream decoding:
InputFile = "D:\left.h264"
InputFile2 = "D:\right.h264"
FileFormat = 0
POCScale = 1
DisplayDecParams = 1
ConcealMode = 0
RefPOCGap = 2
POCGap = 2
IntraProfileDeblocking = 1
DecFrmNum = 0
Now, this runs for a few seconds, and then x264 crashes. But even before it crashes, it's pretty obvious that it's not working properly. The decoding of the right eye stream produces the following output in the console, before the crash:
http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-1.png
Until then, the transcoder will have produced a small output file. If I mux that output to an MKV and try to play back, I get the following (I also get this when trying to play back the Avisynth script directly), click to enlarge please:
http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-2_small.jpg (http://www.xin.at/thrawn/pics/screenshots/x264/x264-3d-crash-2.jpg)
There are artifacts even in the left eye stream, but the right eye one is completely fucked up, as you can clearly see.
I have not updated, nor changed my AviSynth and BDtoAVCHD setups, only x264 has been updated. But I tried this even with older x264 versions just now, producing the same problem (also, the x264 version bundled with BDtoAVCHD does the same thing).
I know that these errors come from the H264StereoSource specifically, because I tried to change the avs script to only decode right eye, like this:
LoadPlugin("C:\Program Files (x86)\VFX\BDtoAVCHD\H264StereoSource\H264StereoSource.dll")
H264StereoSource("D:\crash.cfg", 132566).AssumeFPS(24000,1001)
And it produces the same problem. Doing an FFVideoSource or AVCSource on the left eye stream only, everything works just fine, and I get proper 2D output.
Here is my command line for x264, encoding a first pass, usually a 2nd one would follow as I'm aiming for a specific target file size, this is a 32-Bit x264 with 8-bits per channel color depth (matching my 32-Bit AviSynth):
x264.exe --preset veryslow --tune film --b-adapt 2 --b-pyramid normal -r 3 -f -2:0 --bitrate 8000 --aq-mode 1
-p 1 --slow-firstpass --stats movie.stats -t 2 --no-fast-pskip --cqm flat --non-deterministic input.avs -o pass1.264
I'm clearly doing something wrong. I just have no idea what it is. This worked once, and somehow I broke it or I forgot something, but I simply can't figure out what it is.
Please, help!
Thanks!