theothernt / AerialViews

A screensaver for Android TV devices including Nvidia Shield, Fire TV, and Chromecast with Google TV. Inspired by Apple TV's video screensaver.
GNU General Public License v3.0
418 stars 32 forks source link

Add folder picker for local videos #93

Closed jordanwalkert closed 1 year ago

jordanwalkert commented 1 year ago

I was wondering if in the future there could be an easier way to find the video files for local playback.

I have 2 Zidoo media players which use Android 9. The screensaver works great with online videos but I have never been able to get the local playback to work, despite putting the video files in multiple locations and trying dozens of folder filter names. It initially asks for storage permission, which I have allowed but beyond that it can’t seem to find anything.

Would it be possible for Aerial Views to have a setting that lets you select exactly where the local video files are? The files I’m using are Apple videos downloaded directly from the link you have provided but perhaps the filenames are not correct. How do we know if the filenames match the manifest? I’d love to stop using the online version and just have local playback but I cannot for the life of me get the app to find a single video.

theothernt commented 1 year ago

I'm still looking into options for what I can do, but in the meantime can I ask you to test something for me?

  1. Download a free video player called Just (Video) Player. If your device doesn't have the Play Store, it's easy enough to get the APK.
  2. Go into Settings (long press on the gear/cog icon)
  3. Change file access to MediaStore, then try and open a file or not
  4. Change file access to Legacy, then try and open a folder or not

I'm interested to see if Step 3 or 4 will work. My understanding is that Step 3 should fail, but Step 4 will work. If that's the case, I can put a fix in for older/custom version of Android and Android TV.

jordanwalkert commented 1 year ago

So with the latest APK of Just Video Player my only options in the settings are Auto and Legacy, I don’t have the option of MediaStore. Both Auto and Legacy load up and play the Apple files just fine and have no trouble browsing and finding them. I tried turning on and off a few of the settings as well and everything plays perfectly in that player.

theothernt commented 1 year ago

That's great, thanks for testing that.

Although I won't be using the same file picker, as it's a lot of work to integrate it, I will be adding an option to specify a) an external storage device (eg. USB drive) and b) a folder name - that should be enough to get it working.

jordanwalkert commented 1 year ago

Sounds good, thanks for looking into this issue for me! Let me know if you need me to test out any specific updates or features.

jordanwalkert commented 1 year ago

Hello, is this fix implemented in the new 1.41 version? I understand if it takes more time, just wondering when I update if I should expect it to be resolved. Thanks!

theothernt commented 1 year ago

It's not, I'm hoping it'll be in v1.4.2 but I'll likely give you access to a beta first - maybe in the next 2 or 3 weeks.

theothernt commented 1 year ago

Just to update you, I should have a beta for you to test in the next day or two.

It'll be a 'debug' version which means it will install along side the version from GitHub or the Play Store so you don't have to uninstall or override the existing version.

jordanwalkert commented 1 year ago

That’s great! Let me know when it’s ready and I’ll be happy to test it out for you. Thanks!

theothernt commented 1 year ago

Ok, here is a version to test... (link removed)

Look in Video Sources > Local or USB Storage

This is just the first pass at the feature so there are a number of things to improve. Let me know if you have any questions or issues?

jordanwalkert commented 1 year ago

So unfortunately I am getting about the same result with this new feature. All of the options make sense and can be selected, including all drives showing up in the location selection menu. I have tried multiple drives and locations, however it still does not seem to want to find videos in a directory regardless of a folder name being specified or not. When I do specify a folder name, and go to test the new filter nothing even pops up with the test function and when testing the screensaver itself, it still just says no videos found. I can provide screenshots or whatever else you need but are there specific filenames that need to match up? I have downloaded the Apple screensavers from the link you provided and have not changed the naming structure, it's just so odd why it can't find any of them!

theothernt commented 1 year ago

If you wouldn't mind, can you download again from the link above, it should be an updated version with a working 'test' feature which will give a little more info.

In the meantime, I have a few more questions...

  1. In Video Sources > Local or USB Storage > Choose a volume, what do you see listed?
  2. For Specify a folder, are you using something simple like /Videos (one slash at the start, none at the end)

If you try using a free File Manager app, is it able to access the video files?

Also, just to rule out something simple, if the folder is called /Videos then entering /videos might not work due to a difference in uppercase/lowercase letters.

jordanwalkert commented 1 year ago

I am attaching a link to some screenshots that hopefully help explain the issue at hand, but it looks like it's an issue with the file extensions. Odd considering it has no problem playing the same files from the server, and also can access/playback these exact files using a File Manager app or the built in apps.

Take a look at the screenshots though which show me specifying a folder with the correct naming, the files within that directory, as well as those files showing up and opening in a File Manager app, also the specifications and media handling of my specific device which is a Zidoo Z1000 and UHD3000 Media Player.

(link removed)

theothernt commented 1 year ago

Ah, there was a silly bug which was excluding all videos - should be fixed now. Can you download again from the same link and give it a try?

Thanks for the screenshots btw, it made the bug really easy to spot!

jordanwalkert commented 1 year ago

Success!! Works like a charm now. Detected all videos and plays them back perfectly using both test functions and normal operation.

Can’t thank you enough for all of your help and tweaks to get this working. I really appreciate it and will finally proceed to loading the rest of the videos now!

theothernt commented 1 year ago

That's great to hear - and in case you weren't aware, here is the latest list of videos to download... https://aerial-videos.netlify.app/

theothernt commented 1 year ago

Here is a small update to the beta... Aerial Views v1.4.4 beta2

I've added the ability to scan all volumes, as opposed to just specifying one. This can be handy if you a) have multiple storage devices attached or b) you change USB storage devices from time to time and don't want to update the volume name each time.

wrybread commented 1 year ago

I've added the ability to scan all volumes, as opposed to just specifying one. This can be handy if you a) have multiple storage devices attached or b) you change USB storage devices from time to time and don't want to update the volume name each time.

Working perfectly for me on a Chromecast with Google TV (Android 12). Thanks for that, makes it so much easier to swap thumbdrives.

theothernt commented 1 year ago

I've updated the build again, same link as above. It's just a small menu change to make things neater.

Also, if you wouldn't mind, can you enable Settings > Advanced > Auto refresh rate switching. In normal use, you shouldn't see any difference - but if you happen to pause a video streaming app like Netflix or Disney+ that was playing a movie at 24fps/hz, Aerial Views should switch back to 60hz so the Apple, etc videos can play smoothly at 30fps.

jordanwalkert commented 1 year ago

Still working very well with no new bugs. The auto refresh rate seems to be working properly as well. Played 24hz content and let it go to the menu, there was a black screen for a moment which my TV always does when switching refresh rates but it played back the Apple videos at 60fps and very smooth. Thanks for your help and hard work on this!

theothernt commented 1 year ago

v1.5 has just been released on GitHub with this fix. It should be released on the Play Store, etc in the next couple of weeks.