After noticing that some recorded video captures were not being uploaded using Gdrive, I peeked in the logs and saw several errors about files exceeding the maximum file size for upload: 128MB.
I noticed this is not configurable and is hard coded into uploadservices.py
MAX_FILE_SIZE = 128 * 1024 * 1024 # 128 MB
Is there any reason this max file size should not be increased? Is it possible for a user like me who is using one of the motionEyeOS SD card images to increase this limit, or would I need to edit the source and build from scratch? I missed some videos due to this limit and I'd like to make sure that doesn't happen again.
By all means you can change it to whatever you want, unfortunately when Calin releases new version of MotionEye it will be overwritten to whatever he sets at the time.
EDIT: If you are using MotionEye not the MotionEye OS you can mount Google Drive locally, so all the files could be saved directly there instead of uploading.
EDIT2: Something along them lines: https://www.maketecheasier.com/mount-google-drive-ubuntu/
Thanks.
I'm using the MotionEye OS so I guess I wouldn't be able to do that. Is there any way for me to change it on my MotionEye OS system?
Just edit uploadservices.py on your MotionEye OS and change the value to what you need.
Ok.
But there isn't an uploadservices.py on my MotionEye OS. Just a compiled bytecode file called uploadservices.pyc.
root@meye-0103e1de /]# find . -name uploadservices*
./usr/lib/python2.7/site-packages/motioneye/uploadservices.pyc
./data/etc/uploadservices.json
That's why I was wondering if it was possible to adjust, or if I have to edit the source and recompile the OS to make my own image.
Are you sure that there is no such file as uploadservices.py in /usr/local/lib/python2.7/dist-packages/motioneye?
I could be wrong, as I have never used the MotionEye OS just MotionEye on Jessie/Ubuntu.
Yes, I'm sure. The filesystem structure is different on MotionEye OS. There is no /usr/local or dist-packages directory. The closest directory to the one you mentioned is the /usr/lib/python2.7/site-packages/motioneye directory, which contains the uploadservices.pyc file I mentioned, along with a bunch of other non-human-readable.pyc bytecode files:
__init__.pyc extractl.pyc mjpgclient.pyc prefs.pyc servicectl.pyc tasks.pyc utils.pyc wsswitch.pyc
boardctl.pyc handlers.pyc monitor.pyc relayevent.pyc settings.pyc template.pyc v4l2ctl.pyc
cleanup.pyc ipctl.pyc motionctl.pyc remote.pyc shell.pyc tzctl.pyc watchctl.pyc
config.pyc mediafiles.pyc ordereddict.pyc sendmail.pyc smbctl.pyc update.pyc webhook.pyc
diskctl.pyc meyectl.pyc powerctl.pyc server.pyc streameyectl.pyc uploadservices.pyc wifictl.pyc
The only .py files on my entire filesystem are:
./usr/bin/pilprint.py
./usr/bin/pilfont.py
./usr/bin/pildriver.py
./usr/bin/pilconvert.py
./usr/bin/event_rpcgen.py
./usr/bin/raspimjpeg.py
./usr/bin/pilfile.py
./usr/lib/libstdc++.so.6.0.20-gdb.py
Perhaps I can figure out a way to decompile the uploadservices.pyc file into a readable state, edit it, and recompile it. Or I can download the motioneyeos source and rebuild the OS to make my own image.
I'd like to suggest making the max file size a configurable option in the MotionEye user interface for future builds, if possible.
You can always branch the git out, make the changes and update it from
there.
Ok.
I should also probably be filing this issue under the motioneyeos repository, instead of motioneye.
Guys, this issue is a valid issue and it belongs with motionEye. I'll make sure to increase that value with in next version.
I was just editing it in my mobile, but that was rather awkward. Since you
are doing it yourself I shall leave it then.
Thanks.
https://github.com/ccrisan/motioneye/commit/07ccb8a1b77893d30cf655f241f08de5cf443484 increases MAX_FILE_SIZE to 1GB
Most helpful comment
Guys, this issue is a valid issue and it belongs with motionEye. I'll make sure to increase that value with in next version.