digitalec / sonus

sonus is a cross-platform OverDrive audiobook client and chapterizer written in Python.
GNU General Public License v3.0
6 stars 1 forks source link

Extracting but not saving #9

Open cerinawithasea opened 4 months ago

cerinawithasea commented 4 months ago

I am reformatting my mac so i am on windows (which was reformatted last week) and when i run sonus it extracts but doesn't save C:\Users\Cerina\Documents\holding ready to combine>sonus C:\Users\Cerina\Downloads\ThePerilsofLadyCathe_9780593869291_10180446.odm Output will be saved to: C:\Users\Cerina\Documents\holding ready to combine Got title "The Perils of Lady Catherine de Bourgh" and author Claudia Gray from ODM file ThePerilsofLadyCathe_9780593869291_10180446.odm Downloading The Perils of Lady Catherine de Bourgh-part01.mp3 Downloading The Perils of Lady Catherine de Bourgh-part02.mp3 (i cut out the middle) Extracting chapter Chapter Twenty from The Perils of Lady Catherine de Bourgh-part09.mp3 Extracting chapter Chapter Twenty from The Perils of Lady Catherine de Bourgh-part10.mp3 Extracting chapter Chapter Twenty from The Perils of Lady Catherine de Bourgh-part11.mp3 Extracting chapter Credits from The Perils of Lady Catherine de Bourgh-part11.mp3

C:\Users\Cerina\Documents\holding ready to combine> see it just stops, did i miss installing something on windows, i use this like 10 times a day and this is weird Thanks Cerina should i try downloading it first? like separate

digitalec commented 3 months ago

I would suggest if you have any issues with an audiobook, to save the output for later so it can be chapterized once the issue is resolved.

The only external requirement is ffmpeg which, if you didn't have it, should produce a ton of errors during the extracts. Do you have ffmpeg installed? Is there enough available disk space? Does it happen with any other books?

Edit: Try running with -v to produce more verbose output which may provide a bit more information.

cerinawithasea commented 3 months ago

I can not find any extracted files, there is nothing saved in the stated folders, I have ffdmpeg installed and i know what you mean about the errors, when i got my new mac i did forget and i got a error for every chapter. And this happens on every book, on my windows machine I also know this exact thing happens to a friend of mine that i shared sonus with. as soon as i get back to my windows laptop i will try -v and update this post

cerinawithasea commented 2 months ago

