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 21st February 2004, 13:24   #41  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Made a few changes to YV12, and added simpler I420 support.

Now tested (and working now)

http://cultact-server.novi.dk/kpo/av.../rawsource.zip
__________________
Regards, sh0dan // VoxPod

Last edited by sh0dan; 21st February 2004 at 13:41.
sh0dan is offline   Reply With Quote
Old 21st February 2004, 21:19   #42  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
Forgot to add GetWritePointers ... Thanks
Wilbert is offline   Reply With Quote
Old 21st February 2004, 23:06   #43  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
really don't want to stop you from programming but my version (2004-02-17) already had YV12/I420
However, it's a nice example to learn planar.
WarpEnterprises is offline   Reply With Quote
Old 22nd February 2004, 21:43   #44  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
Why didn't you say so ? I can't read your mind

1) If I put this plugin into the plugindir, WMP6.4 says 'Ran out of memory' when opening an arbitrary script. Do you have any idea why?

2) It's perhaps a nice plugin for the core?

3) Small programming questions:

What does the following line:

ret = _lseeki64(h_rawfile, bytes_per_line * vi.height * n , SEEK_SET);

Is this one necessary:

memset(rawbuf, 0, maxwidth * 4);
Wilbert is offline   Reply With Quote
Old 22nd February 2004, 22:48   #45  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
I did say (a post in this thread)

Which version exactly did you feed WMP?

