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

Uploading of a video results in no cover/thumbnail — "Failed to Move Cover file" — "[Errno 2] No such file of directory" #214

Closed
EMG70 opened this issue Jul 6, 2024 · 17 comments · Fixed by #225
Labels
bug Something isn't working question Further information is requested

Comments

@EMG70
Copy link

EMG70 commented Jul 6, 2024

Short Notice from the maintainer

After 6 years of more or less intensive programming on Calibre-Web, I need a break.
The last few months, maintaining Calibre-Web has felt more like work than a hobby. I felt pressured and teased by people to solve "their" problems and merge PRs for "their" Calibre-Web.
I have turned off all notifications from Github/Discord and will now concentrate undisturbed on the development of “my” Calibre-Web over the next few weeks/months.
I will look into the issues and maybe also the PRs from time to time, but don't expect a quick response from me.

Please also have a look at our Contributing Guidelines

Describe the bug/problem

A clear and concise description of what the bug is. If you are asking for support, please check our Wiki if your question is already answered there.

To Reproduce

Steps to reproduce the behavior:

  1. Go to ''https://www.youtube.com/watch?v=RMM5N63d2DI&list=PL2cADzwbKPk2JDfsxn6_-pDYfvCK9Fwfh&index=5"

  2. Numbers in the Teens They start with a 1!!!! song clipnabber com RMM5N63d2DI.mp4
    image

  3. Click on "yt-dlp -S res,ext:mp4:m4a --recode mp4 https://www.youtube.com/watch?v=RMM5N63d2DI&list=PL2cADzwbKPk2JDfsxn6_-pDYfvCK9Fwfh&index=5"

  4. Scroll down to '....'

  5. See error
    Screenshot from 2024-07-06 04-33-11
    Screenshot from 2024-07-06 04-33-30

[1] 14573
[2] 14574
root@ThinkCentre:/home/edwin# [youtube] Extracting URL: https://www.youtube.com/watch?v=RMM5N63d2DI
[youtube] RMM5N63d2DI: Downloading webpage
[youtube] RMM5N63d2DI: Downloading ios player API JSON
[youtube] RMM5N63d2DI: Downloading android player API JSON
[youtube] RMM5N63d2DI: Downloading m3u8 information
[info] RMM5N63d2DI: Downloading 1 format(s): 135+140
[download] Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI].mp4 has already been downloaded
[VideoConvertor] Not converting media file "Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI].mp4"; already is in target format mp4

Logfile
https://dpaste.com/6ELYQTMWW
Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.

Expected behavior
Video's thumbnail is expected to upload successfully.
Screenshot from 2024-07-06 04-29-53

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):
ubuntu@box:~$ hostnamectl
Static hostname: box
Icon name: computer-vm
Chassis: vm 🖴
Machine ID: 79caaeb597524b9d96fd39c79a3cbb18
Boot ID: efc8827b49a847ec90822a9ffe062cd3
Virtualization: kvm
Operating System: Ubuntu Oracular Oriole (development branch)
Kernel: Linux 6.8.0-31-generic
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC Q35 + ICH9, 2009
Firmware Version: unknown
Firmware Date: Wed 2022-02-02
Firmware Age: 2y 5month 2d

  • OS: [e.g. Windows 10/Raspberry Pi OS]
  • Python version: [e.g. python2.7]
  • Calibre-Web version: [e.g. 0.6.8 or 087c4c5 (git rev-parse --short HEAD)]:
  • Docker container: [None/LinuxServer]:
  • Special Hardware: [e.g. Rasperry Pi Zero]
  • Browser: [e.g. Chrome 83.0.4103.97, Safari 13.3.7, Firefox 68.0.1 ESR]

Additional context
Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]

@holta holta added the bug Something isn't working label Jul 6, 2024
@EMG70 EMG70 changed the title Uploading of a video fails if title contains an exclamation mark . Uploading of a video whose title contains an exclamation mark results in no cover/thumbnail . Jul 6, 2024
@holta
Copy link
Member

holta commented Jul 6, 2024

@EMG70 can you include both?

  1. The complete yt-dlp command you used to download the video
  2. The exact filename of the video (on your local machine) resulting from above

Errors from pastebin Lines 1016-1290 below:

COMMAND: /usr/bin/journalctl -u calibre-web | tail -100    # Calibre-Web systemd log

