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

Everand downloading 1000s of files and --combine doesn't work #68

Open
jaegercoder opened this issue Nov 21, 2023 · 12 comments
Open

Everand downloading 1000s of files and --combine doesn't work #68

jaegercoder opened this issue Nov 21, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@jaegercoder
Copy link

Installation method:
Github repo

Version:
audiobook-dl 0.7.0
Python 3.10.12

Describe the bug
Everand option downloads 1000s of aac files which I am not able to combine.

The --combine option only converts the first file and leave all others

Command output

audiobook-dl --combine --output-format m4b --verbose-ffmpeg

    Metadata:
    encoder         : Lavf58.76.100
    major_brand     : M4A 
    minor_version   : 512
    compatible_brands: M4A isomiso2
  Duration: 00:00:05.02, start: 0.000000, bitrate: 26378 kb/s
  Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 80 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Output #0, ipod, to 'The Prez/output_file.m4b':
  Metadata:
    compatible_brands: M4A isomiso2
    major_brand     : M4A 
    minor_version   : 512
    encoder         : Lavf58.76.100
  Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 80 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      51kB time=00:00:04.99 bitrate=  83.4kbits/s speed=8.93e+03x    
video:0kB audio:49kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.324402%
  Adding metadata
  Embedding cover
@jaegercoder jaegercoder added the bug Something isn't working label Nov 21, 2023
jo1gi added a commit that referenced this issue Nov 22, 2023
File combination didn't work correctly on converted files (don't know
why). This commit will combine the files before converting them.

Relates to issue #68
@jo1gi
Copy link
Owner

jo1gi commented Nov 22, 2023

This commit fixed it for me. Does it work for you?

@JaegerMaster
Copy link

Well, I think that issue is resolved @jo1gi . However now I get a ffmpeg error.

Traceback (most recent call last):
  File "/home/jaeger/.local/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/__main__.py", line 32, in main
    process_url(url, options, config)
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/__main__.py", line 58, in process_url
    process_audiobook(result, options)
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/__main__.py", line 163, in process_audiobook
    download(audiobook, options)
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/output/download.py", line 37, in download
    download_audiobook(audiobook, output_dir, options)
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/output/download.py", line 54, in download_audiobook
    output.combine_audiofiles(filepaths, output_dir, output_path)
  File "/home/jaeger/.local/lib/python3.10/site-packages/audiobookdl/output/output.py", line 39, in combine_audiofiles
    subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 7] Argument list too long: 'ffmpeg'

@jo1gi
Copy link
Owner

jo1gi commented Nov 24, 2023

@JaegerMaster What book is it?

@jo1gi
Copy link
Owner

jo1gi commented Dec 6, 2023

@jaegercoder Should work with the newest version on Github.

@JaegerMaster
Copy link

JaegerMaster commented Dec 8, 2023

@jo1gi Still Not working

audiobook-dl 0.7.1

audiobook-dl -c ~/scripts/cookies.txt --combine -f mp3 https://www.everand.com/audiobook/683386581/A-Brilliant-Life-My-Mother-s-Inspiring-True-Story-of-Surviving-the-Holocaust

Output File details:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 08:50     MPEG1, Layer III        [ 56 kb/s @ 44100 Hz - Mono ]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ID3 v2.4:
title: A Brilliant Life: My Mother’s Inspiring True Story of Surviving the Holocaust
artist: Rachelle Unreich
album:
track:
UserTextFrame: [Description: PERFORMER]
Rachel Griffiths
OTHER Image: [Size: 52140 bytes] [Type: image/jpeg]
Description:

In m4b format:


