TortugaPower / BookPlayer

Player for your DRM-free audiobooks
GNU General Public License v3.0
1.61k stars 194 forks source link

Bug: Large MP3 will not import #736

Open elric667 opened 2 years ago

elric667 commented 2 years ago

Environment

Description

Tried to import a local mp3 file of 1.24 gb and it would not import at all I can import into VLC without problem. I tried from different sources but large mp3 refuses to import

Steps to reproduce the behavior

  1. Import 1.18+ gb mp3 file
ben-xx commented 2 years ago

Adding another data point: iOS Version 14.6 BookPlayer v 4.4.5-2

m4a / m4b files > 450MB are also not importing.

I just imported a file of 448MB and it was slow, but OK. Import completed after what seemed like 90-120 seconds of nothing happening. (Source was Google Drive where the file had already been downloaded to phone, i.e. "available offline"). Tried another file import sized at 485MB and Import would never complete yet no error was thrown and screen/phone would never go to sleep. I split that 485MB file into two smaller m4a files (using QuickTimePlayer → trim), ~250MB each, and the two files imported fine.

Regardless, thanks for a great player/project Gianni.

and-pete commented 2 years ago

Adding another data point: iOS Version 14.6 BookPlayer v 4.4.5-2

m4a / m4b files > 450MB are also not importing.

I just imported a file of 448MB and it was slow, but OK. Import completed after what seemed like 90-120 seconds of nothing happening. (Source was Google Drive where the file had already been downloaded to phone, i.e. "available offline"). Tried another file import sized at 485MB and Import would never complete yet no error was thrown and screen/phone would never go to sleep. I split that 485MB file into two smaller m4a files (using QuickTimePlayer → trim), ~250MB each, and the two files imported fine.

Regardless, thanks for a great player/project Gianni.

I've found what works with large files (...and with a large group of files too) is:

I've had no problems importing both individual files (or selected group of files) up to 1.5GB–2.0GB of total size this way. I haven't needed to try larger so far so can't comment there.

But the extra 1 or 2 steps to the import process (i.e. by moving them to "On My iThing" first after downloading) has been more convenient than needing to split larger files (or than needing to importing smaller sub-selections of folders with many files).

Hopefully it works for you too :)

ahoereth commented 11 months ago

Same problem here with an m4b over 800mb. Workaround didn't help sadly:-/ just clicked "report" a few times in the testflight version. Is there a way to retrieve a crash report manually?

GianniCarlo commented 11 months ago

@ahoereth with the TestFlight crash report, I was able to pinpoint the crash on Sentry.io, here's the current error message

BookPlayer/ImportOperation.swift:231: Fatal error: 
Fail to move file from file:///private/var/mobile/Containers/Shared/AppGroup/5F31F206-835F-411D-B0DD-561056CFD060/SharedBP/<redacted>.m4b 

to file:///var/mobile/Containers/Data/Application/FC6B44F4-900B-451E-B0BD-23649E49BB3E/Documents/Processed/<redacted>-1.m4b

From the SharedBP folder, I can gather that the share extension is being used, which uses a shared folder. I added a new beta version which includes the error description, could you update on TestFlight and attempt the import again? so I can get why it's failing to move the file from one site to the other

Another thing I wanted to mention, is that on the destination file name, there's a suffix -1.m4b which denotes that there's already an existing book with the original name in Processed. Could you go to the Files app → On my iPhone → BookPlayer → Processed, and see if the file is already there? if it's there, but there's no backing item, then there are two things you can do, one just move the file outside of the Processed folder, and next time opening the app it'll prompt you to import it (to do this on the iPhone, with one finger hold the item until you can drag, and with another finger, swipe back so you're out of the Processed folder, and then you can drop the file). The other option should be easier, go inside the app → Settings → Storage Management, and if the file is in the Processed folder without a book representation inside the app, it should show as the first item with a warning icon, tapping that icon will prompt you so the book representation is created

Let me know how it goes @ahoereth

For additional context, the share extension was just introduced in v5 (before this, when sharing from another app directly to BookPlayer, we would only get one of the files), so the original problem on this ticket was unrelated to it. The original ticket I believe had some problems with how cloud providers had their integration with the Files app, as download feedback would not show at times (not sure if that's on iOS or third-party cloud providers), and having the files offline from inside the third-party app, would not always guarantee that they're available offline on the Files app. As a final note, in those cases, the origin URL we got, had the cloud domain, so BookPlayer didn't really have access to the file contents, just a reference to the file, which out of the box, didn't let us access the content

ahoereth commented 11 months ago

Thanks for getting back so quickly! You should have received another report with the new TestFlight version. The report is from just after updating through TestFlight, then opening bookplayer -- I got prompted right away to import the book, probably as a left over from previous attempts

Two other things I tried for which I am unable to get reports, as the app does not actually crash. If there is anyway to extract logs or similar, please let me know.

1: Import using "Add"

  1. Open BookPlayer
  2. Press "Add".
  3. Press "Import files".
  4. Maybe click a file so it gets prefetched if it lives in iCloud.
  5. Press "Open" on the top right.

Problem: Pressing Open does not do anything. Same problem occurs when the file is not in iCloud but locally on the iPhone.

2: Import using the share dialog from the files app

  1. Open Files
  2. Find the audiobook to import
  3. Longpress to share
  4. Select BookPlayer

Problem: Share dialog goes away, nothing happens.

At this point if I open BookPlayer it did previously suddenly prompt me to import the file I just shared. But not anymore with the latest TestFlight version (probably a coincidence).