Skip to content

Conversation

@phunkyfish
Copy link
Contributor

@phunkyfish phunkyfish commented Feb 24, 2024

v21.0.0

  • Change add-on to use inputstream.ffmpegdirect which also enables timeshifting
  • Fix jsoncpp deprecation warnings
  • Add build script for mac

@phunkyfish
Copy link
Contributor Author

Note this PR requires testing before any merge is possible.

Copy link
Collaborator

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a bit more love, imo.

Q: could we get rid of the internal rtsp stuff completely and require inputstream.adaptive?
Q2: why so many different stream handlers? Wouldn't be one (ISA?) enough?

@phunkyfish phunkyfish force-pushed the simplify-rtsp-impl branch 2 times, most recently from 8c9d970 to 0cfb8c5 Compare February 25, 2024 08:50
@phunkyfish
Copy link
Contributor Author

I've cleaned up the PR now. Extra log statements were simply for testing.

@phunkyfish
Copy link
Contributor Author

Needs a bit more love, imo.

Q: could we get rid of the internal rtsp stuff completely and require inputstream.adaptive? Q2: why so many different stream handlers? Wouldn't be one (ISA?) enough?

Yes, getting rid of the internal rtsp stuff is the plan. But i can't test here, need @da-anda to test and see what works. ISA can't be used as it does not support rtsp.

@phunkyfish
Copy link
Contributor Author

@da-anda I also added a commit to request kodi update the EPG if it has not been requested. Should mean you always get EPG now.

@ksooo
Copy link
Collaborator

ksooo commented Feb 25, 2024

@da-anda I also added a commit to request kodi update the EPG if it has not been requested. Should mean you always get EPG now.

not sure this is a good idea as fetching the epg takes a very long time on the server side and what happens if you have multiple pvr.octonet connected to the same device all doing this (regularly)? I think this problem needs to be solved in the firmware of the octonet. There a feature is missing that you can set a fetch interval for the epg data so that the octo takes care.

EDIT: oh i misread your comment, ignore what i wrote

@da-anda
Copy link

da-anda commented Feb 25, 2024

I tested all 3 alternatives, and only KODI inputstream and ffmpegdirect ended up with a good picture quality. RTMP worked, but had the same issues as the current implementation. Channel switch times were slightly slower though, from what I can tell

@ksooo
Copy link
Collaborator

ksooo commented Feb 25, 2024

Please fix the commit message "changelog and version v21.1.0" - version is 21.0.0

@phunkyfish
Copy link
Contributor Author

Please fix the commit message "changelog and version v21.1.0" - version is 21.0.0

Done

@phunkyfish
Copy link
Contributor Author

phunkyfish commented Feb 25, 2024

Ok, I removed the original setting, and opening the stream using the Live API. Now we just use ffmpegdirect, which supports timeshifting.

Note, a fix is required for timeshifting for rtsp, but that is a separate PR for ffmpegdirect.

@ksooo
Copy link
Collaborator

ksooo commented Feb 25, 2024

Now we just use ffmpegdirect, which supports timeshifting.

Cool, could we add a dependency to ffmpegdirect to addon.xml?

@ksooo
Copy link
Collaborator

ksooo commented Feb 25, 2024

I'm not conviced that the EPG load 10 secs after start is something that actually fixes the root cause of the "@da-anda not having EPG data" problem. If there are no data at the octonet, you can try to fetch them as many times as you want without success. Kodi remembering last EPG fetch timestamp and da-anda meanwhile fixing EPG data on the octopus and Kodi not fetching these new data on next start is something that the commit in this PR fixes by "accident" I'd say.

@da-anda
Copy link

da-anda commented Feb 25, 2024

Cool, could we add a dependency to ffmpegdirect to addon.xml?

it already is added, isn't it?

@da-anda
Copy link

da-anda commented Feb 25, 2024

I'm not conviced that the EPG load 10 secs after start is something that actually fixes the root cause of the "@da-anda not having EPG data" problem. If there are no data at the octonet, you can try to fetch them as many times as you want without success. Kodi remembering last EPG fetch timestamp and da-anda meanwhile fixing EPG data on the octopus and Kodi not fetching these new data on next start is something that the commit in this PR fixes by "accident" I'd say.

