-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Add functionality for transcoding media. #516
Conversation
Forgot to add. The tests for offline transcodes require a plex pass subscription. They automatically skip if one isn't available but there isn't much of a way around that. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #516 +/- ##
==========================================
+ Coverage 67.95% 69.95% +2.00%
==========================================
Files 18 19 +1
Lines 908 1245 +337
==========================================
+ Hits 617 871 +254
- Misses 291 374 +83
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I see you weren't wasting your time 😅 Thank you! I'll check it out tomorrow, or during the weekend. |
Or maybe just `Sync`? Strange that `SyncV3` is in free accounts but `Sync` isn't.
|
@Mossop, it depends on what you want in the result — check whether transcoding is available or the owner has PlexPass. I did some digging, and here's what I found:
The only thing I had to change to make the tests work is the expected frame rate in |
That's interesting. Offline is meant to be one of the perks of PlexPass but maybe they are gating that in the clients. I don't mind how we check though at the moment I return a The |
What's offline transcoding, by the way? :) The only thing about transcoding I can see in Plex: Free vs Paid is I'm on Apple M1, by the way. It could also add some side effects. As for the test, I think it'll be enough to validate only the parameters passed to the transcoding session and ignore the frames. |
I'm on Apple M1 too! Offline transcoding is the internal name for the mobile downloads feature for offline playback which replaced the old Sync feature.
|
Ah! https://support.plex.tv/articles/downloads-sync-faq/ this page states that the server's owner must always have PlexPass to get this working, and there's a case when the client doesn't have to have PlexPass. Yet again, the test works for my free user. I registered it in Jan 2022, so I just tried registering another user to check if it's because of this. And the new one also had the Ok, let's guard this with SyncV3 for now — it is working, after all. For some strange reason :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work. Everything looks great, as always.
I have just a few questions about the code and a few minor-ish change requests. Feel free to disagree with any of the things I said :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Let's see how the tests will behave on GitHub :)
It looks like there're a few new fields in |
I think that should take care of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was quick, thank you! :)
Transcoding is unsurprisingly a complex business so I've tried to strike a balance in the API given here between making it relatively easy to use for the simple case but still exposing a lot of control over the transcode options. That said I'm not totally sold on the API as-is.
Streaming transcodes aren't really implemented here beyond starting the process, I don't particularly need them myself but they work so similarly to offline transcodes that it made sense to just add them in. Offline transcodes are fully working (though I have no doubt I'll hit bugs once I make more real-world use of it).
This change is on the large side so no rush 😂