jlesage / docker-handbrake

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

[Bug] Watch folder stops after 1 file #280

Open danmartyn opened 1 year ago

danmartyn commented 1 year ago

Current Behavior

When I start the container, with multiple files in the watch folder, it will process the first one, then not continue with the next files. As well, in the logs it says the original file was removed, but its not actually removed.

Expected Behavior

All the files in the watch folder should be encoded and then removed.

Steps To Reproduce

No response

Environment

Container creation

Created in Unraid

Container log

╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           HandBrake                                     │
    │ Application Version:   1.6.1                                         │
    │ Docker Image Version:  23.02.1                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[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 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'autovideoconverter'...
[supervisor  ] all services loaded.
[supervisor        ] starting services...
[supervisor        ] starting service 'xvnc'...
[xvnc              ] Xvnc TigerVNC 1.12.0 - built Feb 14 2023 01:01:21
[xvnc              ] Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
[xvnc              ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc              ] Underlying X server release 12013000, The X.Org Foundation
[xvnc              ] Mon Jul 24 22:57:23 2023
[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 'nginx'...
[nginx             ] Listening for HTTP connections on port 5800.
[supervisor        ] starting service 'openbox'...
[supervisor        ] starting service 'app'...
[supervisor        ] starting service 'autovideoconverter'...
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Skipping video '/watch/Futurama - S11E02 - 1080p.mkv' (ebaf732f7688af580d7540ef9f5a793f): already processed successfully.
[autovideoconverter] Waiting 5 seconds before processing '/watch/Futurama - S11E01 - 1080p.mkv'...
[supervisor        ] all services started.
[autovideoconverter] Starting conversion of '/watch/Futurama - S11E01 - 1080p.mkv' (5e3a45c66572893c4d35d11e4866a637) using preset 'General/Very Fast 1080p30'...
[autovideoconverter] 1 title(s) to process.
[autovideoconverter] Executing pre-conversion hook...
[autovideoconverter] Pre-conversion hook exited with 0
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 4.39 %
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 8.49 % (386.95 fps, avg 419.12 fps, ETA 00h01m17s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 14.29 % (561.92 fps, avg 462.01 fps, ETA 00h01m06s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 20.61 % (625.66 fps, avg 504.63 fps, ETA 00h00m55s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 25.72 % (522.27 fps, avg 507.74 fps, ETA 00h00m52s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 31.64 % (573.31 fps, avg 515.82 fps, ETA 00h00m47s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 37.28 % (581.54 fps, avg 524.01 fps, ETA 00h00m43s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 43.13 % (578.20 fps, avg 527.28 fps, ETA 00h00m38s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 49.25 % (599.67 fps, avg 536.03 fps, ETA 00h00m33s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 54.89 % (549.74 fps, avg 537.22 fps, ETA 00h00m30s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 60.55 % (548.62 fps, avg 539.46 fps, ETA 00h00m25s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 66.17 % (553.52 fps, avg 540.47 fps, ETA 00h00m22s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 71.91 % (559.03 fps, avg 541.73 fps, ETA 00h00m18s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 77.69 % (565.00 fps, avg 543.16 fps, ETA 00h00m15s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 83.44 % (564.10 fps, avg 544.72 fps, ETA 00h00m11s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 88.83 % (518.86 fps, avg 543.34 fps, ETA 00h00m08s)
[autovideoconverter] Encoding /watch/Futurama - S11E01 - 1080p.mkv: task 1 of 1, 94.87 % (589.24 fps, avg 546.26 fps, ETA 00h00m03s)
[autovideoconverter] Executing post-conversion hook...
[autovideoconverter] copied '/output/Futurama - S11E01 - 1080p.mp4' -> '/storage/user/Media/TV Shows/Futurama/Season 11/Futurama - S11E01 - 1080p.mp4'
[autovideoconverter] removed '/output/Futurama - S11E01 - 1080p.mp4'
[autovideoconverter] Post-conversion hook exited with 0
[autovideoconverter] Conversion ended successfully.

Container inspect

No response

Anything else?

No response

jlesage commented 1 year ago

Please provide the output of docker inspect <container name> so we can have a complete picture of how the container has been configured.

Also, the output of the following command would be useful to see if there is any permission issue:

docker exec <container name> ls -l /watch
ennisj commented 1 year ago

Wanted to mention, I have run into this same issue, and determined what was causing it was the rm command for removing the source file after conversion. The rm is failing due to not having the appropriate write permission to remove the file, so that's the key to fixing the issue. That said, this error could be handled more gracefully so that processing can continue.

jlesage commented 11 months ago

Did you get an error in the log ? The script should not stop because of a removal failure.