_lseeki64 is a file-seek working for files>4GB. You need to seek if you have non-linear access (there are many file access layers - FILE, ifstream,.. - and I'm not sure which work >4GB, this does)

memset sets the buffer to 0 in case there is some read error you see it clearly and not some leftover from past frames.
WarpEnterprises is offline   Reply With Quote
Old 22nd February 2004, 23:08   #46  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
Quote:
Which version exactly did you feed WMP?
Yours, and the one of Sh0dan.
Wilbert is offline   Reply With Quote
Old 22nd February 2004, 23:28   #47  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
works here. WMP6.4, W2K.
Does it show any frames or crash before displaying something?
Does VD work?
WarpEnterprises is offline   Reply With Quote
Old 22nd February 2004, 23:54   #48  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
Let me first say that it works if I keep it outside the plugindir.

If I put it in the plugindir, and I open an arbitrary script in WMP6.4 or vdub it doesn't show any frames. It just says: 'ran out of memory (WMP6.4)' and in vdubmod 1.4.13 / vdub:

Avisynth open failure:
AviSynth: script open failed!

If I just open vdubmod 1.5.10.1 itself, I get this message:



W2K, Athlon XP
Wilbert is offline   Reply With Quote
Old 21st May 2004, 15:10   #49  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
4minutes raw yuv clip

Hi,
I've got a 4 minutes 422 (UYVY) raw PAL sequence in separate files (4500 files for a total of 3.47GB) (one file without headers for each frame).
I first tried using imagereader but I didnt manage to open the clip and I'm not sure I can as there is no way to specify the dimensions.

Then I concatenated all the files to try to open the video with "rawsource" plugin (as I think it only takes one file with all frames in it) It looked like it worked ok until frame 2589... which actually corresponds to the frame where the file reaches a size of 2GB...
Frome frame 2590 I ve got randomly either green frames or frames that have been displayed before and going back several times to the same frames display different things...

So I don't know where the problem occured: during the concatenation from my 4500 files into 1 single file or in rawsource...
Ideally I'd prefer to use a plugin that would access the 4500 files directly as I wouldnt need to play with an exrta 4G files...

Anybody got an idea to work around that problem?
Thanks a lot!
__________________
Minds are like parachutes - they only function when open.
billou2k is offline   Reply With Quote
Old 24th May 2004, 12:54   #50  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
I think I forgot some int64-casts in RawSource, so although it should work it doesn't above 2GB. I can fix it this week.
WarpEnterprises is offline   Reply With Quote
Old 24th May 2004, 13:28   #51  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
Really? That would be great!
Thanks a lot for your time!
__________________
Minds are like parachutes - they only function when open.
billou2k is offline   Reply With Quote
Old 26th May 2004, 08:58   #52  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
please try

http://www.avisynth.org/warpenterpri...l_20040525.zip

hope it works now.
WarpEnterprises is offline   Reply With Quote
Old 26th May 2004, 13:29   #53  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
Indeed it works perfecly well! great job!
Thanks a lot for fixing it so quickly!
__________________
Minds are like parachutes - they only function when open.
billou2k is offline   Reply With Quote
Old 18th June 2004, 14:40   #54  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
Warp: Sorry to bother you again but I discovered some problems using rawsource.
I'm using avisynth also to do some overlay on the raw YUV sequences I'm reading with "rawsource".
Unfortunately it's crashing after 20 seconds of processing, with the PC getting very very slow (dual 3GHz 2GB of ram).

After some more testing I realised that MPC or VDUB playing (or saving to avi) the avs file containing only rawsource use more and more memory during the playback: it goes up to 1.4 GB after 24 seconds of PAL raw YV12...

Playing the same video wrapped in an avi file yv12 (rather than the raw yv12 file using rawsource) just uses 20MB or so at the maximum.

So It looks like the rawsource plugin keeps in memory all the pictures it has decoded rather than just keeping the current one. Does it make sense?
Do you think that this is something that could be solved, so that I could run my main script?
Thanks a lot for your plugin.
Cheers
__________________
Minds are like parachutes - they only function when open.

Last edited by billou2k; 18th June 2004 at 15:49.
billou2k is offline   Reply With Quote
Old 21st June 2004, 11:28   #55  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
did you try to NOT put it in the plugin dir as Wilbert suggested?
do you use the latest AviSynth version?

I can't find any obvious memory allocation error - the plugin isn't allocating memory at all.
WarpEnterprises is offline   Reply With Quote
Old 21st June 2004, 11:48   #56  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
Actually I never put rawsource in the plugin dir, I'm just loading it from the current directory.
I'm using the latest avisynth as well (v2.55, 17 june 2004)
Ok... I would have thought the problem might come from rawsource but maybe it comes from avisynth then....
Can anybody else observe the memory used by Avisynth/Vdub/MPC increase to non sensible heights ? (1.4 GB after 24 seconds of PAL video)
I dont know what to do now I can try on another computer though and check if it does the same thing or not...
__________________
Minds are like parachutes - they only function when open.
billou2k is offline   Reply With Quote
Old 22nd June 2004, 08:13   #57  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
I checked again. I see this:
AviSynth eats up RAM according to its cache strategy, e.g. up to 100MB on my 256MB system.
Maybe there is an error how it measures free ram.

@billou2k:
1) which OS?
2) please try SetMemoryMax(100) and look if it obeys the 100MB barrier.
WarpEnterprises is offline   Reply With Quote
Old 22nd June 2004, 19:22   #58  |  Link
billou2k
Registered User
 
Join Date: Feb 2002
Location: Under the grey sky
Posts: 146
Thanks for your reply,

I'm running XP but I tried on a 2K system with 1GB of ram and it eats most of the remaining memory also (600MB or so)
I havent had much time yet, but after some quick tests it looks like adding the SetMemoryMax(100) helps a bit but doesnt respect the 100MB barrier although it is much better than before (600MB instead of 1400MB for 24 seconds of raw PAL YV12)
But that strange behaviour of eating more and more memory as the video plays seems strange to me...
Anyway thanks for the help!
__________________
Minds are like parachutes - they only function when open.
billou2k is offline   Reply With Quote
Old 5th April 2005, 21:58   #59  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
@WarpEnterprises,

Is it possible to add YUV4MPEG support to your plugin? As I understand it YUV4MPEG is just "header + raw planar YUV".
Wilbert is offline   Reply With Quote
Old 6th April 2005, 14:59   #60  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Can you point me to a source test clip and/or discussions?

If it's possible to parse or recognise the header it should be not that hard.
WarpEnterprises 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 22:38.


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