jlesage / docker-handbrake

Docker container for HandBrake
MIT License
855 stars 97 forks source link

[Bug] Automatic conversion not able to read UTF8 characters in folders/file names ( ' or & ) #352

Open Arturoe1 opened 5 months ago

Arturoe1 commented 5 months ago

Current Behavior

In automated conversion the Log shows message: [autovideoconverter] find: ‘/watch/TV Shows/Sh?gun (2024) {imdb-tt2788316}’: No such file or directory The name of the folder: Shōgun (2024) {imdb-tt2788316}

The automated conversion has trouble reading folders names with UTF8 characters. The parameter LANG is en_US.UTF8 This behavior does not happend when using the UI being able to perform the conversion correctly. The automated conversion works as expected when no UTF8 characters are in the name.

Expected Behavior

The autoamted conversion can read and keep the UTF8 characters on the name folders.

Steps To Reproduce

Create a folder with name: Shōgun (2024) {imdb-tt2788316} Today’s Menu for the Emiya Family (2017) {imdb-tt7954970}

run autoconversion - Error is shown in the logs.

Environment

Container creation

handbrake: image: jlesage/handbrake ports:

Container log

[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'gui'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'autovideoconverter'...
[supervisor  ] all services loaded.
[supervisor        ] starting services...
[supervisor        ] starting service 'xvnc'...
[xvnc              ] Xvnc TigerVNC 1.13.1 - built Dec 21 2023 00:54:05
[xvnc              ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc              ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc              ] Underlying X server release 12014000
[xvnc              ] Sun May 26 23:57:44 2024
[xvnc              ]  vncext:      VNC extension running!
[xvnc              ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc              ]  vncext:      Listening for VNC connections on all interface(s), port 5900
[xvnc              ]  vncext:      created VNC server for screen 0
[supervisor        ] starting service 'openbox'...
[supervisor        ] starting service 'nginx'...
[nginx             ] Listening for HTTP connections on port 5800.
[supervisor        ] starting service 'app'...
[supervisor        ] starting service 'autovideoconverter'...
[supervisor        ] all services started.
[autovideoconverter] find: ‘/watch/TV Shows/Sh?gun (2024) {imdb-tt2788316}’: No such file or directory

Container inspect

No response

Anything else?

This seems to be an issue with how the service read the folders and filenames as it is missing locale in the Alpine distribution. This cases issues when accessing folders with ' or & or similar characters. I would be great if the distirbution could also include the locales at least for en_en.UTF8 . This may be of help: https://github.com/Auswaschbar/alpine-localized-docker

This could also help to inlcude the locales in the dockerfile https://grrr.tech/posts/2020/add-locales-to-alpine-linux-docker-image/

jlesage commented 2 months ago

I don't seem to be able to reproduce:

[autovideoconverter] Change detected in watch folder '/watch'.
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Waiting 5 seconds before processing '/watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv'...
[autovideoconverter] Starting conversion of '/watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv' (25b67a048e7b858af4dc2d2a9e542939) using preset 'General/Very Fast 1080p30'...
[autovideoconverter] 1 title(s) to process.
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 10.87 %
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 22.94 % (157.50 fps, avg 150.01 fps, ETA 00h00m22s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 30.96 % (99.94 fps, avg 132.34 fps, ETA 00h00m23s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 42.92 % (152.19 fps, avg 134.39 fps, ETA 00h00m18s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 55.51 % (154.17 fps, avg 137.99 fps, ETA 00h00m14s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 66.58 % (130.90 fps, avg 136.85 fps, ETA 00h00m11s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 78.34 % (147.09 fps, avg 138.70 fps, ETA 00h00m07s)
[autovideoconverter] Encoding /watch/Shōgun (2024) {imdb-tt2788316}/sample_1280x720_surfing_with_audio.mkv: task 1 of 1, 88.34 % (131.05 fps, avg 137.78 fps, ETA 00h00m04s)
[autovideoconverter] Conversion ended successfully.
[autovideoconverter] Watch folder '/watch' processing terminated.

Maybe provide your docker inspect to see if there is anything that could interfere ?