|
@@ -1,13 +1,16 @@
|
|
|
#!/usr/bin/env python3
|
|
|
import openshot
|
|
|
+import sys
|
|
|
|
|
|
-
|
|
|
+if len(sys.argv)<=1:
|
|
|
+ print('not enough parameters')
|
|
|
+ sys.exit()
|
|
|
+fname=sys.argv[1]
|
|
|
head= openshot.FFmpegReader("/home/jared/logo_audio.mp4")
|
|
|
head.Open() # Open the reader
|
|
|
-
|
|
|
-
|
|
|
# Create an FFmpegReader
|
|
|
-r = openshot.FFmpegReader("/var/video/6320757395.mp4")
|
|
|
+#r = openshot.FFmpegReader("/var/video/6320757395.mp4")
|
|
|
+r = openshot.FFmpegReader("/var/video/"+fname)
|
|
|
|
|
|
r.Open() # Open the reader
|
|
|
r.DisplayInfo() # Display metadata
|
|
@@ -26,14 +29,13 @@ ck=openshot.ChromaKey(col, openshot.Keyframe(170))
|
|
|
#ck.End(60)
|
|
|
|
|
|
# Set up Writer
|
|
|
-w = openshot.FFmpegWriter("/var/video/s1/6320757395.mp4")
|
|
|
+#w = openshot.FFmpegWriter("/var/video/s1/6320757395.mp4")
|
|
|
+w = openshot.FFmpegWriter("/var/video/s1/"+fname)
|
|
|
|
|
|
#w.SetAudioOptions(True, "libmp3lame", r.info.sample_rate, r.info.channels, r.info.channel_layout, 128000)
|
|
|
#w.SetAudioOptions(True, "libmp3lame", 44100, 1, r.info.channel_layout, 128000)
|
|
|
#w.SetAudioOptions(True, "aac", 44100, 2, openshot.LAYOUT_STEREO, 128000)
|
|
|
w.SetAudioOptions(True, "aac", 44100, 2, openshot.LAYOUT_STEREO, 3000000)
|
|
|
-
|
|
|
-
|
|
|
#w.SetVideoOptions(True, "libx264", openshot.Fraction(30000, 1000), 1280, 720,
|
|
|
# openshot.Fraction(1, 1), False, False, 3000000)
|
|
|
|