Skip to content
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

Add support for legacy (DVBv3) frontend queries to fix continuity errors #1178

Closed
madmanxxx opened this issue Aug 29, 2024 · 10 comments · Fixed by #1181
Closed

Add support for legacy (DVBv3) frontend queries to fix continuity errors #1178

madmanxxx opened this issue Aug 29, 2024 · 10 comments · Fixed by #1181

Comments

@madmanxxx
Copy link

madmanxxx commented Aug 29, 2024

I have been using minisatip for years, as it was the right tool for the job (transmitted DVB over IP). Unfortunately, when used with most of my DVB-T or all of my DVB-T2 tuners, there were random continuity errors, no matter the multiplex or bitrate - every few seconds the video got artifacts or short pauses, every few minutes audio got short silence. This drove me mad, because at first I thought the installation was to blame (aerial, cable, power supply interference), but ultimately couldn't figure it out as I gradually replaced components.
There was however an interesting behaviour - sometimes after weeks of uptime, the problem was disappearing. At the same time, the DVB frontend status was breaking and minisatip reported signal strength as zeroes. This was a very important clue...

Recently I stumbled upon Kodi, which encouraged me to use Tvheadend. I gave it a try. It worked, but the stream still had continuity errors. When exploring settings, I noticed this option:

Force old status:

Always use the old ioctls to read the linuxdvb status (signal strength, SNR, error counters). Some drivers are not mature enough to provide the correct values using the new v5 linuxdvb API.

Then it struck me - maybe the stream gets corrupted when a frontend was queried? I enabled that option and BAM! Smooth streams, broken stats. YEARS of reaching dead-ends finally ended.
As I have learnt where the problem lies, I could look it up and, as it turns out, I'm not alone:

I would like to propose an enhancement for minisatip - add an option to either add "legacy" queries just like Tvheadend or disable frontend queries completely.

@catalinii
Copy link
Owner

hi,

can u comment those lines here: https://github.com/catalinii/minisatip/blob/master/src/dvb.c#L1920C13-L1920C27
and let me know if it works ?

@madmanxxx
Copy link
Author

Commenting out

        if (!start && ad->new_gs == NEW_SIGNAL)
            get_signal_new(ad, &status, &ber, &strength, &snr, &dbvalue);

fixed continuity errors (except a few at the start, but that's normal and negligible). STR and SNR are obviously 0.

I have tested it on v1.3.6, as I had source + intermediate binaries available.

@madmanxxx
Copy link
Author

OK, I have just tested "legacy" querying:

# femon -H
FE: Sony CXD2837ER DVB-T/T2/C demodulator (DVBT)
Problem retrieving frontend information: Unknown error 524
status SCVYL | signal   0% | snr   1% | ber 446916 | unc 1 | FE_HAS_LOCK
Problem retrieving frontend information: Unknown error 524
status SCVYL | signal   0% | snr   1% | ber 446916 | unc 1 | FE_HAS_LOCK

This means that in my case implementing legacy queries makes no sense, as the values returned are useless.

For those interested: Yes, running dvb-fe-tool -m causes continuity errors.

@catalinii
Copy link
Owner

So running dvb-fe-tool -m in parallel with minisatip with legacy ioctls still causes continuity errors?

@madmanxxx
Copy link
Author

So running dvb-fe-tool -m in parallel with minisatip with legacy ioctls still causes continuity errors?

No?... The question is confusing. Let's break it down:

  • dvb-fe-tool is a pure DVB v5 tool. It doesn't have any "use legacy IOCTLs" switch. Using it while minisatip is streaming causes continuity errors, though reported values look legit.

  • femon is a legacy tool. Using it while minisatip is streaming does NOT cause continuity errors, though it reports garbage.

The above is true when a 'patched' (as proposed) minisatip is used, which does not query frontend status and does not introduce the problem by itself.

@Jalle19
Copy link
Collaborator

Jalle19 commented Aug 31, 2024

Perhaps we could add an option to disable querying for signal status?

@catalinii
Copy link
Owner

https://github.com/catalinii/minisatip/blob/master/src/dvb.c#L1908

Based on this, setting the multipliers to 0 should disable getting the signal

@Jalle19
Copy link
Collaborator

Jalle19 commented Aug 31, 2024

We could perhaps add a note about that to the README/help.

@madmanxxx
Copy link
Author

https://github.com/catalinii/minisatip/blob/master/src/dvb.c#L1908

Based on this, setting the multipliers to 0 should disable getting the signal

Confirmed, appending -M *:0-0 to the command line fixes stream corruption.

@lars18th
Copy link
Contributor

lars18th commented Sep 3, 2024

Comment added in #1181 .
Please merge it.

Regards.

Jalle19 pushed a commit that referenced this issue Sep 4, 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 a pull request may close this issue.

4 participants