Hi Flavio,

the whole thing with the python script is just a quick-n-dirty hack to
get some sort of "proxy editing". I wrote it to be able to handle a larger
project in HDV, since Cinelerra doesn't support proxy editing natively.
Basically it just automates some search-and-replace I did
first using a text editor.

Since I am a coder, I considered to build it into Cinelerra itself of
course, but soon realized (again) this would be a major pain, because
Cinelerra internally hasn't anything like a component model, extension
points or similar "architectural stuff". Well, that's another story
(and you probably noted the "Cinelerra-3" project Cehteh and I started
to rework some internal parts of Cinelerra to improve on this situation).

So, to explain this workaround with the python script:

 - you create proxy clips from your footage (using some external app)
 - you load the proxy clips into your Cinelerra session as well, so
   for every Media you have an full res entry and a proxy entry within
   the same session.
 - at the bottom of every Cinelerra Session XML is a section, which
   contains your actual video and audio tracks and the clips on them.
   Each of this clips referes to some media entry /by name/
 - so, basically all we have to do, is to exchange this reference link,
   i.e. replace the name of the proxy media the name of the full
   res media in every clip on your video tracks.
 - now, because the proxy clips are smaller than the full res clips,
   some means to enlarge the proxy clips when displaying them would
   be nice. I used the camera automation for this. And to help with
   it, we have the "--scale" parameter in the script.

Am Montag, den 19.11.2007, 13:37 -0200 schrieb flavio:
>...., making the XML that has been generated by cinelerra point to the 
>original 
>HDV clips and to a HDV project. The python script whose link is at the manual 
>would then do this last part, of changing the XML and creating a backup of the
>original XML file. 
> 
generally speaking this is correct, but note: the script doesn't create
new media entries for proxy/or full res media. It works only, if you
have already loaded fullres and proxy version of every media into your
session.

> [EMAIL PROTECTED]:~/Desktop/testes hdv$ ./proxychange.py cinelerra.xml -from 
> `proxyfiles/(\w+)\.avi` -to `hdv/\1.toc`
> bash: command substitution: line 1: syntax error near unexpected token `\w+'
> 
> bash: command substitution: line 1: `proxyfiles/(\w+)\.avi'
> bash: hdv/1.toc: Arquivo ou diretório não encontrado
> 
what makes me suspicious here is the fact that your shell ("bash") has
anything to say here. Did you really use single quotes to enclose the
"--from" and the "--to" parameters? It is best to use single quotes
to prevent your shell from expanding or substituting anything here,
because we just want to pass on the regular expression patterns
unmodified to the script.

> Minidom wird gehackt....
you see, I should really clean up the script and remove my german 
debugging messages... :-P

...
> read session cinelerra.xml
...
> File "xml/dom/expatbuilder.py", line 207, in parseFile
> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 17, 
> column 99
> 
This just tells us that the XML parser (Expat) called by the python script 
bails out. He can't parse the Session file, because it is not 100% legal XML.
This is a notorious problem; cinlelerra uses a homebrew XML parser internally
and understands its own session files just fine in spite of them beeing not 100%
legal XML, but modern library parsers are quite picky (and it is a good idea to 
be 
pedantic with XML). Last summer, I made a patch to fix some of the often 
encountered errors in cinelerra's XML, but obviousely there are still more
of them to discover :-)

So, please look in line 17, column 99 of your session XML what's there!
Sometimes it's some character encoding problem, sometimes its a missing
closing tag or missing quotes.


> This part is not working but I could eventually edit the XML manually. I 
> tried 
> using the program meld to see the differences between a HDV and a DV project 
> files to see where I would have to change them in case I had to. 
Basically, thats a good idea. Knowing what's going on is helpfull for
using this hack altogether.

Make a simple new Session, load just 1 HDV media and the corresponding
proxy media. Delete everything but 1 single video track and place one
single clip on this track. Save it and look at it in the text editor
to understand the structure. You should find your video track at the
bottom, and you should see how it referes to the media entry....

Cheers,
Hermann Vosseler
(aka "Ichthyo")

_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra

Reply via email to