I eventually found out how to install 3.6.2, but when I run it, it still references 2.7?
I've copied what you did and changed the self.dir to my path and I'm getting an error that 's' isn't defined. As well as the other errors below.
pi@autocam:~/scripts $ python watchfile.py
Received created event - /home/pi/Videos/test/2017-08-21_16:17:17_360Video.mp4.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/api.py", line 199, in run
self.dispatch_events(self.event_queue, self.timeout)
File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/api.py", line 368, in dispatch_events
handler.dispatch(event)
File "/usr/local/lib/python2.7/dist-packages/watchdog/events.py", line 322, in dispatch
self.on_any_event(event)
File "watchfile.py", line 36, in on_any_event
command = "ffmpeg -i " % s
NameError: global name 's' is not defined
ok, after a little bit of playing I've changed the command line to this:
command = "ffmpeg -i %s -s 1920x1080 -i /home/pi/Videos/tff_overlay_1920x1080.png -filter_complex overlay=0:0 -b 4000000 -q:v 1 /home/pi/Videos/output.mp4" % event.src_path
call([command], shell=True)
the ffmpeg does run now, and I presume still using python 2.7. but how can I get it to save to a new directory but using the same filename? if I use the '%s' it will obviously save it to the directory it came from?
thanks