General
Complete name                            : A Brilliant Life: My Mother’s Inspiring True Story of Surviving the Holocaust.m4b
Format                                   : MPEG-4
Format profile                           : Apple audio with iTunes info
Codec ID                                 : M4A  (M4A /isom/iso2)
File size                                : 3.97 MiB
Duration                                 : 7 min 41 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 72.2 kb/s
Track name                               : A Brilliant Life: My Mother’s Inspiring True Story of Surviving the Holocaust
Performer                                : Rachelle Unreich
Writing application                      : Lavf58.76.100
Cover                                    : Yes
Narrator                                 : Rachel Griffiths

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 7 min 41 s
Source duration                          : 7 min 41 s
Bit rate mode                            : Constant
Bit rate                                 : 69.9 kb/s
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 3.84 MiB (97%)
Source stream size                       : 3.84 MiB (97%)
Default                                  : Yes
Alternate group                          : 1
mdhd_Duration                            : 461427

@jo1gi
Copy link
Owner

jo1gi commented Dec 9, 2023

@JaegerMaster Weird. I have no problem downloading that book.

@jaegercoder
Copy link
Author

@jo1gi What is the ffmpeg version you are using mine is 4.4.2

Some of the books work and some don't

For eg:
https://www.everand.com/audiobook/374354831/Ask-a-North-Korean-Defectors-Talk-About-Their-Lives-Inside-the-World-s-Most-Secretive-Nation: Works
https://www.everand.com/audiobook/683386581/A-Brilliant-Life-My-Mother-s-Inspiring-True-Story-of-Surviving-the-Holocaust: Doesn't work

@jo1gi
Copy link
Owner

jo1gi commented Dec 10, 2023

I use ffmpeg 5.1.3 and I don't have any problems with A Brilliant Life.

@JaegerMaster
Copy link

Changed my ffmpeg to 6 and works now. Must be an ffmpeg issue. Maybe you may want to indicate a minimum ffmpeg version @jo1gi

@ebal99
Copy link

ebal99 commented Feb 19, 2024

@jo1gi I am having issues with this and any book that downloads using the hundreds of AAC files is not working for me. I have the latest version of Audioboo-dl, FFMPEG v6, and Python 3.9. The files download but when trying to combine them it errors out.

Any suggestions would be appreciated.

Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/shutil.py", line 806, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/XXXXXXXXXX/Desktop/TheSilmarillion/output_file.aac' -> '/Users/XXXXXXXXXXX/Desktop/TheSilmarillion/input_file.aac'

@Graywaren
Copy link

Graywaren commented Feb 21, 2024

I am also having this issue, or a similar one, or I'm just doing something wrong? 12668 files for one book!!! Combine not working. I get [WinError 206] The filename or extension is too long. I'd really like to download 10+ books, but I don't want to have to deal with 10,000s files later. Here's the log:

C:\Users\Ronan>audiobook-dl -cD:\Ronan\Books\audiobook-dl-files\cookies\everand-cookies.txt -oD:\Ronan\Books\audiobook-dl-files\outputs{title} --combine --verbose-ffmpeg http://www.everand.com/listen/638079282
Finding compatible source
Authenticating with everand

Downloading Between Family from everand
Creating output dir
Downloading Between Family ---------------------------------------- 100%
Combining files
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Scripts\audiobook-dl.exe_main
.py", line 7, in
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl_main
.py", line 31, in main
process_url(url, options, config)
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl_main_.py", line 58, in process_url
process_audiobook(result, options)
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl_main_.py", line 163, in process_audiobook
download(audiobook, options)
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl\output\download.py", line 37, in download
download_audiobook(audiobook, output_dir, options)
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl\output\download.py", line 54, in download_audiobook
output.combine_audiofiles(filepaths, output_dir, output_path)
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\site-packages\audiobookdl\output\output.py", line 39, in combine_audiofiles
subprocess.run(
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Ronan\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 206] The filename or extension is too long

This is the version of ffmpeg I have:

C:\Users\Ronan>ffmpeg -version
ffmpeg version 2024-02-19-git-0c8e64e268-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 58. 39.100 / 58. 39.100
libavcodec 60. 39.101 / 60. 39.101
libavformat 60. 21.100 / 60. 21.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 17.100 / 9. 17.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants