-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpv_identify script broken #15782
Labels
Comments
Try applying this patch and see if this fixes the issue: diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh
index fa0e134937..c1bbe1cd5d 100755
--- a/TOOLS/mpv_identify.sh
+++ b/TOOLS/mpv_identify.sh
@@ -94,7 +94,7 @@ EOF
local key
for key in $allprops; do
propstr="${propstr}X-MIDENTIFY: $key \${=$key}$LF"
- key="$(printf '%s\n' "$key" | tr - _)"
+ key="$(printf '%s\n' "$key" | tr /- _)"
unset "$nextprefix$key"
done
@@ -112,7 +112,7 @@ EOF
fileindex="$((fileindex+1))"
nextprefix="${nextprefix}${fileindex}_"
for key in $allprops; do
- key="$(printf '%s\n' "$key" | tr - _)"
+ key="$(printf '%s\n' "$key" | tr /- _)"
unset "$nextprefix$key"
done
else
@@ -126,7 +126,7 @@ EOF
local key="${line#X-MIDENTIFY: }"
local value="${key#* }"
key="${key%% *}"
- key="$(printf '%s\n' "$key" | tr - _)"
+ key="$(printf '%s\n' "$key" | tr /- _)"
if [ -n "$nextprefix" ]; then
if [ -z "$prefix" ]; then
echo >&2 "Got X-MIDENTIFY: without X-MIDENTIFY-START:" |
Traneptora
added a commit
to Traneptora/mpv
that referenced
this issue
Feb 1, 2025
Property names contain '-' characters, which are translated into underscores because POSIX shell variables cannot contain hyphens. We should do the same thing for forward slash characters (i.e. '/') because these also cannot be present in the names of shell variables. Fixes: mpv-player#15782
Traneptora
added a commit
to Traneptora/mpv
that referenced
this issue
Feb 4, 2025
Property names contain '-' characters, which are translated into underscores because POSIX shell variables cannot contain hyphens. We should do the same thing for forward slash characters (i.e. '/') because these also cannot be present in the names of shell variables. Fixes: mpv-player#15782
kasper93
pushed a commit
that referenced
this issue
Feb 5, 2025
Property names contain '-' characters, which are translated into underscores because POSIX shell variables cannot contain hyphens. We should do the same thing for forward slash characters (i.e. '/') because these also cannot be present in the names of shell variables. Fixes: #15782
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mpv Information
Other Information
Reproduction Steps
This isn't really a problem with mpv per se, but with the
mpv_identify.sh
helper script fromTOOLS
.Currently the following happens:
My guess is that due to how variable expansion works in Bash, putting
video-params/aspect
inlocal allprops
broke stuff. The issue is most like the forward slash and how Bash interprets it. As far as I understand the script, the entries fromallprops
are used to construct environment variable names.Since I mainly use the identify script on audio files, I have just removed the "offending" line. Which lets things work again.
Not sure how to properly fix this. Most likely the entries from
allprops
need to be sanitized in some way, before the envvar names can be constructed.With best wishes,
Tobias
Expected Behavior
Calling
mpv_identify.sh
should not trigger a Bash error.Actual Behavior
Calling mpv_identify.sh triggers a Bash error.
Log File
Nothing here.
Sample Files
Nothing here
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.The text was updated successfully, but these errors were encountered: