I need a script written in Python which will serve to look for video files saved to the designated location and send them to FFMPEG for video downscaling. It will continuously run in the background and will scan a designated location for video files, determine the resolution/FPS of the video, and if they meet or exceed a certain parameter, need to downscale the videos to a suitable format. FFMPEG should be used for all actual downscaling activity, the script just needs to keep track of determining which files need to be sent to FFMPEG and when.
Here are my specific requirements:
- Must be written in Python
- Must support FFMPEG for all downscaling activity
- Must be able to be configured to continuously run in background. In configuration it can check for videos every X number of minutes.
- The script must check the file to make sure another program is not writing to it. If the file is in use then need to skip the video.
- User must be able to specify the parameters (a config file would be ideal) - minimum FPS to qualify for downscaling, minimum resolution to qualify for downscaling, target downscale resolution/FPS/format. Actual conversion parameters can be specified using standard FFMPEG arguments that the user can edit either directly in the script or in the config file. Pre-configured should be H.264 video format, 1080p @ 30fps.
- The script should keep track of the filenames of videos that have been successfully converted, so that it does not keep converting the same videos over and over. This will also mean the script needs to know whether FFMPEG was able to successfully convert the video. If a video is failed by FFMPEG after X number of retries, then the script should keep a log somewhere and not attempt to re-convert the video.
- The script should support writing downscaled videos to the same location as source (using a prefix or suffix on the file name) or to a different location (with optional prefix/suffix) depending on user preference.
- Must be able to run on either Windows or Linux. For example if I run the script on a Windows machine it should support Windows paths, or Linux machine must support Linux paths. (It is OK if the paths need to be modified/written in a certain way by user, as long as instructions are provided)
6 freelancere byder i gennemsnit $67 timen for dette job
I know Python, and can provide the srcipt will all of the features you need. You will ahve to install FFMPEG on your own. Script will just use a path to ffmpeg binary.
Hi there, I have 10+ years of python programming, also worked with python to ffmpeg bindings. I know how to develop the tool you need and will be happy to help with it. regards,