blubb444
30th March 2012, 12:43
Hi,
got the following problem:
I've got 47 DV-AVI files (from a friend's Hi8 home video tapes, captured through the FireWire output of a rented Sony GV-D200), most of them are about 1 hour long and take up a lot of disk space (~600GB) so I want to batch encode them with x264. Since they're interlaced, I've batch created some avs scripts which deinterlace them from 50i to 50p using the yadif plugin from here: http://avisynth.org.ru/yadif/yadif.html.
I'm very new to this so maybe my script is faulty? Sure I could deinterlace with VirtualDub but I don't want to write huge intermediate lossless files. Or encode as interlaced, I tried it and it's rather slow and makes rather high bitrates and can only be played correctly in VLC for some reason, WMP then ignores the SAR I set. Plus according to http://mewiki.project357.com/wiki/X264_Settings#tff it's not recommended to use interlacing in x264. And the friend of mine has even less of an idea about encoding/decoding than I have so I want to "hard-encode" the deinterlacing, 25p judders to much so I deinterlace to 50p, much smoother. With my settings the files are around 5-6 MBit/s which is fine for me, better than 28 MBit/s DV-AVI.
The scripts look like this ("001.AVI" goes up until "047.AVI"):
AviSource ("001.AVI")
ConvertToYV12
LoadCPlugin("yadif.dll")
Yadif(1,0,false,3)
Now I found out with some googling that x264 64bit doesn't work with avs and that I need avs2yuv if I don't want to sacrifice the speed gain of 64bit x264 (I get ~40-43fps now, with 32bit and loading the avs directly and otherwise same params it's only ~35-37fps and that's a lot considering ~50hrs of video). So I downloaded that from here: http://akuvian.org/src/avisynth/avs2yuv/ and ran a .bat file which looks like that (it seeks to a certain frame and encodes only a certain number to remove the gray parts at the beginning and end of the files and also crops black bars around the edges):
avs2yuv.exe a015.avs - | x264 --seek 482 --frames 256552 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\015.264 - --demuxer y4m
avs2yuv.exe a016.avs - | x264 --seek 604 --frames 274982 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\016.264 - --demuxer y4m
avs2yuv.exe a017.avs - | x264 --seek 404 --frames 278846 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\017.264 - --demuxer y4m
avs2yuv.exe a018.avs - | x264 --seek 344 --frames 279132 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\018.264 - --demuxer y4m
...
Now here comes the problem: After one encoding job is done, I get an error message Output error: wrote only 590144 of 622080 bytes and the batch stops (the first number varies a little, also got 589916/590040... but the second one always seems to be 622080). The resulting .264 is perfectly fine though, when I mux into mp4 or mkv it plays completely from beginning to end. I googled around a lot for that too, and all I found was that someone here had a different avs2yuv.exe which I downloaded (can't remember the exact thread/link, file size is 84992, last modified Sep 23, 2010, 17:56:28). With that version it apparently continues with the batch despite giving the same error after each encode but after 3 or so encodes avs2yuv crashes too (the Windows message "avs2yuv doesn't respond...") and thus halts the batch again.
Any (newbie-friendly) ideas? I'm using the newest x264 from x264.nl, CPU is a Q9300 with 4x2.5GHz, 8GB RAM, Win7 Home Premium 64, AviSynth 2.58
got the following problem:
I've got 47 DV-AVI files (from a friend's Hi8 home video tapes, captured through the FireWire output of a rented Sony GV-D200), most of them are about 1 hour long and take up a lot of disk space (~600GB) so I want to batch encode them with x264. Since they're interlaced, I've batch created some avs scripts which deinterlace them from 50i to 50p using the yadif plugin from here: http://avisynth.org.ru/yadif/yadif.html.
I'm very new to this so maybe my script is faulty? Sure I could deinterlace with VirtualDub but I don't want to write huge intermediate lossless files. Or encode as interlaced, I tried it and it's rather slow and makes rather high bitrates and can only be played correctly in VLC for some reason, WMP then ignores the SAR I set. Plus according to http://mewiki.project357.com/wiki/X264_Settings#tff it's not recommended to use interlacing in x264. And the friend of mine has even less of an idea about encoding/decoding than I have so I want to "hard-encode" the deinterlacing, 25p judders to much so I deinterlace to 50p, much smoother. With my settings the files are around 5-6 MBit/s which is fine for me, better than 28 MBit/s DV-AVI.
The scripts look like this ("001.AVI" goes up until "047.AVI"):
AviSource ("001.AVI")
ConvertToYV12
LoadCPlugin("yadif.dll")
Yadif(1,0,false,3)
Now I found out with some googling that x264 64bit doesn't work with avs and that I need avs2yuv if I don't want to sacrifice the speed gain of 64bit x264 (I get ~40-43fps now, with 32bit and loading the avs directly and otherwise same params it's only ~35-37fps and that's a lot considering ~50hrs of video). So I downloaded that from here: http://akuvian.org/src/avisynth/avs2yuv/ and ran a .bat file which looks like that (it seeks to a certain frame and encodes only a certain number to remove the gray parts at the beginning and end of the files and also crops black bars around the edges):
avs2yuv.exe a015.avs - | x264 --seek 482 --frames 256552 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\015.264 - --demuxer y4m
avs2yuv.exe a016.avs - | x264 --seek 604 --frames 274982 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\016.264 - --demuxer y4m
avs2yuv.exe a017.avs - | x264 --seek 404 --frames 278846 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\017.264 - --demuxer y4m
avs2yuv.exe a018.avs - | x264 --seek 344 --frames 279132 --preset fast --crf 21 --tune film --keyint
500 --min-keyint 50 --bframes 8 --rc-lookahead 150 --chroma-qp-offset 2 --video-filter crop:8,4,12,10 --sar
59:54 --threads 8 -o mp4\018.264 - --demuxer y4m
...
Now here comes the problem: After one encoding job is done, I get an error message Output error: wrote only 590144 of 622080 bytes and the batch stops (the first number varies a little, also got 589916/590040... but the second one always seems to be 622080). The resulting .264 is perfectly fine though, when I mux into mp4 or mkv it plays completely from beginning to end. I googled around a lot for that too, and all I found was that someone here had a different avs2yuv.exe which I downloaded (can't remember the exact thread/link, file size is 84992, last modified Sep 23, 2010, 17:56:28). With that version it apparently continues with the batch despite giving the same error after each encode but after 3 or so encodes avs2yuv crashes too (the Windows message "avs2yuv doesn't respond...") and thus halts the batch again.
Any (newbie-friendly) ideas? I'm using the newest x264 from x264.nl, CPU is a Q9300 with 4x2.5GHz, 8GB RAM, Win7 Home Premium 64, AviSynth 2.58