Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th August 2011, 07:37   #1  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Can AviSynth output to uncompressed format?

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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 5th August 2011, 09:01   #2  |  Link
ronnylov
Registered User
 
Join Date: Feb 2002
Location: Borås, Sweden
Posts: 492
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.
__________________
Ronny
ronnylov is offline   Reply With Quote
Old 5th August 2011, 11:10   #3  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by ronnylov View Post
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 5th August 2011, 11:12   #4  |  Link
SSH4
Registered User
 
Join Date: Nov 2006
Posts: 90
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
SSH4 is offline   Reply With Quote
Old 5th August 2011, 11:20   #5  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by SSH4 View Post
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 5th August 2011, 15:45   #6  |  Link
7ekno
Guest
 
Posts: n/a
Quote:
Originally Posted by asarian View Post
Is there a way to have AviSynth output to an uncompressed format?
Something like this might be useful:
http://forum.doom9.org/showthread.ph...95#post1328795

TWriteAVI can write to Huffy, etc ...

7ek
  Reply With Quote
Old 5th August 2011, 21:21   #7  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by asarian View Post
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.

Last edited by Mini-Me; 5th August 2011 at 21:25.
Mini-Me is offline   Reply With Quote
Old 5th August 2011, 22:46   #8  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Mini-Me View Post
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!
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 8th August 2011, 02:20   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th August 2011 at 03:13.
StainlessS is offline   Reply With Quote
Old 8th August 2011, 04:28   #10  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by StainlessS View Post
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.
Mini-Me is offline   Reply With Quote
Old 8th August 2011, 04:55   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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 sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 8th August 2011, 16:18   #12  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by StainlessS View Post
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.
Mini-Me is offline   Reply With Quote
Old 9th August 2011, 20:09   #13  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Mini-Me View Post
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.