View Full Version : Can AviSynth output to uncompressed format?
asarian
5th August 2011, 07:37
Is there a way to have AviSynth output to an uncompressed format?
Reason I ask, is that I have trouble with some movies and the memory requirements of MCTemporalDenoise. Which is to say, I can denoise certain movies cropped to, say, 800p, but they just hang at 1080p. I have 12G memory, so that's not the issue. I can still denoise those movies going to 'low' instead of 'medium,' but on the latter the process as good as hangs, at ca. 0.01 fp/s throughput (i7 980X). Try as I might, I haven't found a way to solve this.
Anyway, my idea is to just do a 2-pass MCTemporalDenoise job, in which I first do the upper half (540p, with some overlap), and then the lower half of the movie. For that I need to output both streams in an uncompressed format, so I can use a second pass for x264, in which I concatenate the two uncompressed output streams.
Thanks.
ronnylov
5th August 2011, 09:01
You can for instance open your avisynth script in virtualdub and save it to avi with some lossless codec like UT video codec, lagarith or huffyuv. Or you can use x264 to compress lossless to an intermediate file. No need to save ut uncompressed when you can get the same quality with a lossless codec with a smaller file size.
Then create an avisynth script that loads both intermediate sources and combine them together again.
asarian
5th August 2011, 11:10
You can for instance open your avisynth script in virtualdub and save it to avi with some lossless codec like UT video codec, lagarith or huffyuv.
Thanks!
Um, dumb question maybe, but how do I set VirtualDub to safe to lossless AVI? It doesn't seem to have any such settings under Options -> AVI.
SSH4
5th August 2011, 11:12
you can use huffyuv in avi (avs2avi and encode to huffyuv via ffdshow VFW) and load it back as AVIsource (enable in ffdshow in VFW huffyuv decoder!)
or you can use avs2yuv, avs2pipe, ffmpeg for y4m (Get it in avisynth back with Rawsourse())
or use x264 .... --crf 0 and load back with ffmpegsource2 or DGDec
asarian
5th August 2011, 11:20
you can use huffyuv in avi (avs2avi and encode to huffyuv via ffdshow VFW) and load it back as AVIsource (enable in ffdshow in VFW huffyuv decoder!)
or you can use avs2yuv, avs2pipe, ffmpeg for y4m (Get it in avisynth back with Rawsourse())
or use x264 .... --crf 0 and load back with ffmpegsource2 or DGDec
Thanks.
I tried x264 with --qp 0, but I'm getting a steam that's unusable: tsMuxeR can convert it to m2ts, but eac3to can't turn it into an mkv (if I don't do the latter, FFVideoSource tells me the input stream isn't cut on packet boundaries). And both streams are entirely black on playback. :(
So, I'll try huffyuv next.
7ekno
5th August 2011, 15:45
Is there a way to have AviSynth output to an uncompressed format?
Something like this might be useful:
http://forum.doom9.org/showthread.php?p=1328795#post1328795
TWriteAVI can write to Huffy, etc ...
7ek
Mini-Me
5th August 2011, 21:21
Thanks!
Um, dumb question maybe, but how do I set VirtualDub to safe to lossless AVI? It doesn't seem to have any such settings under Options -> AVI.
For losslessly compressed output, first select "Video->Fast Recompress." You could also set "Video->Direct stream copy" for completely uncompressed output, but Huffyuv is much more convenient for me at least. Then select Video->Compression->ffdshow->Huffyuv.* Finally, select File->Save as AVI. This is the only way I EVER render from Virtualdub.
*You'll have to have ffdshow-tryouts installed. Also, check "Adaptive huffman tables" and set the colorspace to whatever your current colorspace is. Hopefully it's YUY2 or YV12; otherwise, you're screwed. ;) Of course, you can select any other lossless encoder you have installed too. You don't HAVE to select ffdshow and Huffyuv.
asarian
5th August 2011, 22:46
For losslessly compressed output, first select "Video->Fast Recompress." You could also set "Video->Direct stream copy" for completely uncompressed output, but Huffyuv is much more convenient for me at least. Then select Video->Compression->ffdshow->Huffyuv.* Finally, select File->Save as AVI. This is the only way I EVER render from Virtualdub.
*You'll have to have ffdshow-tryouts installed. Also, check "Adaptive huffman tables" and set the colorspace to whatever your current colorspace is. Hopefully it's YUY2 or YV12; otherwise, you're screwed. ;) Of course, you can select any other lossless encoder you have installed too. You don't HAVE to select ffdshow and Huffyuv.
Thank you very much! Very useful stuff! :) Much appreciated!
StainlessS
8th August 2011, 02:20
Direct Stream Copy, puts out, whatever came in. It does not output "uncompressed" video unless that
is what came in. Direct Stream copy, is the fastest mode of operation, complications arise if the
input stream is not frame separable, eg DivX or XVid, but eg Uncompressed or HuffYUV is and would be
passed though, as is. Also, Fast Recompress, is intended to partially avoid colourspace conversion.
If you have eg YV12 coming In, and the output colourspace is eg HuffYUV (In YUV mode) then
then virtual dub will enter a dialog with the HuffYUV codec and agree on a strategy to avoid
colourspace conversion that both can 'live with', eg YV12 coming in would after negotiation with
the HuffYUV codec, be converted into YUY2 (another YUV format) and avoid a YV12 to RGB to YUY2
conversion sequence. Full Processing mode, converts everything to RGB (Necessary for VirtualDub
to use any VD filters) and will output RGB to whatever the selected codec is.
EDIT: If input is frame separable and mode is Direct Stream Copy, then you can eg cut out adverts
or whatever and the output stream is copied directly and does not need re-compression and is
lossless.
On the OP question, "Can AviSynth output to uncompressed format? ", Avisynth never outputs
anything but uncompressed video, in whatever colorspace, it depends upon where that output
is sent, and what that program does with it, which codec it is given to.
Mini-Me
8th August 2011, 04:28
On the OP question, "Can AviSynth output to uncompressed format? ", Avisynth never outputs
anything but uncompressed video, in whatever colorspace, it depends upon where that output
is sent, and what that program does with it, which codec it is given to.
That was the part asarian was caught up on; he was just trying to understand how to losslessly render Avisynth output into an intermediate .avi file with a lossless encoder. I made my comments about Direct Stream Copy under the assumption that his Virtualdub input was an .avs script, but your descriptions are much more accurate in general.
StainlessS
8th August 2011, 04:55
Hi, Mini-Me, I completely accepted your description as pretty damn good for the intended
audience. I just thought it required a little more elaboration, hope you dont mind that I inteceded there.
Also like to mention that if Avisynth is the source, in VirtuaDub ALL input would be considered
non-compressed, so previously mentioned modes of VD operation would all relate to uncompressed
input video stream.
Mini-Me
8th August 2011, 16:18
Hi, Mini-Me, I completely accepted your description as pretty damn good for the intended
audience. I just thought it required a little more elaboration, hope you dont mind that I inteceded there.
Also like to mention that if Avisynth is the source, in VirtuaDub ALL input would be considered
non-compressed, so previously mentioned modes of VD operation would all relate to uncompressed
input video stream.
I don't mind at all. I was just trying to save face a bit. :D
asarian
9th August 2011, 20:09
That was the part asarian was caught up on; he was just trying to understand how to losslessly render Avisynth output into an intermediate .avi file with a lossless encoder.
Yes, this is really all I wanted. :) And for some reason I wrote 'uncompressed,' when what I really meant was 'lossless.' At any rate, the good folks here understood my purpose nonetheless, and I'm all good now.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.