JeanMarc
15th January 2013, 19:44
I am experimenting with HD content and 64-bit applications. My attempts to process a 1920x1080 m2ts clip with 32-bit applications generally failed. What I was trying to do, to get started, is load the m2ts file into an avisynth script, process and resize it to 1280x720 in avisynth, encode it into x264 mp4 or mkv with ffmpeg.
Here is the kind of script I am starting with:
Loadplugin("C:\Program Files\Avisynth64_100416\ffms-2.17-x64\ffms2-x64.dll")
a = FFAudioSource("E:\Barracuda1\_Videos_shared\_videos to do\m2ts-test\00006.m2ts")
v = FFVideoSource("E:\Barracuda1\_Videos_shared\_videos to do\m2ts-test\00006.m2ts", \
fpsnum = 30000, fpsden = 1001, width = 1280, height = 720, resizer = "SPLINE")
audiodub(v, a)
With 32-bit applications, it looks like I always hit a 2GB memory limitation , causing the application to use more and more memory, and to crash before the job is completed, and I see that pattern happening with any avisynth 32-bit script and HD content, even with the most basic avs script – but never with “standard” SD mpeg-2 content.
Encoding with ffmpeg64 and avisynth64 is working well for me (I used Avisynth 2.58 tsp MT version5(mod seraphy), built Mar 19 2010) and a very recent 64-bit ffmpeg built from Zeranoe.
But I usually want to do more with avisynth, for example, test the quality of the video with the Avisynth SSIM plugin. I haven't found any 64-bit version of SSIM, and any attempt to use SSIM with 32-bit avisynth **and** HD material (it works fine on 720x480 content) makes the application crash after processing a number of frames.
I tried running the avisynth script containing the SSIM function with VirtualDub, MPC-HC, PotPlayer, even avfs (where I converted the avs script for the original video and the script for the compressed video into virtual avi file before running just the SSIM plugin with 32-bit avisynth.) All crash after a while before completion. I see on Windows Task Manager the amount of memory used by the process continually increasing as the number of frames processed increase, until (apparently when hitting around 1,900,000K) it crashes.
One solution I see is to cut the video into small pieces, and process it one piece at a time. Possible, but not nice. I also understand there are ways to pipe processes between 32-bit and 64-bit, but I have never tried it yet and I am not sure how that would resolve my problem.
My conclusion is that (1) 64-bit avisynth and ffmpeg (and Virtualdub and MPC-HC) work fine if you stick to the basics but not as soon as you need specific 32-bit plugins, and (2) regular 32-bit avisynth presents memory problems with HD content.
So the more specific questions are:
Am I right in assuming that when you deal with HD content, 32-bit avisynth has memory problems leading to crashes?
If that is true, is there a workaround, or a solution in sight?
The only HD content I have is h264 / m2ts. Could the problem be related to loading that kind of video into avisynth using ffmpegSource?
Do I miss anything obvious?
Thanks for any feedback
Here is the kind of script I am starting with:
Loadplugin("C:\Program Files\Avisynth64_100416\ffms-2.17-x64\ffms2-x64.dll")
a = FFAudioSource("E:\Barracuda1\_Videos_shared\_videos to do\m2ts-test\00006.m2ts")
v = FFVideoSource("E:\Barracuda1\_Videos_shared\_videos to do\m2ts-test\00006.m2ts", \
fpsnum = 30000, fpsden = 1001, width = 1280, height = 720, resizer = "SPLINE")
audiodub(v, a)
With 32-bit applications, it looks like I always hit a 2GB memory limitation , causing the application to use more and more memory, and to crash before the job is completed, and I see that pattern happening with any avisynth 32-bit script and HD content, even with the most basic avs script – but never with “standard” SD mpeg-2 content.
Encoding with ffmpeg64 and avisynth64 is working well for me (I used Avisynth 2.58 tsp MT version5(mod seraphy), built Mar 19 2010) and a very recent 64-bit ffmpeg built from Zeranoe.
But I usually want to do more with avisynth, for example, test the quality of the video with the Avisynth SSIM plugin. I haven't found any 64-bit version of SSIM, and any attempt to use SSIM with 32-bit avisynth **and** HD material (it works fine on 720x480 content) makes the application crash after processing a number of frames.
I tried running the avisynth script containing the SSIM function with VirtualDub, MPC-HC, PotPlayer, even avfs (where I converted the avs script for the original video and the script for the compressed video into virtual avi file before running just the SSIM plugin with 32-bit avisynth.) All crash after a while before completion. I see on Windows Task Manager the amount of memory used by the process continually increasing as the number of frames processed increase, until (apparently when hitting around 1,900,000K) it crashes.
One solution I see is to cut the video into small pieces, and process it one piece at a time. Possible, but not nice. I also understand there are ways to pipe processes between 32-bit and 64-bit, but I have never tried it yet and I am not sure how that would resolve my problem.
My conclusion is that (1) 64-bit avisynth and ffmpeg (and Virtualdub and MPC-HC) work fine if you stick to the basics but not as soon as you need specific 32-bit plugins, and (2) regular 32-bit avisynth presents memory problems with HD content.
So the more specific questions are:
Am I right in assuming that when you deal with HD content, 32-bit avisynth has memory problems leading to crashes?
If that is true, is there a workaround, or a solution in sight?
The only HD content I have is h264 / m2ts. Could the problem be related to loading that kind of video into avisynth using ffmpegSource?
Do I miss anything obvious?
Thanks for any feedback