OpenShot Video Editor
2.0.0
Main Page
Namespaces
Classes
Files
File List
src
classes
legacy
openshot
classes
clip.py
Go to the documentation of this file.
1
##
2
#
3
# @file
4
# @brief This file is for legacy support of OpenShot 1.x project files
5
# @author Jonathan Thomas <jonathan@openshot.org>
6
#
7
# @section LICENSE
8
#
9
# Copyright (c) 2008-2018 OpenShot Studios, LLC
10
# (http://www.openshotstudios.com). This file is part of
11
# OpenShot Video Editor (http://www.openshot.org), an open-source project
12
# dedicated to delivering high quality video editing and animation solutions
13
# to the world.
14
#
15
# OpenShot Video Editor is free software: you can redistribute it and/or modify
16
# it under the terms of the GNU General Public License as published by
17
# the Free Software Foundation, either version 3 of the License, or
18
# (at your option) any later version.
19
#
20
# OpenShot Video Editor is distributed in the hope that it will be useful,
21
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
# GNU General Public License for more details.
24
#
25
# You should have received a copy of the GNU General Public License
26
# along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
27
#
28
29
import
uuid
30
from
classes.legacy.openshot.classes
import
keyframe
31
32
33
##
34
# This class represents a media clip on the timeline.
35
class
clip
:
36
37
# ----------------------------------------------------------------------
38
##
39
# Constructor
40
def
__init__
(self, clip_name, color, position_on_track, start_time, end_time, parent_track, file_object):
41
42
# init variables for clip object
43
self.
name
= clip_name
# the name of the clip
44
self.
color
= color
# the color of the clip, used to organize clips
45
self.
start_time
= start_time
# the time in seconds where we start playing a clip
46
self.
end_time
= end_time
# the time in seconds where we stop playing a clip
47
self.
speed
= 1.0
# the rate of playback (this will change if you want to slow down or speed up the clip)
48
self.
max_length
= 0.0
# this is the max length of the clip in seconds
49
self.
position_on_track
= float(
50
position_on_track)
# the time in seconds to start playing the clip relative to the track
51
self.
play_video
=
True
52
self.
play_audio
=
True
53
self.
fill
=
True
54
self.
distort
=
False
55
self.
composite
=
True
56
self.
halign
=
"centre"
57
self.
valign
=
"centre"
58
self.
reversed
=
False
59
self.
volume
= 100.0
60
self.
audio_fade_in
=
False
61
self.
audio_fade_out
=
False
62
self.
audio_fade_in_amount
= 2.0
63
self.
audio_fade_out_amount
= 2.0
64
self.
video_fade_in
=
False
65
self.
video_fade_out
=
False
66
self.
video_fade_in_amount
= 2.0
67
self.
video_fade_out_amount
= 2.0
68
self.
parent
= parent_track
# the parent track this clip lives on
69
self.
file_object
= file_object
# the file object that this clip is linked to
70
self.
unique_id
= str(uuid.uuid1())
71
self.
rotation
= 0.0
72
self.
thumb_location
=
""
73
74
# init key-frame dictionary
75
self.
keyframes
= {
"start"
:
keyframe
(0, 100.0, 100.0, 0.0, 0.0, 1.0),
76
"end"
:
keyframe
(-1, 100.0, 100.0, 0.0, 0.0, 1.0)}
77
78
# init effects dictionary
79
self.
effects
= []
80
81
# init vars for drag n drop
82
self.
drag_x
= 0.0
83
self.
drag_y
= 0.0
84
self.
moved
=
False
85
self.
is_timeline_scrolling
=
False
clip.clip.valign
valign
Definition:
clip.py:57
clip.clip.rotation
rotation
Definition:
clip.py:71
clip.clip.composite
composite
Definition:
clip.py:55
clip.clip.file_object
file_object
Definition:
clip.py:69
clip.clip.audio_fade_out
audio_fade_out
Definition:
clip.py:61
clip.clip.drag_x
drag_x
Definition:
clip.py:82
clip.clip.color
color
Definition:
clip.py:44
clip.clip.video_fade_out_amount
video_fade_out_amount
Definition:
clip.py:67
clip.clip.unique_id
unique_id
Definition:
clip.py:70
clip.clip.parent
parent
Definition:
clip.py:68
clip.clip.name
name
Definition:
clip.py:43
clip.clip.audio_fade_in
audio_fade_in
Definition:
clip.py:60
clip.clip.volume
volume
Definition:
clip.py:59
keyframe
Definition:
keyframe.py:1
clip.clip.end_time
end_time
Definition:
clip.py:46
clip.clip.position_on_track
position_on_track
Definition:
clip.py:49
clip.clip.__init__
def __init__
Constructor.
Definition:
clip.py:40
clip.clip.effects
effects
Definition:
clip.py:79
clip.clip.speed
speed
Definition:
clip.py:47
clip.clip.play_audio
play_audio
Definition:
clip.py:52
clip.clip.thumb_location
thumb_location
Definition:
clip.py:72
clip.clip.reversed
reversed
Definition:
clip.py:58
clip.clip.play_video
play_video
Definition:
clip.py:51
clip.clip.video_fade_in
video_fade_in
Definition:
clip.py:64
clip.clip.video_fade_in_amount
video_fade_in_amount
Definition:
clip.py:66
clip.clip.fill
fill
Definition:
clip.py:53
clip.clip.audio_fade_in_amount
audio_fade_in_amount
Definition:
clip.py:62
clip.clip.moved
moved
Definition:
clip.py:84
clip.clip.halign
halign
Definition:
clip.py:56
clip.clip.keyframes
keyframes
Definition:
clip.py:75
clip.clip.max_length
max_length
Definition:
clip.py:48
clip.clip.video_fade_out
video_fade_out
Definition:
clip.py:65
clip.clip.is_timeline_scrolling
is_timeline_scrolling
Definition:
clip.py:85
clip.clip.audio_fade_out_amount
audio_fade_out_amount
Definition:
clip.py:63
clip.clip
This class represents a media clip on the timeline.
Definition:
clip.py:35
clip.clip.drag_y
drag_y
Definition:
clip.py:83
clip.clip.distort
distort
Definition:
clip.py:54
clip.clip.start_time
start_time
Definition:
clip.py:45
Generated on Thu Mar 21 2019 08:17:08 for OpenShot Video Editor by
1.8.6