openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00484
[Branch ~openshot.code/openshot/main] Rev 675: More changes to help prevent transition glitches.
------------------------------------------------------------
revno: 675
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Wed 2012-05-23 15:58:02 +0100
message:
More changes to help prevent transition glitches.
Also use the project profile for the thumbnail producer when importing files, to ensure the correct (or most likely) fps is used.
modified:
openshot/classes/clip.py
openshot/classes/thumbnail.py
--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main
Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/classes/clip.py'
--- openshot/classes/clip.py 2012-05-22 20:04:06 +0000
+++ openshot/classes/clip.py 2012-05-23 14:58:02 +0000
@@ -416,16 +416,16 @@
producer.setAttribute("id", self.unique_id)
producer.setAttribute("novdpau", "1")
producer.setAttribute("in", str(int(round(in_frame_number))))
- # need to set the out & length producer properties to prevent glitches
+ # need to set the out & length producer properties to prevent odd frame glitches
if out_frame_number + 1 >= self.file_object.max_frames:
- producer.setAttribute("out", str(int(round(self.file_object.max_frames - 1))))
+ producer.setAttribute("out", str(int(round(self.file_object.max_frames))))
elif (out_frame_number >= self.file_object.max_frames):
- producer.setAttribute("out", str(int(round(self.file_object.max_frames - 1))))
+ producer.setAttribute("out", str(int(round(self.file_object.max_frames))))
else:
producer.setAttribute("out", str(int(round(out_frame_number))))
if self.parent.name != "Background Track":
- producer.setAttribute("length", str(int(round(self.file_object.max_frames))))
+ producer.setAttribute("length", str(int(round(self.file_object.max_frames + 1))))
# hide video (if needed)
if self.play_video == False or self.parent.play_video == False:
=== modified file 'openshot/classes/thumbnail.py'
--- openshot/classes/thumbnail.py 2012-04-16 19:44:17 +0000
+++ openshot/classes/thumbnail.py 2012-05-23 14:58:02 +0000
@@ -68,7 +68,7 @@
self.thumbnail_path = project_path + "/thumbnail/" + uniqueFileBaseName + "_" + fileExtension + "_%d.png"
# set the profile
- self.profile = mlt.Profile("quarter_ntsc")
+ self.profile = profiles.mlt_profiles(self.project).get_profile(self.project.project_type) #mlt.Profile("quarter_ntsc")
else:
if new_file_base_name == None or new_file_base_name == fileBaseName:
@@ -105,7 +105,7 @@
# set some consumer properties
self.c.set("real_time", 0)
self.c.set("vcodec", "png")
-
+
# determine length of clip in seconds
producer_fps = float(self.p.get_fps())
first_frame = int(round(producer_fps * start_time))