If you import these in to Flame they seem to cause a crash, and the project is then unopenable. Not always it seems, because I was using them for a while before it happened, but it’s happened twice now. I guess some combination of dodgy characters. Anyway rename them before importing. Annoying cos there’s some v useful info in that long name.
Ater crash, maybe corrupted clip is still in opened desktop and it blocks the starting process of flame. But can you open flame from other project? You can delete corrupted clips via mediahub/Projects from other project.
If not, if I remember, there is a command option to start flame with a new and blank desktop. But I can’t find the link. Here is the link for startup options but it’s for 2016. The only thing I could find. There is an option to start flame creating a new desktop. Maybe it coud be usefull.
Another more drastic option y recover a previous version of the workspace backup files and trust in to recover one prior to importing that clip. As usual, be carefull because it is a critical procedure,
About names, I would replace %20 and so characters by underscores “_”
Yeah luckily the dodgy clip was flagged in the shell. The clip was named according to the shot it was being used in “SH15 etc”
So I was able to start a new project, and pull all the batches over apart from SH15. Then for 15 I just loaded the batch setup from the prev days archive. So not a huge amount of time lost. But still a hassle.
Yeah now we’re fully renaming all clips, the running through topaz, to upscale and make ProRes, so hopefully less sketchy.
Here is a bash script that you can use to convert a whole bunch of weirdly named MP4 files so that they play nice with other systems.
#!/bin/bash
# Function to get the directory of this script
get_script_path() {
echo "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
}
# Define a function to decode URL-encoded strings
urldecode() {
local url_encoded="$1"
local decoded="${url_encoded//+/ }"
printf '%b' "${decoded//%/\\x}"
}
# Define a function to make a string POSIX compliant
make_posix_compliant() {
local string="$1"
# Replace any character that is not a letter, number, dot, or underscore with an underscore
echo "$string" | tr -c '[:alnum:]._' '_'
}
# Function to choose a folder using a GUI file browser
choose_folder() {
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
chosen_folder=$(osascript -e 'tell application "Finder" to POSIX path of (choose folder with prompt "Select the folder to process:")')
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
chosen_folder=$(zenity --file-selection --directory --title="Select the folder to process")
else
echo "Unsupported OS: $OSTYPE"
exit 1
fi
# Check if the folder was chosen
if [[ -z "$chosen_folder" ]]; then
echo "No folder chosen. Exiting."
exit 1
fi
}
# Get the folder to process
choose_folder
# Iterate over each .mp4 file in the chosen directory
for file in "$chosen_folder"/*.mp4; do
if [[ -f "$file" ]]; then
# Get the base filename
base_filename=$(basename "$file")
# Decode the URL-encoded filename
decoded_filename=$(urldecode "$base_filename")
# Make the decoded filename POSIX compliant
posix_compliant_filename=$(make_posix_compliant "$decoded_filename")
# Rename the file if the new name is different
if [[ "$base_filename" != "$posix_compliant_filename" ]]; then
mv "$file" "$chosen_folder/$posix_compliant_filename"
echo "Renamed '$base_filename' to '$posix_compliant_filename'"
fi
fi
done
Save it somewhere as ‘convert_url_names.sh’ and then run