There is no limit to the file size. Encoding requires more time and resources than decoding. I had did a test, a month ago. Tested with 2.61 GB file, my computer with 12 GB ram took over 45 seconds to encode. So, it depends on your’s phone.
Remember that due to some unknown reason, if you have the result image more than like GB then it might not be viewable but not corrupted.