Skip to content
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

fails to process when filename/path has ":" #4

Open
vortex91 opened this issue Aug 26, 2023 · 4 comments
Open

fails to process when filename/path has ":" #4

vortex91 opened this issue Aug 26, 2023 · 4 comments

Comments

@vortex91
Copy link

im not sure how to fix. but if my filename and/or path has : or ' it failes to run

@joe2707
Copy link

joe2707 commented Dec 3, 2023

I'm also experiencing this, is there something we can do to make this work ? Thanks

@edwhardo
Copy link

edwhardo commented Oct 24, 2024

It fails when passing the filename to ffmpeg to do the subtitle extraction. The recommendation is to use ffescape.
I use a docker version of jellyfin, and it doesn't have that file, so I had to compile it.
Then you have to add a few things to the script.

  1. define variable for ffescape just under ffmpeg

Set ffmpeg path to Jellyfin ffmpeg

__ffmpeg="$(which ffmpeg || echo '/usr/lib/jellyfin-ffmpeg/ffmpeg')"
__ffprobe="$(which ffprobe || echo '/usr/lib/jellyfin-ffmpeg/ffprobe')"
__ffescape="$(which ffescape || echo '/config/comskip/ffescape')"
__ffescape_opts="-l2 -p '' -f strict -m backslash -s\,\'\:"
  1. Define a new file variable that is escaped. I define a new base too, but it doesn't seem to be needed
__dir="$(dirname "${__path}")"
__file="$(basename "${__path}")"
__base="$(basename "${__path}" ".ts")"
__ff_file="$(echo "${__file}" | $__ffescape $__ffescape_opts)"
__ff_base="$(echo "${__base}" | $__ffescape $__ffescape_opts)"
  1. Use the new file variable (in my case $__ff_base) in calls to ffmpeg subtitle extraction. Not needed for muxing or transcoding.
#$__ffmpeg -f lavfi -i movie="${__file}[out+subcc]" -map 0:1 "${__base}.en.srt"
$__ffmpeg -f lavfi -i movie="${__ff_file}[out+subcc]" -map 0:1 "${__base}.en.srt"

and perhaps even the transcoding, but I'm only remuxing and it works fine with ${__file} as input

@mattdsteele
Copy link

@edwhardo I'm working through a similar issue. Where did your ffescape binary come from? My ffmpeg install didn't include it, and it isn't in any of the Ubuntu repos or the comskip binary I compiled. Did you compile ffmpeg from source to generate the utils?

@edwhardo
Copy link

@edwhardo I'm working through a similar issue. Where did your ffescape binary come from? My ffmpeg install didn't include it, and it isn't in any of the Ubuntu repos or the comskip binary I compiled. Did you compile ffmpeg from source to generate the utils?

@mattdsteele I downloaded and compiled jellyfin-ffmpeg-6.0.1-8. It is still working on 10.10.x even though that uses jellyfin-ffmpeg-7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants