abctaylor / nextcloud-mov-2-mp4 Goto Github PK
View Code? Open in Web Editor NEWAn automatic script to convert mov files to mp4, re-index the Nextcloud database and clean up afterwards
License: MIT License
An automatic script to convert mov files to mp4, re-index the Nextcloud database and clean up afterwards
License: MIT License
That's what I get when I try to run mov-2-mp4.sh:
$ sudo ./mov-2-mp4.sh
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
How can I fix this?
My settings:
# Variables
root_folder="/data/nextcloud/" # Where to scan
installation_path="/var/www/html" # Full path where nextcloud is installed, must not end with '/'
old_extension=".mov" # e.g. ".mov"
new_extension=".mp4" # e.g. ".mp4"
safe_mode=true # true = rename file to .mov-old, false = permanently delete old .mov file
ignoregrep="" # Ignore stderr messages from find that match this grep (e.g. 'Permission denied' for some folder name)
instance_id=$(openssl rand -hex 4)
append_extension=-wip-$instance_id
~# bash /mnt/dietpi_userdata/downloads/mov-2-mp4.sh
/mnt/dietpi_userdata/downloads/mov-2-mp4.sh: line 1: syntax error near unexpected token newline' /mnt/dietpi_userdata/downloads/mov-2-mp4.sh: line 1:
'
I'm not sure exactly where the script is hanging but I believe its in the following function
echo "Updating Folders"
for i in "${folders_to_update[@]}"
do
echo "Processing ${i}"
:
php $installation_path/occ files:scan --path="$i"
done
echo "Done Updating"
I had to kill the running script. In addition I re-ran the php occ files:scan directive manually I really just ran it like the following
php -u www occ files:scan --all
Anyway I looked at the converted mp4 files after the conversion. Many were great. About 20% of the converted files wouldn't open. I have no idea what the issue was. A few of them played for about 5 seconds and then stopped where as the original .mov file played for about 1 minute. Not sure if you could help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.