according to your other comment, the correct fix would be to not return the NO_ERROR state in case no channel could be mapped, correct? (aka some data got back from octonet, but not the correct channels)

@ksooo
Copy link
Collaborator

ksooo commented Feb 25, 2024

according to your other comment, the correct fix would be to not return the NO_ERROR state in case no channel could be mapped, correct?

Not sure. It should return NO_ERROR only if data for the requested channel was returned by octopus, but for channels not having EPG data also NO_ERROR must be returned (afair, it's been a while since I looked at this stuff). Not sure whether the octopus API allows to detect the latter.

@phunkyfish
Copy link
Contributor Author

according to your other comment, the correct fix would be to not return the NO_ERROR state in case no channel could be mapped, correct?

Not sure. It should return NO_ERROR only if data for the requested channel was returned by octopus, but for channels not having EPG data also NO_ERROR must be returned (afair, it's been a while since I looked at this stuff). Not sure whether the octopus API allows to detect the latter.

So this behaviour was observed when @da-anda did not have a valid EPG. Now that he does I reckon we drop this commit for now and see if it's needed later at a later point.

In recent tests Kodi remembers the EPG data, and should just request it according to it's own schedule.

@phunkyfish phunkyfish changed the title Add ability to use alternative inputstream instead of the live stream API to play channels Change add-on to use inputstream.ffmpegdirect which also enables timeshifting Feb 25, 2024
@phunkyfish
Copy link
Contributor Author

phunkyfish commented Feb 25, 2024

Ok, commit dropped, it's in draft PR #68 in case we need it.

This PR should be ready to go now.

Copy link
Collaborator

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@ksooo
Copy link
Collaborator

ksooo commented Feb 26, 2024

@phunkyfish did a runtime-test of this PR. Timeshift seems not to work properly.

Sometimes Kodi completely freezes when trying ff/rew, sometimes Kodi crashes. There seem to be several scenarios to cause misbehaviour.

@phunkyfish
Copy link
Contributor Author

@phunkyfish did a runtime-test of this PR. Timeshift seems not to work properly.

Sometimes Kodi completely freezes when trying ff/rew, sometimes Kodi crashes. There seem to be several scenarios to cause misbehaviour.

Correct, as stated above, this needs to be fixed in a separate PR for ffmpegdirect. But nothing it change in this PR to help that.

@phunkyfish
Copy link
Contributor Author

@phunkyfish did a runtime-test of this PR. Timeshift seems not to work properly.
Sometimes Kodi completely freezes when trying ff/rew, sometimes Kodi crashes. There seem to be several scenarios to cause misbehaviour.

Correct, as stated above, this needs to be fixed in a separate PR for ffmpegdirect. But nothing it change in this PR to help that.

If you could do a backtrace and pinpoint the crash and logs too that would be great. When you have time.

@ksooo
Copy link
Collaborator

ksooo commented Feb 26, 2024

Correct, as stated above, this needs to be fixed in a separate PR for ffmpegdirect. But nothing it change in this PR to help that.

Okay, then let’s hold off the merge of this PR until the ffmpegdirect fix is available.

@phunkyfish
Copy link
Contributor Author

Correct, as stated above, this needs to be fixed in a separate PR for ffmpegdirect. But nothing it change in this PR to help that.

Okay, then let’s hold off the merge of this PR until the ffmpegdirect fix is available.

This would depend on me having access to a stream. Which I don't currently. I could just comment out the setting for now and then we can revert that commit once it's working?

@da-anda
Copy link

da-anda commented Feb 27, 2024

well, technically you do have access to a stream since VLC can play the streams off of my octonet just fine, it's just KODI/ffmpeg that won't play it via remote connection for whatever reason 😉

@phunkyfish
Copy link
Contributor Author

Well it turns out that timeshift is broken on omega. So hopefully I can fix this without a stream in rtsp stream kodi. Time to start bisecting…

@ksooo
Copy link
Collaborator

ksooo commented Feb 27, 2024

Well it turns out that timeshift is broken on omega.

Okay, then let's merge this PR as is.

@ksooo ksooo removed the don't merge label Feb 27, 2024
@ksooo ksooo merged commit 945b74c into DigitalDevices:Omega Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants