ambry-app / ambry

Self-hosted audiobook streaming server
https://ambry.app
MIT License
73 stars 8 forks source link

Screenshots / API Documentation? #662

Open sandreas opened 1 year ago

sandreas commented 1 year ago

Hello,

this project sounds interesting. I'm always looking for standalone audio book servers to improve my workflow. Unfortunately I did not find any API documentation or screenshots.

Did I miss something?

Best, sandreas

doughsay commented 1 year ago

Sorry, I don't really have a lot of "marketing" material right now. I was hoping to eventually put together a nice page full of screenshots here: https://ambry.app/ but haven't really had the time yet. There's a few screenshots of the mobile app (android) visible on the play store page: https://play.google.com/store/apps/details?id=com.ambry

As for API: there's not really meant to be a public API, it's a web application + react native mobile app. What kind of API access would you want/need for your use-case?

sandreas commented 1 year ago

Sorry, I don't really have a lot of "marketing" material right now. I was hoping to eventually put together a nice page full of screenshots here: https://ambry.app/ but haven't really had the time yet. There's a few screenshots of the mobile app (android) visible on the play store page: https://play.google.com/store/apps/details?id=com.ambry

Well, these ARE screenshots :-) Thanks for sharing - I would love to see these links in the README.md.

As for API: there's not really meant to be a public API, it's a web application + react native mobile app. What kind of API access would you want/need for your use-case?

Well, I'm an audio book enthusiast and maybe a bit a perfectionist. This is why I'm collecting different solutions to listen to them. And because I did not find a solution that fitted my needs, I started to develop my own Project (as you did). It is called ToneAudioPlayer, but since my time is very limited and this project is far from being production ready, I would rather take something else in the meantime. However the concept of ToneAudioPlayer is to have multiple DataSources, which implement the different APIs available, so that I can switch between self hosted solutions easily, when I find a better one.

The idea is having a central interface DataSource with generic methods. So your API would be public, I could implement an AmbryDataSource and ToneAudioPlayer just had one more Plugin without reimplementing the whole playback. Ambitious project, but that's the way I did it.

Currently I'm using audiobookshelf, which is great, but also VERY huge (api wise)... some minor issues are bothering me tremendously (e.g. the app crashes pretty often and the Server cannot be run self-hosted behind a reverse proxy atm).

My current setup is having a well organized m4b audio book collection with chapters converted via m4b-tool and tone. The listening happens with:

Android

iPod + iTunes

Other self-hosted projects I considered are:

I hope you might find these interesting :-)

doughsay commented 1 year ago

@sandreas very interesting! Although Ambry's API isn't "technically public", it's still very easy to consume from any custom client you want. So if you were self-hosting your own Ambry server, you could easily interact with it through the GraphQL API. I uploaded a schema dump to a gist here, but I'm not sure how useful that is to you: https://gist.github.com/doughsay/6e1b46156d1108eb8222e56d8d293b55

If it's easy for you to spin up a quick copy of the ambry server then you can access the "graphql playground ui" at http://ambry-server/gql which has a built in graphql schema browser and let's you play with queries.

It's not a huge API, it has basic things like "list all the books", "fetch author details", etc, etc. When you get the details of a book it includes both a MPEG DASH URL and an HLS URL, so depending on the capabilities of the client, you either stream through dash or hls (or the client could just download the mp4 file if you don't want to stream).

One caveat however is that Ambry right now is meant to "take control" over any uploaded audiobooks. It will re-encode them if it needs to to make them DASH and HLS compatible, and it does the file management. So basically bringing an existing already curated audiobook library is currently not really a supported workflow in Ambry. I recognize this as a pretty serious flaw to adoption though, so I've been noodling on how to possibly change things going forward.

sandreas commented 1 year ago

I uploaded a schema dump to a gist here, but I'm not sure how useful that is to you: If it's easy for you to spin up a quick copy of the ambry server then you can access the "graphql playground ui" at http://ambry-server/gql which has a built in graphql schema browser and let's you play with queries.

Thanks. That's a start :-)

One caveat however is that Ambry right now is meant to "take control" over any uploaded audiobooks. I recognize this as a pretty serious flaw to adoption though, so I've been noodling on how to possibly change things going forward.

Ahh ok. Well this is not suitable for my needs atm. Thank you very much for pointing this out. I'll keep an eye on ambry :-)

P.S.: Here is are some other projects that may be inspiring: