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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th April 2003, 18:44   #1  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
new filter: import/export uncompressed videofiles

Hello,

if nobody tells me, that this impossible i will start coding a new filter. The idea is to open an uncompressed AVI (or any other fileformat), use a few filters and then save the resulting frames back to the original file (or to a new file)! So i do not need twice the discspace. The framerate, size and colorspace must be the same as the original of course. With this filter it should be possible to access uncompressed Quicktimes, Avid OMFs, etc...

A script using this filter could look like this:

LoadPlugin("importuncompressedfile.dll")
LoadUncompressedFile("Filename",OffsetToRawVideoData,Height, Width,Colorspace, NumberOfFrames, OffsetBetweenFrames)
...
[put your filters here]
...
SaveUncompressesFile("Filename",OffsetToRawVideoData,Height, Width,Colorspace, NumberOfFrames, OffsetBetweenFrames)

Does anybody see any problems that may come to me?

thanks
hanfrunz

Last edited by hanfrunz; 25th January 2004 at 22:47.
hanfrunz is offline   Reply With Quote
Old 16th April 2003, 19:35   #2  |  Link
mf
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
As far as I know computers, this should work with uncompressed files as you said. Lossless compressed files on the other hand have unpredictible framesizes and you would have to buffer a whole lot of input frames to make sure you don't overwrite anything you haven't read yet.
mf is offline   Reply With Quote
Old 16th April 2003, 20:09   #3  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
The only "major" problem I see it that it requires extremely linear frame access to work. You risk overwriting a frame that has not been processed yet - and even worse - you risk that if your reader is asked to deliver a frame again, it will return a different (processed) one.

In limited cases it is possible.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 16th April 2003, 22:27   #4  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
@hanfrunz
I don't imagine that many (maybe any apart from uncompressed) avi's have a constant frame size.

It'd be completely non-standard and limited.

Linear only like sh0dan says.


But a very good idea - thinking outside the box

regards
Simon (on 3 Glenmorangies - hic)
Si is offline   Reply With Quote
Old 19th April 2003, 01:30   #5  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hi again,

i attached the first version of my "importuncompressedfile"-filter.
It can import uncompressed .omf (avid) and uncompressed .avi-files.
The export filter can directly write to omf and avi.

This version is very slow, i think my way of accessing the file is not the best... if someone could give me a hint, i will optimize that

See readme.txt for further information.
Good night.

hanfrunz
hanfrunz is offline   Reply With Quote
Old 19th April 2003, 15:46   #6  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Instead of reading single bytes, you should read an entire line at the time, and do rearrangements after that.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 22nd April 2003, 22:50   #7  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello,

i attached a new version of the filter. It is much faster now, because it reads a whole frame at once.

hanfrunz
hanfrunz is offline   Reply With Quote
Old 3rd May 2003, 01:51   #8  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello,

damm it! Avid uses checksums in uncompressed .omf-files! So the exportfilter does not work correct for .omf-files! (playback is green and a lot of errormessages apear, if you only look frame by frame its okay...)
I will attach some examples tomorrow, because i am to tired now... maybe someone has an idea how to calculate the checksums (4 byte/field).

hanfrunz
hanfrunz is offline   Reply With Quote
Old 4th May 2003, 12:20   #9  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
It could be a CRC32, or it could be all pixels xor'ed.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 4th May 2003, 22:28   #10  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
and again a new version:

http://home.austrosearch.at/hanfrunz/iuf_v1.2.zip.html
just download and rename to .zip

news:
you can import/export uncompressed Quicktime-movies (compression=none, color=millions/millions+=RGB24/32)

hanfrunz
hanfrunz is offline   Reply With Quote
Old 25th May 2003, 23:48   #11  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
version 1.3 is out!

there is a new filter which imports uncompressed bitmap-sequences like TIFF or Pixar.

please send me a PM, then i send you the package.
Or wait until i found a new webspace or somebody hosts my 28k file

[EDIT]
now you can download it from:
iuf_v1.3.zip

hanfrunz

Last edited by hanfrunz; 26th May 2003 at 18:53.
hanfrunz is offline   Reply With Quote
Old 25th January 2004, 22:45   #12  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
version 1.4 is out, now with blackmagic support

Hello,

a new version is out

iuf_v1.4.zip

you can import uncompressed Quicktimefiles with the Blackmagic codec (with interleaved audio) now:see here

hanfrunz

EDIT: mmh there is a problem with blackmagic-files that are longer than 10 seconds... a new version will follow in the next days...

Last edited by hanfrunz; 30th January 2004 at 20:14.
hanfrunz is offline   Reply With Quote
Old 7th March 2004, 21:30   #13  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello,
and again an new version.

iuf_v1.5.zip

the importUncompressedSequence function can now import cineon files.
I used the lib from www.xnview.com to do so. Theoreticaly it should be possible to import over 100 filetypes, but i only used cineon, maybe anybody could check this out.
There is a second mode called "dirtycineon" which does not use proper LUT-operation to convert the 10bit/log data to RGB32, but it is faster and can be used for previewing or offline editing it has a inbuid reduceby2 and reduceby4 function if you handle highres files (like 2k film or hd).

I think there a some things that could be optimized in the "dirtycineon" part, maybe the mmx/sse-freaks could check that

The support for blackmagic files is not supported in this version, because of too many problems, but maybe in the next version.

hanfrunz
hanfrunz is offline   Reply With Quote
Old 7th March 2004, 22:27   #14  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Behind SaveUncompressesFile there is an idea which resurfaces here from time to time. Namely, encoder plugins, SaveUncompressesFile is something like an encoder, though an extremely simple one. Of course then there should be an exe version of Avisynth. In his example script, vdub is only used to trigger the encoding process, which is actually done by SaveUncompressesFile.
We have already plugins like avisource, mpeg2dec3 for generating clips, filter plugins for processing clips and encoder plugins would be there for destroying clips again. The whole processing cycle would then be completely within Avisynth. A nice theoretical idea.

Last edited by kassandro; 7th March 2004 at 22:35.
kassandro is offline   Reply With Quote
Old 8th March 2004, 09:16   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,331
@hanfrunz,

Your link doesn't work?
Wilbert is offline   Reply With Quote
Old 8th March 2004, 10:33   #16  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
hi wilbert,
just copy/paste the link to a new window, then it works.

hanfrunz
hanfrunz is offline   Reply With Quote
Old 9th March 2004, 16:14   #17  |  Link
MrTibs
Registered User
 
Join Date: Jan 2003
Posts: 90
Any hope that you will be able to support Huffy? I realize that Huffy is a compressed lossless codec but most people doing captures use it as their codec. It would be quite good to be able to re-compress a capture to reduce its size. Right now I use a simple script like this:

# Trim out comercials
Trim(....

#reverse pulldown
IVTC(...

#Crop out overscan
Crop(...

As you can see from my pseudo-script, I am removing frames so I have little chance of writing over a frame that I am trying to read (assuming a frame buffer of a couple of frames.)
MrTibs is offline   Reply With Quote
Old 9th March 2004, 18:42   #18  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello MrTibs,

NO! there will never be Huffy-Support, because the framesize is not constant, so you can't write back processed frames at the same position, which my filter does.

hanfrunz
hanfrunz is offline   Reply With Quote
Old 14th March 2004, 18:16   #19  |  Link
Dali Lama
Registered User
 
Join Date: Jan 2002
Posts: 331
Hello,

I don't have access to a computer to check right now, but will hanfrunz's filter accept DV compression? I belief it is constant bitrate and should have constant framesize. This would be great for editing/filtering with low disk space.

Regards,

Dali
Dali Lama is offline   Reply With Quote
Old 14th March 2004, 18:52   #20  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello Dali Lama,
mmh interesting idea, but right now this is not possible, because my filter cannot de- and encode DV-streams, and i think i'm not able to implement a DV codec, but maybe somebody else feels inspired?

hanfrunz
hanfrunz 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 11:07.


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