Jul 06 04:02:52 box python3[691]:     self._context.run(self._callback, *self._args)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/wsgi.py", line 156, in handle_request
Jul 06 04:02:52 box python3[691]:     app_response = await loop.run_in_executor(
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/platform/asyncio.py", line 266, in run_in_executor
Jul 06 04:02:52 box python3[691]:     return self.asyncio_loop.run_in_executor(executor, func, *args)
Jul 06 04:02:52 box python3[691]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 863, in run_in_executor
Jul 06 04:02:52 box python3[691]:     executor.submit(func, *args), loop=self)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/concurrent.py", line 62, in submit
Jul 06 04:02:52 box python3[691]:     future_set_result_unless_cancelled(future, fn(*args, **kwargs))
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 2213, in __call__
Jul 06 04:02:52 box python3[691]:     return self.wsgi_app(environ, start_response)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/reverseproxy.py", line 79, in __call__
Jul 06 04:02:52 box python3[691]:     return self.app(environ, start_response)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 2190, in wsgi_app
Jul 06 04:02:52 box python3[691]:     response = self.full_dispatch_request()
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
Jul 06 04:02:52 box python3[691]:     rv = self.dispatch_request()
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
Jul 06 04:02:52 box python3[691]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/usermanagement.py", line 34, in decorated_view
Jul 06 04:02:52 box python3[691]:     return func(*args, **kwargs)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 60, in inner
Jul 06 04:02:52 box python3[691]:     return f(*args, **kwargs)
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 272, in upload
Jul 06 04:02:52 box python3[691]:     error = helper.update_dir_structure(book_id,
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 736, in update_dir_structure
Jul 06 04:02:52 box python3[691]:     return update_dir_structure_file(book_id,
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 486, in update_dir_structure_file
Jul 06 04:02:52 box python3[691]:     error = move_files_on_change(calibre_path,
Jul 06 04:02:52 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 561, in move_files_on_change
Jul 06 04:02:52 box python3[691]:     log.debug("Moving title: %s to %s/%s", original_filepath, new_path)
Jul 06 04:02:52 box python3[691]: Message: 'Moving title: %s to %s/%s'
Jul 06 04:02:52 box python3[691]: Arguments: ('/tmp/calibre_web/0e698f63138363d99a2e257b6cf59380', '/library/calibre-web/Unknown/Days of the Week Sing-along Song _[spi77By9-iA] (14)')
Jul 06 04:09:02 box python3[691]: --- Logging error ---
Jul 06 04:09:02 box python3[691]: Traceback (most recent call last):
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/logging/handlers.py", line 73, in emit
Jul 06 04:09:02 box python3[691]:     if self.shouldRollover(record):
Jul 06 04:09:02 box python3[691]:        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/logging/handlers.py", line 196, in shouldRollover
Jul 06 04:09:02 box python3[691]:     msg = "%s\n" % self.format(record)
Jul 06 04:09:02 box python3[691]:                    ^^^^^^^^^^^^^^^^^^^
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
Jul 06 04:09:02 box python3[691]:     return fmt.format(record)
Jul 06 04:09:02 box python3[691]:            ^^^^^^^^^^^^^^^^^^
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/logging/__init__.py", line 703, in format
Jul 06 04:09:02 box python3[691]:     record.message = record.getMessage()
Jul 06 04:09:02 box python3[691]:                      ^^^^^^^^^^^^^^^^^^^
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/logging/__init__.py", line 392, in getMessage
Jul 06 04:09:02 box python3[691]:     msg = msg % self.args
Jul 06 04:09:02 box python3[691]:           ~~~~^~~~~~~~~~~
Jul 06 04:09:02 box python3[691]: TypeError: not enough arguments for format string
Jul 06 04:09:02 box python3[691]: Call stack:
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps.py", line 51, in <module>
Jul 06 04:09:02 box python3[691]:     main()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/main.py", line 83, in main
Jul 06 04:09:02 box python3[691]:     success = web_server.start()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/server.py", line 286, in start
Jul 06 04:09:02 box python3[691]:     self._start_tornado()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/server.py", line 272, in _start_tornado
Jul 06 04:09:02 box python3[691]:     self.wsgiserver.start()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/platform/asyncio.py", line 205, in start
Jul 06 04:09:02 box python3[691]:     self.asyncio_loop.run_forever()
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
Jul 06 04:09:02 box python3[691]:     self._run_once()
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
Jul 06 04:09:02 box python3[691]:     handle._run()
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
Jul 06 04:09:02 box python3[691]:     self._context.run(self._callback, *self._args)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/wsgi.py", line 156, in handle_request
Jul 06 04:09:02 box python3[691]:     app_response = await loop.run_in_executor(
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/platform/asyncio.py", line 266, in run_in_executor
Jul 06 04:09:02 box python3[691]:     return self.asyncio_loop.run_in_executor(executor, func, *args)
Jul 06 04:09:02 box python3[691]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 863, in run_in_executor
Jul 06 04:09:02 box python3[691]:     executor.submit(func, *args), loop=self)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/tornado/concurrent.py", line 62, in submit
Jul 06 04:09:02 box python3[691]:     future_set_result_unless_cancelled(future, fn(*args, **kwargs))
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 2213, in __call__
Jul 06 04:09:02 box python3[691]:     return self.wsgi_app(environ, start_response)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/reverseproxy.py", line 79, in __call__
Jul 06 04:09:02 box python3[691]:     return self.app(environ, start_response)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 2190, in wsgi_app
Jul 06 04:09:02 box python3[691]:     response = self.full_dispatch_request()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
Jul 06 04:09:02 box python3[691]:     rv = self.dispatch_request()
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
Jul 06 04:09:02 box python3[691]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/usermanagement.py", line 34, in decorated_view
Jul 06 04:09:02 box python3[691]:     return func(*args, **kwargs)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 60, in inner
Jul 06 04:09:02 box python3[691]:     return f(*args, **kwargs)
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 272, in upload
Jul 06 04:09:02 box python3[691]:     error = helper.update_dir_structure(book_id,
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 736, in update_dir_structure
Jul 06 04:09:02 box python3[691]:     return update_dir_structure_file(book_id,
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 486, in update_dir_structure_file
Jul 06 04:09:02 box python3[691]:     error = move_files_on_change(calibre_path,
Jul 06 04:09:02 box python3[691]:   File "/usr/local/calibre-web-py3/cps/helper.py", line 561, in move_files_on_change
Jul 06 04:09:02 box python3[691]:     log.debug("Moving title: %s to %s/%s", original_filepath, new_path)
Jul 06 04:09:02 box python3[691]: Message: 'Moving title: %s to %s/%s'
Jul 06 04:09:02 box python3[691]: Arguments: ('/tmp/calibre_web/b5f691dbdc6ef1ffe71a22e26192f9d5', '/library/calibre-web/Unknown/Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI] (15)')

=IIAB==========================================================================
-rw-r--r-- 1 root root 70766 Jul  6 04:10 /var/log/calibre-web.log
                        ...ITS LAST 100 LINES FOLLOW...

  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/usermanagement.py", line 34, in decorated_view
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 60, in inner
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 250, in upload
    meta, error = file_handling_on_upload(requested_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 930, in file_handling_on_upload
    meta = uploader.upload(requested_file, config.config_rarfile_location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/uploader.py", line 378, in upload
    return process(tmp_file_path, filename_root, file_extension, rar_excecutable)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/uploader.py", line 102, in process
    if not meta.title.strip():
           ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'title'
[2024-07-06 03:51:57,474] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/9f07d45ce89b01e5b63b6fc1ebe819c8
[2024-07-06 03:51:57,570]  WARN {cps.uploader:309} Cannot find the xklb database, using default metadata
[2024-07-06 03:51:57,570] ERROR {cps:1414} Exception on /upload [POST]
Traceback (most recent call last):
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/usermanagement.py", line 34, in decorated_view
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 60, in inner
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 250, in upload
    meta, error = file_handling_on_upload(requested_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 930, in file_handling_on_upload
    meta = uploader.upload(requested_file, config.config_rarfile_location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/uploader.py", line 378, in upload
    return process(tmp_file_path, filename_root, file_extension, rar_excecutable)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/uploader.py", line 102, in process
    if not meta.title.strip():
           ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'title'
[2024-07-06 03:52:49,413] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/b557a6499854dfbf8f01400895076d78
[2024-07-06 03:52:55,029] DEBUG {cps.uploader:336} ffmpeg output: b''
[2024-07-06 03:52:55,057] DEBUG {cps.services.worker:91} Add Task for user: Admin - Upload Counting Songs Collection KasD52z9dB4
[2024-07-06 03:54:43,286] DEBUG {cps.services.worker:91} Add Task for user: Admin - Metadata fetch task for https://www.youtube.com/watch?v=e0dJWfQHF8Y
[2024-07-06 03:54:43,570]  INFO {cps.tasks.metadata_extract:153} Starting to fetch metadata for URL: https://www.youtube.com/watch?v=e0dJWfQHF8Y
[2024-07-06 03:54:49,755] DEBUG {cps.services.worker:91} Add Task for user: Admin - Download task for https://www.youtube.com/watch?v=e0dJWfQHF8Y
[2024-07-06 03:54:49,755]  INFO {cps.tasks.download:43} Subprocess args: ['lb-wrapper', 'dl', 'https://www.youtube.com/watch?v=e0dJWfQHF8Y']
[2024-07-06 03:54:56,712]  INFO {cps.editbooks:369} Received metadata request: ImmutableMultiDict([('requested_file', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4'), ('current_user_name', 'Admin')])
[2024-07-06 03:54:56,712]  INFO {cps.editbooks:371} Requested file: /library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4
[2024-07-06 03:54:56,712]  INFO {cps.editbooks:376} Processing file: <_io.BufferedReader name='/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4'>
[2024-07-06 03:54:56,715] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/a0915b5af8cb41be4655de64c5b109bb
[2024-07-06 03:54:56,749]  WARN {py.warnings:112} /usr/local/calibre-web-py3/cps/editbooks.py:1531: SAWarning: Object of type <Books> not in session, add operation along 'Authors.books' won't proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)
  db_element = db_session.query(db_object).filter((func.lower(db_filter).ilike(add_element))).first()

[2024-07-06 03:54:56,796]  INFO {cps.tasks.download:116} Successfully sent the requested file to http://10.123.144.182/books/meta
[2024-07-06 03:54:56,808]  INFO {cps.tasks.download:139} Download task for https://www.youtube.com/watch?v=e0dJWfQHF8Y completed successfully
[2024-07-06 04:00:00,001]  INFO {apscheduler.executors.default:123} Running job "delete temp (trigger: cron[hour='4'], next run at: 2024-07-07 04:00:00 BST)" (scheduled at 2024-07-06 04:00:00+01:00)
[2024-07-06 04:00:00,002] DEBUG {cps.services.worker:91} Add Task for user: System - Delete Temp Folder
[2024-07-06 04:00:00,002]  INFO {apscheduler.executors.default:144} Job "delete temp (trigger: cron[hour='4'], next run at: 2024-07-07 04:00:00 BST)" executed successfully
[2024-07-06 04:00:36,144] DEBUG {cps.updater:331} Stable version: {'version': '0.6.22b'}
[2024-07-06 04:00:50,607] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/d17b7ed1d10f2fef5bb27dfaac22379e
[2024-07-06 04:00:53,150] DEBUG {cps.uploader:336} ffmpeg output: b''
[2024-07-06 04:00:53,168] ERROR {cps.editbooks:952} Failed to move cover file /library/calibre-web/Unknown/Numbers in the Teens They start with a 1!!!! song clipnabber com RMM5N63d2DI (12): [Errno 2] No such file or directory: '/tmp/calibre_web/d17b7ed1d10f2fef5bb27dfaac22379e.cover.jpg'
[2024-07-06 04:00:53,176] DEBUG {cps.services.worker:91} Add Task for user: Admin - Upload Numbers in the Teens They start with a 1!!!! song clipnabber com RMM5N63d2DI
[2024-07-06 04:01:27,229] DEBUG {cps.updater:331} Stable version: {'version': '0.6.22b'}
[2024-07-06 04:01:54,564] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/688aa21412e359bdca96ba16cc489ff5
[2024-07-06 04:01:58,725] DEBUG {cps.uploader:336} ffmpeg output: b''
[2024-07-06 04:01:58,749] DEBUG {cps.services.worker:91} Add Task for user: Admin - Upload Climbing Up This Mountain (Counting by 10s up to 100) yQSdKlNvrmw
[2024-07-06 04:02:41,571] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/0e698f63138363d99a2e257b6cf59380
[2024-07-06 04:02:52,359] DEBUG {cps.uploader:336} ffmpeg output: b''
[2024-07-06 04:02:52,385] DEBUG {cps.services.worker:91} Add Task for user: Admin - Upload Days of the Week Sing-along Song *[spi77By9-iA]
[2024-07-06 04:08:59,834] DEBUG {cps.uploader:376} Temporary file: /tmp/calibre_web/b5f691dbdc6ef1ffe71a22e26192f9d5
[2024-07-06 04:09:02,861] DEBUG {cps.uploader:336} ffmpeg output: b''
[2024-07-06 04:09:02,874] ERROR {cps.editbooks:952} Failed to move cover file /library/calibre-web/Unknown/Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI] (15): [Errno 2] No such file or directory: '/tmp/calibre_web/b5f691dbdc6ef1ffe71a22e26192f9d5.cover.jpg'
[2024-07-06 04:09:02,884] DEBUG {cps.services.worker:91} Add Task for user: Admin - Upload Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI]
[2024-07-06 04:10:00,000]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2024-07-07 04:10:00 BST)" (scheduled at 2024-07-06 04:10:00+01:00)
[2024-07-06 04:10:00,001]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2024-07-07 04:10:00 BST)" executed successfully

=IIAB==========================================================================
-rw-r--r-- 1 root root 9619 Jul  6 03:54 /var/log/xklb.log
                        ...ITS LAST 300 LINES FOLLOW...

2024-07-06 03:54:44 - [Info] Using yt-dlp 2024.07.02
2024-07-06 03:54:44 - [Info] Running xklb command: lb tubeadd '/library/calibre-web/xklb-metadata.db' 'https://www.youtube.com/watch?v=e0dJWfQHF8Y' --force -vv
2024-07-06 03:54:46 - [Debug] library v2.8.066
2024-07-06 03:54:46 - [Debug] ['/usr/local/bin/lb', 'tubeadd', '/library/calibre-web/xklb-metadata.db', 'https://www.youtube.com/watch?v=e0dJWfQHF8Y', '--force', '-vv']
2024-07-06 03:54:46 - [Debug] {'force': True, 'paths': ['https://www.youtube.com/watch?v=e0dJWfQHF8Y']}
2024-07-06 03:54:46 - [Debug] {'noprogress': True, 'skip_download': True, 'lazy_playlist': True, 'extract_flat': True, 'no_check_certificate': True, 'ignore_no_formats_error': True, 'skip_playlist_after_errors': 21, 'playlistend': 20000, 'force': True}
2024-07-06 03:54:47 - [Debug] yt-dlp initialized 0.2149
2024-07-06 03:54:47 - [Info] [youtube] Extracting URL: https://www.youtube.com/watch?v=e0dJWfQHF8Y
2024-07-06 03:54:47 - [Info] [youtube] e0dJWfQHF8Y: Downloading webpage
2024-07-06 03:54:47 - [Info] [youtube] e0dJWfQHF8Y: Downloading ios player API JSON
2024-07-06 03:54:47 - [Info] [youtube] e0dJWfQHF8Y: Downloading player 5352eb4f
2024-07-06 03:54:49 - [Debug] no such table: media
2024-07-06 03:54:49 - [Debug] Importing playlist-less media https://www.youtube.com/watch?v=e0dJWfQHF8Y
2024-07-06 03:54:49 - [Debug] media.playlist_media_add 2.2274
2024-07-06 03:54:49 - [Debug] ydl.extract_info done 0.0115
2024-07-06 03:54:49 - [Debug] 
2024-07-06 03:54:49 - [Debug] Optimizing database
2024-07-06 03:54:49 - [Debug] Processing table: media
2024-07-06 03:54:49 - [Debug] Transforming column order: ['id', 'size', 'duration', 'time_uploaded', 'time_created', 'time_modified', 'time_deleted', 'time_downloaded', 'fps', 'view_count', 'path', 'webpath', 'extractor_id']
2024-07-06 03:54:49 - [Debug] Creating index: id
2024-07-06 03:54:49 - [Debug] Creating index: size
2024-07-06 03:54:49 - [Debug] Creating index: duration
2024-07-06 03:54:49 - [Debug] Creating index: time_uploaded
2024-07-06 03:54:49 - [Debug] Creating index: time_created
2024-07-06 03:54:49 - [Debug] Creating index: time_modified
2024-07-06 03:54:49 - [Debug] Creating index: time_deleted
2024-07-06 03:54:49 - [Debug] Creating index: time_downloaded
2024-07-06 03:54:49 - [Debug] Creating index: fps
2024-07-06 03:54:49 - [Debug] Creating index: view_count
2024-07-06 03:54:49 - [Debug] Creating index: live_status
2024-07-06 03:54:49 - [Debug] Creating index: path
2024-07-06 03:54:49 - [Debug] Creating index: uploader
2024-07-06 03:54:49 - [Debug] Creating fts index: ['path', 'webpath', 'title']
2024-07-06 03:54:49 - [Debug] Processing table: captions
2024-07-06 03:54:49 - [Debug] Creating index: media_id
2024-07-06 03:54:49 - [Debug] Creating index: time
2024-07-06 03:54:49 - [Debug] Creating fts index: ['text']
2024-07-06 03:54:49 - [Debug] Running VACUUM
2024-07-06 03:54:49 - [Debug] Running ANALYZE
2024-07-06 03:54:49 - [Info] 
2024-07-06 03:54:49 - [Info] lb-wrapper's xklb command (tubeadd) completed successfully.
2024-07-06 03:54:50 - [Info] Using yt-dlp 2024.07.02
2024-07-06 03:54:50 - [Info] Running xklb command: lb dl '/library/calibre-web/xklb-metadata.db' --video --search 'https://www.youtube.com/watch?v=e0dJWfQHF8Y' --format best --format-sort 'tbr~1000' --write-thumbnail --subs --live --live-from-start -o '/library/downloads/calibre-web/%(extractor_key,extractor)s/%(uploader,uploader_id)s/%(title).170B_%(view_count)3.2D_[%(id).64B].%(ext)s' -vv
2024-07-06 03:54:50 - [Debug] library v2.8.066
2024-07-06 03:54:50 - [Debug] ['/usr/local/bin/lb', 'dl', '/library/calibre-web/xklb-metadata.db', '--video', '--search', 'https://www.youtube.com/watch?v=e0dJWfQHF8Y', '--format', 'best', '--format-sort', 'tbr~1000', '--write-thumbnail', '--subs', '--live', '--live-from-start', '-o', '/library/downloads/calibre-web/%(extractor_key,extractor)s/%(uploader,uploader_id)s/%(title).170B_%(view_count)3.2D_[%(id).64B].%(ext)s', '-vv']
2024-07-06 03:54:50 - [Debug] {'include': ['https://www.youtube.com/watch?v=e0dJWfQHF8Y'], 'subs': True, 'profile': 'video', 'live': True, 'paths': []}
2024-07-06 03:54:50 - [Debug] None
2024-07-06 03:54:50 - [Debug] {'path': 'https://www.youtube.com/watch?v=e0dJWfQHF8Y', 'title': 'The Big Numbers Song', 'duration': 194, 'time_created': 1720234489, 'size': 0, 'time_modified': 0, 'time_downloaded': 0, 'time_deleted': 0, 'extractor_key': 'Playlist-less media'}
2024-07-06 03:54:51 - [Debug] {'noprogress': True, 'lazy_playlist': True, 'noplaylist': True, 'no_check_certificate': True, 'ignore_no_formats_error': True, 'skip_playlist_after_errors': 21, 'playlistend': 20000, 'extractor_args': {'youtube': {'skip': ['authcheck']}}, 'logger': <xklb.createdb.tube_backend.download.<locals>.DictLogger object at 0x783504892870>, 'postprocessors': [{'key': 'FFmpegMetadata'}, {'key': 'FFmpegEmbedSubtitle'}], 'playlist_items': '1', 'extractor_retries': 3, 'retries': 12, 'retry_sleep_functions': {'extractor': <function download.<locals>.<lambda> at 0x783504005620>, 'http': <function download.<locals>.<lambda> at 0x7835040056c0>, 'fragment': <function download.<locals>.<lambda> at 0x783504005760>}, 'outtmpl': {'default': '/library/downloads/calibre-web/%(extractor_key,extractor)s/%(uploader,uploader_id)s/%(title).170B_%(view_count)3.2D_[%(id).64B].%(ext)s'}, 'progress_hooks': [<function download.<locals>.<lambda> at 0x783504005800>], 'subtitlesformat': 'srt/best', 'writesubtitles': True, 'writeautomaticsub': True, 'format': 'best', 'format_sort': ['tbr~1000'], 'writethumbnail': True, 'live_from_start': True, '_warnings': ['"-f best" selects the best pre-merged format which is often not the best option.\n         To let yt-dlp download and merge the best available formats, simply do not pass any format selection.\n         If you know what you are doing and want only the best pre-merged format, use "-f b" instead to suppress this warning'], 'include': ['https://www.youtube.com/watch?v=e0dJWfQHF8Y'], 'subs': True, 'profile': 'video', 'live': True}
2024-07-06 03:54:55 - [Debug] [https://www.youtube.com/watch?v=e0dJWfQHF8Y]: Downloaded to /library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '0.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '63.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '42.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '21.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '105.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '84.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '126.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:55 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '147.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:56 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '168.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:56 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '189.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:56 - [Debug] ('ffmpeg', '-nostdin', '-hide_banner', '-nostats', '-xerror', '-v', '16', '-err_detect', 'explode', '-ss', '193.00', '-i', '/library/downloads/calibre-web/Youtube/KidsTV123/The Big Numbers Song_281.01M_[e0dJWfQHF8Y].mp4', '-t', '1', '-f', 'null', '/dev/null')
2024-07-06 03:54:56 - [Debug] Extra media data {'time_modified': 0, 'time_downloaded': 0, 'time_deleted': 0, 'corruption': 0}
2024-07-06 03:54:56 - [Info] lb-wrapper's xklb command (dl) completed successfully.

Related:

@holta holta changed the title Uploading of a video whose title contains an exclamation mark results in no cover/thumbnail . Uploading of a video whose title contains an exclamation mark results in no cover/thumbnail — "Failed to Move Cover file" — "[Errno 2] No such file of directory" Jul 6, 2024
@holta
Copy link
Member

holta commented Jul 6, 2024

I've abbreviated @EMG70's answers above, to simplify testing:

  • The complete yt-dlp command you used to download the video

yt-dlp https://youtu.be/RMM5N63d2DI

  • The exact filename of the video (on your local machine) resulting from above

Numbers in the Teens They start with a 1!!!! song clipnabber com [RMM5N63d2DI].mp4 (4,347,392 bytes)

@holta
Copy link
Member

holta commented Jul 11, 2024

Which other kinds of upload testing are most important?

@deldesir
Copy link
Collaborator

Cannot reproduce the issue downloading the single video
image

image

@deldesir
Copy link
Collaborator

@EMG70, I successfully downloaded this video in my new VM. Does it work for you now?

@holta
Copy link
Member

holta commented Jul 12, 2024

@EMG70, I successfully downloaded this video in my new VM. Does it work for you now?

@deldesir do you mean "successfully uploaded" ?

(This issue is not about downloading.)

@deldesir
Copy link
Collaborator

Ah I see. I will do upload check then, sorry.

@deldesir
Copy link
Collaborator

I reproduced the error. Working on it now...

@deldesir
Copy link
Collaborator

deldesir commented Jul 16, 2024

The exclamation marks are not the issue. I removed the exclamation marks from the title, the same issue happened.
image

I renamed another video after the title of the failed video (with exclamation marks included), no effect.
image

Verdict: ffmpeg could not generate a cover for this specific video.

@deldesir deldesir changed the title Uploading of a video whose title contains an exclamation mark results in no cover/thumbnail — "Failed to Move Cover file" — "[Errno 2] No such file of directory" Uploading of a video results in no cover/thumbnail — "Failed to Move Cover file" — "[Errno 2] No such file of directory" Jul 16, 2024
@holta
Copy link
Member

holta commented Jul 16, 2024

@deldesir can you please paste in FFmpeg's error, after running it on @EMG70's video at the command-line?

Goal: Capture FFmpeg's error message and/or warning on this ticket, to illuminate very concrete details, Thanks!

PS Use the exact same FFmpeg command-line flags/options/parameters as IIAB Calibre-Web's uploader.py below (if possible!)

calibre-web/cps/uploader.py

Lines 320 to 340 in 8b5ebff

def generate_video_cover(tmp_file_path):
ffmpeg_executable = os.getenv('FFMPEG_PATH', 'ffmpeg')
ffmpeg_output_file = os.path.splitext(tmp_file_path)[0] + '.cover.jpg'
ffmpeg_args = [
ffmpeg_executable,
'-i', tmp_file_path,
'-vf', 'fps=1,thumbnail,select=gt(scene\,0.1),scale=-1:720', # apply filters to avoid black frames and scale
'-frames:v', '1', # extract only one frame
'-vsync', 'vfr', # variable frame rate
'-y', # overwrite output file if it exists
ffmpeg_output_file
]
try:
ffmpeg_result = subprocess.run(ffmpeg_args, capture_output=True, check=True)
log.debug(f"ffmpeg output: {ffmpeg_result.stdout}")
except Exception as e:
log.error(f"ffmpeg failed: {e}")
return None

@deldesir
Copy link
Collaborator

deldesir commented Jul 16, 2024

Here it is:

root@lrn2:/library/calibre-web/casnelaine/Numbers in the Teens They start with a 1!!!! song clipnabber com (1085)# ffmpeg -i Numbers\ in\ the\ Teens\ They\ start\ with\ a\ 1\!\!\ -\ casnelaine.mp4 -vf "fps=1,thumbnail,select=gt(scene\,0.1),scale=-1:720" -frames:v 1 -vsync vfr -y output_cover.jpg

ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
  configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
-vsync is deprecated. Use -fps_mode
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Numbers in the Teens They start with a 1!! - casnelaine.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Numbers in the Teens They start with a 1!!!! song clipnabber com
    artist          : casnelaine
    date            : 20111024
    encoder         : Lavf60.16.100
    comment         : https://www.youtube.com/watch?v=RMM5N63d2DI
  Duration: 00:01:24.83, start: 0.000000, bitrate: 269 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 480x360 [SAR 1:1 DAR 4:3], 133 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 05/22/2019.
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 05/22/2019.
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
Metadata:
      handler_name    : English
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x617ba5918f00] deprecated pixel format used, make sure you did set range correctly
[Parsed_thumbnail_1 @ 0x617ba5899e00] frame id #11 (pts_time=11.000000) selected from a set of 85 images
[vost#0:0/mjpeg @ 0x617ba5899640] No filtered frames for output stream, trying to initialize anyway.
Output #0, image2, to 'output_cover.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Numbers in the Teens They start with a 1!!!! song clipnabber com
    artist          : casnelaine
    date            : 20111024
    comment         : https://www.youtube.com/watch?v=RMM5N63d2DI
    encoder         : Lavf60.16.100
  Stream #0:0(eng): Video: mjpeg, yuvj420p(pc, progressive), 960x720 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1 fps, 1 tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 05/22/2019.
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.31.102 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[out#0/image2 @ 0x617ba58a4800] video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[out#0/image2 @ 0x617ba58a4800] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=N/A bitrate=N/A speed=N/A 

Notice [out#0/image2 @ 0x617ba58a4800] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used) that denotes no output.

@deldesir
Copy link
Collaborator

I'll address the deprecation messages and make the frame detection less strict. I need to make some research on this first.

@holta
Copy link
Member

holta commented Jul 16, 2024

I'll address the deprecation messages and make the frame detection less strict. I need to make some research on this first.

@deldesir thanks for both above:

  1. Should IIAB Calibre-Web use a generic cover/thumbnail/poster instead, when FFmpeg fails completely — if this is indeed regularly blocking people from sharing their own/community videos?
  2. If so, what's likely the best way to trap + act on FFmpeg errors like this?
  3. This is not the most urgent bug of all. Still: among offline schools that create their own videos — this bug could potentially be very damaging — if there's no clear workaround (automated workaround!?) allowing them to move forward.

@holta holta added the question Further information is requested label Jul 16, 2024
@deldesir
Copy link
Collaborator

deldesir commented Jul 16, 2024

  1. Should IIAB Calibre-Web use a generic cover/thumbnail/poster instead, when FFmpeg fails completely — if this is indeed regularly blocking people from sharing their own/community videos?

A generic cover is already in use (https://github.com/iiab/calibre-web/blob/master/cps/static/generic_cover.jpg). Feel free to propose another one if necessary.

  1. If so, what's likely the best way to trap + act on FFmpeg errors like this?

This error can be handled. I figured out it was because this specific video doesn't have a scene change significant enough to match the scene detection filter select=gt(scene\,0.1).

  1. This is not the most urgent bug of all. Still: among offline schools that create their own videos — this bug could potentially be very damaging — if there's no clear workaround (automated workaround!?) allowing them to move forward.

I propose to add a failure detection to the subprocess and to rerun it without the scene detection filter when the initial run fails.

@holta
Copy link
Member

holta commented Jul 16, 2024

This error can be handled.

Great, please make it failsafe (fault-tolerant) most important:

Goal = Resilient + Reliable (NOT complexity!)

Deluxe features (e.g. the "most elegant" possible thumbnail, ETC) can always be added at a later date.

@holta
Copy link
Member

holta commented Jul 16, 2024

@EMG70 can you retry your 2-step process now, on a freshly installed or fully upgraded IIAB Calibre-Web?

  1. Download the video to your OS:
    yt-dlp https://youtu.be/RMM5N63d2DI
  2. Upload the resulting video, from your OS to IIAB Calibre-Web.

Related:

@EMG70
Copy link
Author

EMG70 commented Jul 17, 2024

A new VM was created.
SUDO IIAB-DIAGNOSTICS -https://dpaste.com/8KJAEH5KH

The previously failed video yt-dlp https://youtu.be/RMM5N63d2DI with exclamation marks its title can now be uploaded successfully,downloading also tested OK.

Screenshot from 2024-07-17 16-36-20
Screenshot from 2024-07-17 16-33-50

Screenshot from 2024-07-17 16-33-40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
3 participants