Damn, I'm getting tired of all these encoding problems.
Here it is.
I'm trying to make an HD and SD encodes from the same movie, but it results of totally broken files that can't even be read. Even YouTube can't process the HD encode!
Here are my testing files, you can check them out:
http://www.mediafire.com/?4433y9suiae2h
And here are the AviSynth and batch scripts I used to encode these files.
HD encoding AVS script
a = AVISource("movie.avi").ConvertToRGB32()
#ar = a.PointResize(a.width * 4, a.height * 4)
ar = hq4x(a)
abottom = Crop(a, 0, 192, 256, 192)
#abottomr = abottom.PointResize(abottom.width * 8, abottom.height * 8)
abottomr = hq2x(hq4x(abottom))
b = Trim(StackHorizontal(ar, abottomr), 0, 900)
d = ImageSource(file="logohd.png", start=0, end=119, fps=b.FrameRate).ConvertToRGB32()
e = BlankClip(d, audio_rate=44100, channels=2)
f = AudioDub(d, e).Lanczos4Resize(b.width, b.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator)
last = f + b
AssumeFieldBased.Weave.VerticalReduceBy2
ConvertToYV24(chromaresample="point")
ConvertToYV12(chromaresample="point")
return last
SD encoding AVS script
framerate = 60
framestdebut = 120
titrejeu = """Magnetica "Challenge Mode (Hard)""""
auteur = "Mister Epic"
temps = "04:22.14"
rerecords = "1066"
tailletexte = 20
source = AVISource("movie.avi").ConvertToRGB24()
a1 = Crop(source, 0, 0, 256, 192)
a2 = Crop(source, 0, 192, 256, 192)
a = Trim(StackHorizontal(a1, a2), 0, 900)
b = ImageSource(file="logo.png", start=0, end=119, fps=a.FrameRate).ConvertToRGB24()
c = BlankClip(b, audio_rate=44100, channels=2)
d = AudioDub(b, c).Lanczos4Resize(c.width, c.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator)
last = d + a
Subtitle(titrejeu + "\nPlayed by " + auteur + "\nPlaying time: " + temps + "\nRerecord count: " + rerecords, y=0, align=8, first_frame=framestdebut, last_frame=(framestdebut + (5 * framerate) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
Subtitle("This is a tool-assisted recording.\nFor details, visit http://TASVideos.org/", y=0, align=8, first_frame=(framestdebut + (5 * framerate)), last_frame=(framestdebut + (2 *(5 * framerate)) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
ConvertToYV24(chromaresample="point")
ConvertToYV12(chromaresample="lanczos4")
HD encoding batch script
flac -8 encoded.wav
x264.exe --qp 15 -b 0 --keyint 30 --output encodedhd.mp4 hdencode.avs
mkvmerge --engage no_simpleblocks -o encodingtestHD.mkv encodedhd2.mp4 encoded.flac
SD encoding batch script
neroAacEnc -q 0.25 -if encoded.wav -of encoded.aac
MP4Box -info encoded.aac
echo Supprimer excedant
pause
neroAacEnc -q 0.25 -if encoded.wav -of encoded.aac
x264 --crf 20 --deldup 0.1:0.1:100:1:0.1 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 10 --trellis 2 --partitions all --fullrange on --rc-lookahead 250 --no-dct-decimate -o encoded.mp4 sdencode.avs
MP4Box -add encoded.mp4 -add encoded.aac -par 1=1:1 -new encodingtestSD.mp4
You can ignore those echos and those # in those scripts.
I've also tried these:
Encoding without HQ2X and HQ4X for the HD encode
Encoding without Flygon's interleaving trick for the HD encode
Encoding without cropping and putting the screens side-to-side for the SD encode
Using the latest version of x264 (direct264), because I could see that only the video track is buggy (by trying to read the unmuxed MP4)
Using the x264 (direct264) version that was right under the latest
Using "--me umh" instead of "--me tesa"
Using the latest version of MKVMerge and MP4Box
Restarting my computer
And I did some of them multiple times.
All of these without success.
Is there something I'm doing wrong?