Importing/loading movie and soundfiles

A forum dedicated to George scripting questions
Post Reply
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Importing/loading movie and soundfiles

Post by kaspar128 »

Hello,

I want to use a george-script to import an .avi moviefile into a layer.
I also want to import an audiolayer from a wav file using george.

how can I do this?
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Importing/loading movie and soundfiles

Post by Mike »

Hello kaspar128,

Here is the command to load a video file into a new layer :
_ tv_LoadSequence "file" [start number] [field] ["STRETCH"] ["TIMESTRETCH"]

The command to add a sound track into your clip:
_ tv_SoundClipNew "soundfilename"
into your storyboard:
_ tv_SoundProjectNew "soundfilename"
TVPaint Team
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Importing/loading movie and soundfiles

Post by kaspar128 »

Thanks for the reply,

I tried the ones mentioned above, but none of them seem to do anything.

Could it be the format?
the moviefile is an avi (mpeg4)
and the soundfile is a .wav-file (16-bit little endian)

or am I missing some more commands?
User avatar
ematecki
Site Admin
Posts: 2258
Joined: 15 Feb 2006, 14:32

Re: Importing/loading movie and soundfiles

Post by ematecki »

Can you load them via the File menu ?
If yes it's not a file format problem.
Quicktime is DEAD. Get over it and move on !
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Importing/loading movie and soundfiles

Post by kaspar128 »

It worked!! :D

I had to replace the backslashes with unix-style slashes in the filepathname...

C:/path/to/file.avi

instead of:

C:\path\to\file.avi

Now I run into another problem:
(edit:)

The pathname were the file is located is very long, and there are spaces in the pathname....

George won't import the file now..
Is there a workaround?

I'm working on windows 7 by the way.
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Importing/loading movie and soundfiles

Post by Mike »

To manage path with spaces, you must encapsulate the path between quotes like this:

tv_LoadSequence "c:/path with spaces/to/file with space.avi"
TVPaint Team
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Importing/loading movie and soundfiles

Post by kaspar128 »

Here is what I tried so far...
I broke the string in parts to make it readable:

Code: Select all

longpath = "Z:/very/Long_path_to/my/Workfolder"
spacedfolder = "/Folder With spaces"
tv_LoadSequence longpath""spacedfolder"/MyMoviefile.avi" "STRETCH"
When the path doesn't contain spaces(as some folders do), the moviefile gets imported.
Isn't there some sort of wildcard/ escape-character I can use to mark the use of spaces?

Anyway, thanks for all the support so far!! :D
It would be really cool if this works out because it will save me a LOT of time!
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18
Location: Viborg,Denmark
Contact:

Re: Importing/loading movie and soundfiles

Post by Mads Juul »

Try
'"/folder with spaces"'
Mads Juul
Storyboard Artist
blog: http://mjstoryboard.blogspot.dk/
Mail: mjstoryboard@gmail .com

Windows 10, 64 bit i7-4790 CPU 4.00 Hz,32 GB RAM, With TVP Animation 11 Pro (11.0.2-64bits)
2 Monitors 1920X1080 pixels + 1 Wacom Cintiq 21UX 2
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Importing/loading movie and soundfiles

Post by kaspar128 »

Alas, I tried the above but it still does nothing.. :(

Is there some console or debug-output somewhere in TVP, to check where it goes wrong?
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Importing/loading movie and soundfiles

Post by Mike »

This should work:

Code: Select all

longpath = "Z:/very/Long path with spaces to/my/Workfolder"
spacedfolder = "/Folder With spaces"
full = longpath""spacedfolder"/My Movie file with spaces.avi"

tv_LoadSequence '"'full'"' "STRETCH"
tv_warn result
Create a 'full' variable which contains all the pathfile.
And in the tv_LoadSequence, you can encapsulate the 'full' variable before and after with '"' (quote double-quote quote)
TVPaint Team
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Importing/loading movie and soundfiles

Post by kaspar128 »

:D IT WORKED!!! :D

I must hold my enthausiasm, but this is really cool!!
This really opens perspectives to save a lot of time.
Being able to automate lots of import/export/saving makes people happy!

Thanks for the great support Mike, and the rest of course!
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Importing/loading movie and soundfiles

Post by Mike »

:)
TVPaint Team
Post Reply