Log in

View Full Version : Need fast RGBA32 image sequence exporting


killmoms
24th May 2014, 04:36
So, I’m trying to accomplish something a bit weird; basically I’m trying to render a .ASS subtitle file (with no underlying video) with alpha intact to an image sequence (ultimately for conversion to ProRes4444 video as an overlay I can use selectively after editing the underlying video). So I’m successfully using BlankClip() and ASSrender() to get the video I want (a quick check with ShowAlpha() verified that the alpha channel was correct with this setup).

Unfortunately, when I tried to use VirtualDub’s built in Export > Image Sequence, it bashed the alpha and left me with no transparency in the image sequence. So I did some more searching and found ImageWriter() built-in to AVISynth, so figured I could just use that with VirtualDub’s “video analysis” pass to just force a full run through the script. That let me make files with correct alpha, but unfortunately it’s way slower than VDub’s image sequence exporter—by a factor of 20 (roughly). I’m wondering if I’m using ImageWriter() wrong, or VDub, or something else. Is there a nice, fast, alpha channel-friendly way to get an image sequence (preferably losslessly compressed with RLE or something, so I’m not stuck with 8.3MB/frame) out of AVISynth?

poisondeathray
24th May 2014, 05:38
How about ffmpeg ?

eg. png sequence



ffmpeg -i input.avs -pix_fmt rgba -c:v png -an -start_number 0 output%05d.png



Or you can export prores4444 directly from ffmpeg since that is your end goal - so you can skip a step - but this ffmpeg variant of prores can sometimes cause problems with the recieving application . Test it out on a small sample first . Or there are other codecs like UT Video which support RGBA



ffmpeg -i input.avs -profile:v 4444 -pix_fmt yuva444p10le -vcodec prores_ks -an output.mov

killmoms
24th May 2014, 14:06
Sounds like a potentially good solution, though I am utilizing AVIsynth/VDub through a Wineskin wrapper on OS X (since I don’t have a PC—my ProRes goal probably makes more sense now ;)). Do you think it’ll be possible to install the ffmpeg command line utility into that instance of WINE and use it successfully? What would be the correct binary version (installer?) to get for this purpose?

EDIT: Got an ffmpeg binary into the PATH in my AVIsynth/VirtualDub Wineskin wrapper and working, but unfortunately in a test ProRes file it looked very over-compressed. Not sure if there are settings which force it into something closer to the proper ProRes 4444 bitrate target or if the ks encoder is just a little wonky with 4444, but exporting to a PNG sequence is between 4 and 5 times faster than ImageWriter() was (and After Effects deals with the PNG sequences just fine), so I’ll take it. Thanks for the help!