Ok i did what you said and i am very confused first i reinstalled sonus and ffmpeg, just to be sure and this is what happened C:\Users\Cerina>sonus -v "C:\Users\Cerina\Documents\working\Drop by Drop" [INFO] sonus.main: Output will be saved to: C:\Users\Cerina [DEBUG] sonus.main: Input file: C:\Users\Cerina\Documents\working\Drop by Drop [DEBUG] sonus.chapterizer: Temporary directory created at: C:\Users\Cerina\AppData\Local\Temp\tmp7gainha5 [INFO] sonus.chapterizer: Found 7 files, containing 27 chapters... [INFO] sonus.chapterizer: Extracting chapter Chapter 1 from Drop by Drop-Part01.mp3 [DEBUG] sonus.chapterizer: >> File:C:\Users\Cerina\Documents\working\Drop by Drop\Drop by Drop-Part01.mp3 Start:0.0 End:852.0 Traceback (most recent call last): File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\Scripts\sonus.exe\__main__.py", line 7, in <module> File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\sonus\main.py", line 99, in main chapterizer.main(arg, output_path, generic, offset, ffmpeg_debug) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\sonus\chapterizer.py", line 227, in main split_chapters(timings, tmpdir, offset, debug) File "C:\Users\Cerina\AppData\Local\Programs\Python\Python39\lib\site-packages\sonus\chapterizer.py", line 108, in split_chapters stream = ffmpeg.input(file['file'], ss=file['start'], to=file['end']) AttributeError: module 'ffmpeg' has no attribute 'input' but i swear look `C:\Users\Cerina>pip install sonus Collecting sonus Downloading sonus-0.6.5-py3-none-any.whl.metadata (3.0 kB) Requirement already satisfied: click~=8.1.7 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from sonus) (8.1.7) Collecting ffmpeg-python~=0.2.0 (from sonus) Using cached ffmpeg_python-0.2.0-py3-none-any.whl.metadata (1.7 kB) Collecting mutagen~=1.47 (from sonus) Using cached mutagen-1.47.0-py3-none-any.whl.metadata (1.7 kB) Collecting packaging~=24.0 (from sonus) Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB) Collecting requests~=2.31.0 (from sonus) Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB) Requirement already satisfied: tqdm~=4.66.4 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from sonus) (4.66.4) Collecting xmltodict~=0.13.0 (from sonus) Using cached xmltodict-0.13.0-py2.py3-none-any.whl.metadata (7.7 kB) Requirement already satisfied: colorama in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from click~=8.1.7->sonus) (0.4.6) Collecting future (from ffmpeg-python~=0.2.0->sonus) Using cached future-1.0.0-py3-none-any.whl.metadata (4.0 kB) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from requests~=2.31.0->sonus) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from requests~=2.31.0->sonus) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from requests~=2.31.0->sonus) (2.2.2) Requirement already satisfied: certifi>=2017.4.17 in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (from requests~=2.31.0->sonus) (2024.7.4) Downloading sonus-0.6.5-py3-none-any.whl (23 kB) Using cached ffmpeg_python-0.2.0-py3-none-any.whl (25 kB) Using cached mutagen-1.47.0-py3-none-any.whl (194 kB) Using cached packaging-24.1-py3-none-any.whl (53 kB) Using cached requests-2.31.0-py3-none-any.whl (62 kB) Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB) Using cached future-1.0.0-py3-none-any.whl (491 kB) Installing collected packages: xmltodict, requests, packaging, mutagen, future, ffmpeg-python, sonus Attempting uninstall: requests Found existing installation: requests 2.32.3 Uninstalling requests-2.32.3: Successfully uninstalled requests-2.32.3 Successfully installed ffmpeg-python-0.2.0 future-1.0.0 mutagen-1.47.0 packaging-24.1 requests-2.31.0 sonus-0.6.5 xmltodict-0.13.0

[notice] A new release of pip is available: 24.1.2 -> 24.2 [notice] To update, run: python.exe -m pip install --upgrade pip

C:\Users\Cerina>python.exe -m pip install --upgrade pip Requirement already satisfied: pip in c:\users\cerina\appdata\local\programs\python\python39\lib\site-packages (24.1.2) Collecting pip Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB) Downloading pip-24.2-py3-none-any.whl (1.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 4.1 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 24.1.2 Uninstalling pip-24.1.2: Successfully uninstalled pip-24.1.2 Successfully installed pip-24.2

C:\Users\Cerina>pip install ffmpeg Collecting ffmpeg Downloading ffmpeg-1.4.tar.gz (5.1 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: ffmpeg Building wheel for ffmpeg (pyproject.toml) ... done Created wheel for ffmpeg: filename=ffmpeg-1.4-py3-none-any.whl size=6089 sha256=1fa2208e6ae3de5bb204533768ee5e7b75bf09fd0438c0689531a9f8566c927f Stored in directory: c:\users\cerina\appdata\local\pip\cache\wheels\1d\57\24\4eff6a03a9ea0e647568e8a5a0546cdf957e3cf005372c0245 Successfully built ffmpeg Installing collected packages: ffmpeg Successfully installed ffmpeg-1.4

C:\Users\Cerina>sonus --version sonus 0.6.5 Support: https://github.com/digitalec/sonus ` i had to predownload files because the covers aremessing the script up today, do you need these files? I did look for C:\Users\Cerina\AppData\Local\Temp\tmp7gainha5 its not there but im guessing had it worked thats where id find the files

cerinawithasea commented 4 days ago

soooooo have you tried libby yet?