[GEM-dev] DV resolution (was Re: can't get pix_movie working (follow-up))

Matteo.sistisette matteo.sistisette at email.it
Mon Jun 18 14:26:23 CEST 2007


Definitely, version gem-CVS20060412-NT-i686-bin is using quicktime instead
of directshow, dunnow why.

Now, I've been able to get version gem-CVS20060914-W32-i686-bin working.
It had a problem with pix_texture, not with pix_film.
By sending pix_texture a "mode 0" message it works; if I don't send
pix_texture the "mode 0" msg (it uses mode 1 by default), it doesn't render
any texture: just a white rectangle, and outputs the error "GL: invalid
enumeration" all the time.



Unfortunately, this version is unstable.
It sometimes crashes.
I have a patch that works perfectly on gem-CVS20060412-NT-i686-bin (but
renders videos at quarter resolution and is using quicktime), but crashes on
gem-CVS20060914-W32-i686-bin.


In my patch, I have an abstraction A with say 30 pix_film objects each one
with its gemhead chain ending on its rectangle, and I simultaneously open
(not play) around 30 videos. Of these, I am playing only one or two at the
same time. In order to activate the one/s that have to play and deactivate
the other ones, I activate/deactivate their gemhead chain.
I have to keep all them open because I need to be able to switch to any one
of them at any moment, unpredictably.
I chose the number of 30 because it is the maximum that allows me to be able
to randomly switch to any of them almost immediatly - I guess it allows to
keep a piece (near to the "playhead") of each video always in the cache.

Then, I have another abstraction which works very similarly but not quite
exactly the same - differences are irrelevant here but that's why I can't
just reload videos on the same abstraction.
At a certain time, I need to stop using abstraction A and start using
abstraction B, which has another 30 videos.
Later I may need to switch back to abstraction A but with a different set of
video files than the first time. Etcetera. Transition between A and B don't
need to be fast, I can allow for the needed loading time.


So, I work as follows:

At startup, I only [open( group A of videos. When switching to B, I [open(
group B of videos.
Since the new group of videos is loaded into a different set of pix_films, I
first need to somehow "close" the group-A videos.
Surprisingly enough, pix_film hase no "close" method (kinda shame), so I
send an [open xxx( message to the A pix_films, where xxx is literal, i.e.
they all try to open a file called "xxx" which does not exist. This closes
the previously opened one.
Then I do [open( the new files in B.


I have experimented this framework on version gem-CVS20060412-NT-i686-bin
and it works just great.
When I load the group B of video, accessing any video in this group is very
fast, just as if I hadn't been playing around with group A first. I have
tried switching from A to B to A several times (always "closing" one group
and opening the other one) and accessing randomly any video of the current
group, then loading different sets of video in each groups etc. I.e., quite
massive testing and it is very robust...
...BUT only with that version of GEM, which is the one that renders the
videos with quicktime and renders them at quarter resolution.

When I try the same thing on version gem-CVS20060914-W32-i686-bin, the
"close" trick doesn't work well. When accessing the first group all works
fine, switching among videos is fast. But when I [open( the second group,
every access is very slow (and there's a lot of HD activity), so I guess the
memory is trashing.
And the worst thing is, simply accessing a video (i.e. activating its
gemhead after deactivating the previously active one) when the access is
difficult (ie slow), may cause CRASH.

Note that randomly accessing any of 30 videos (i.e. a single group of 30
video) does work smoothly. That is, there is enough memory and resources in
the machine to manage it. I just want to be able to "forget" the group of
videos and start working with a new one (which would work smoothly if it was
the first one being used), without restarting PD.


So there seem to be 2 problems:
1- The way the W32 version manages file access seems to be different, and
less efficient for this kind of application. It seems like, even "closing" a
few files, it does not empty the cache and/or, when doing the [open( on the
new ones, does not fill the cache the same way it filled it the first time.
the relevant thing here is that on the other version the close/open
framework does give good results. Note that I'm testing everything always on
the same machine and with the same files!
2- The W32 version is unstable and crashes, at least when it is experiencing
"difficulties" in accessing files (i.e. every access is slow because of
cache trashing). Note that it is OK that the program becomes unresponsive
when read operations are slow, but it should never ever crash.


Also, in the W32 version [open(ing files takes much more time.


I guess I'm telling you all this just to let you know.
I realize it's quite hard to give any suggestion that can really help me.

A couple of such suggestions may be:
-how to force QUICKTIME to render DV at full resolution (in version
gem-CVS20060412-NT-i686-bin)
-how to force some kind of optimization in file access by letting GEM know
that I don't need any more to access a few file, and let him know that I do
need to access a few other ones.



Thank you very much,
m.








--------- Original Message --------
Da: "Matteo.sistisette" <matteo.sistisette at email.it>
To: "chris clepper" <cgclepper at gmail.com>
Cc: gem-dev at iem.at
Oggetto: DV resolution (was Re: can't get pix_movie working (follow-up))
Data: 18/06/07 12:29






Hi,

I am still desperate with the codec problem.

Recoding all my videos with another codec will be very time expensive: they
are a lot, and I have to try-and-error untill I find a really stable
solution (tried a few codecs and with some GEM crashes), and also to find
the ideal quality-filesize trade-off.
So I'd like to avoid it if possible at all.

The situation now is:
-using gem-CVS20060412-NT-i686-bin
-pix_movie/pix_film renders DV avi's at quarter resolution (or half, not
quite sure)
-in graph edit, the properties of DV Video Decoder show "full resolution"
-Windows Media Player, Virtual Dub, VideoLanClient all play DV avi's at full
resolution


You mentioned there may be another DV codec installed and that may be the
one GEM is using, but I can't find any.
I have some MainConcept stuff installed but it seems to be only MPEG4, no
DV.


Is it guaranteed that GEM is using directshow, not quicktime? 


The output window shows the following at startup:

===
GEM: Graphics Environment for Multimedia
GEM: ver: 0.90
GEM: compiled: Apr 12 2006
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version on irix/windows)
GEM: Chris Clepper (macOS-X)
GEM: Daniel Heckenberg (windows)
GEM: James Tittle (macOS-X)
GEM: IOhannes m zmoelnig (linux/windows)
Gem Man: QT init OK
===

When I open the patch (which contains one pix_film), it shows:

===
MAN::resetState entered
pix_film:: avi support
handle 0 1484420
filmQT created
pix_film:: quicktime support
handle 1 14844D8
handle 2 1484588
handle 3 1484620
handle 4 14846B0
handle 5 1484748
handle 6 14847E8
===

And when I do the [open filename.avi( it shows:

===
pix_filmNEW : openMessCallback
closing 8 handles
close 7
close 6
close 5
close 4
close 3
close 2
close 1
close 0
closed
opening C:/membranaPDL/GEM/cuco00.avi with format 1908
trying handle 0: 1484420
AVI failed ... 
trying handle 1: 14844D8
movie size x:720 y:576
got handle = 14844D8
GEM: pix_film: Loaded file: C:/membranaPDL/GEM/cuco00.avi with 45 frames
(720x576) at 1.000000 fps
===


Does perhaps that "AVI FAILED" mean that it failed using directshow and
resorts to quicktime?????

(Does this make sense at all?)


Thanks a lot
m.






--------- Original Message --------
Da: "chris clepper" <cgclepper at gmail.com>
To: 
Cc: gem-dev at iem.at
Oggetto: Re: [GEM-dev] can't get pix_movie working (follow-up)
Data: 15/06/07 19:45



Do you have another DV codec installed? The settings for the MS are
correct, but DirectShow could be using another codec.

I don't know about the PicVideo codec. I use ffdshow libavcodec for
MJPEG which works pretty well.

On 6/15/07, Matteo.sistisette <matteo.sistisette at email.it> wrote:
> Hi,
> Thanks a lot for your help
>
> > There is a DirectShow setting for DV quality and it defualts to
> > quarter resolution on some systems. The code for pix_movie tries to
> > force the quality to the highest and that works in my testing.
>
> Definitely sounds like that's my problem, or somehow related.
> It must be decoding at half or quarter resolution (I'd say half), so
> pix_movie's attempt to
> force the quality to the highest is failing in my case.
>
> > You
> > can try to alter the default using the GraphEdit tool in the
> > DirectShow SDK or find the registry value for it.
>
> I'm not sure how to do that.
> I downloaded this application:
> http://www.digital-digest.com/dvd/downloads/graphedit.html
> I don't know if it is the graphedit you're talking about and whether it
was
> already installed.
> Following the direction I found in a forum
> (http://forum.doom9.org/archive/index.php/t-34818.html) I've been able to
> "insert" a DirectShow DV Decoder filter, right-click on it / "properties".
> In the abovementioned forum post, it was claimed that just by selecting
> "full" as the resolution and doing apply and close, it would cause
> DirectShow to use that default with any application.
> I found the setting was already on "full". However, I did apply, but it
had
> no effect on GEM. It still renders at reduced resolution.
>
> By the way, both Virtual Dub and Windows Media Player decode DV files at
> full resolution and always did so on this machine.
>
> I also tried to search for the key in the windows registry but had no
luck.
> I searched for "DV" (too many matches: aDVanced etc etc), "DirectShow",
> "quality", but I didn't find it.
> Any clue?
>
> Thanks a lot
> matteo
>
>
> P.S. avis coded with PicVideo MJPEG with 1:1:1 subsampling are decoded
fine,
> but if I code them with 4:2:2 subsampling, GEM crashes (closes PD without
> even opening the typical windows crash dialog) when trying to play them.
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> In REGALO 'All the Good Thing' di NELLY FURTADO
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6617&d=20070615
>
>
> 
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
KILL BILL! scarica la colonna sonora del film: è in REGALO!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6614&d=20070618 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Se ci fossi tu a gestire un team di f1 o di motogp saresti più bravo  
di Briatore?Dimostracelo! Entra nel mondo dei nostri fantasy games!Vieni a
giocare

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6238&d=20070618






More information about the GEM-dev mailing list